473,473 Members | 1,477 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Firewall Security Requirements for Postgresql Access

Is opening up port 5432 (R/W both directions) all that is required
of a firewall in order to access a postgres database outside the
firewall?
--
% Randy Yates % "My Shangri-la has gone away, fading like
%% Fuquay-Varina, NC % the Beatles on 'Hey Jude'"
%%% 919-577-9882 %
%%%% <ya***@ieee.org> % 'Shangri-La', *A New World Record*, ELO
http://home.earthlink.net/~yatescr
Nov 23 '05 #1
7 4053
Randy Yates wrote:
Is opening up port 5432 (R/W both directions) all that is required
of a firewall in order to access a postgres database outside the
firewall?


Yes it is.
Regards
Gaetano Mendola
Nov 23 '05 #2
Randy Yates wrote:
Is opening up port 5432 (R/W both directions) all that is required
of a firewall in order to access a postgres database outside the
firewall?


I forgot, don't open only the 5432 and sleep well. Don't forget the
antispoofing rules.
Regards
Gaetano Mendola

Nov 23 '05 #3
Ben
Well, R/W doesn't make much sense for TCP.... incoming/outgoing SYN
packets make more sense, and if the database is located outside the
firewall, you really only need to allow outgoing SYN packets on the port
(as well as packets related to that session, of course).

On Wed, 8 Sep 2004, Gaetano Mendola wrote:
Randy Yates wrote:
Is opening up port 5432 (R/W both directions) all that is required
of a firewall in order to access a postgres database outside the
firewall?


Yes it is.
Regards
Gaetano Mendola

---------------------------(end of broadcast)---------------------------
TIP 2: you can get off all lists at once with the unregister command
(send "unregister YourEmailAddressHere" to ma*******@postgresql.org)


---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #4
Gaetano Mendola <me*****@bigfoot.com> writes:
Randy Yates wrote:
Is opening up port 5432 (R/W both directions) all that is required
of a firewall in order to access a postgres database outside the
firewall?
Yes it is.


If it's a stateful firewall (eg something doing NAT translation) you
will also want to ask hard questions about how quickly it drops idle
connections. If the answer is "less than an hour, and you can't change
it" then you may want to think about buying a different firewall.
Else, idle database connections are likely to disappear from under your
clients.

Postgres does enable TCP "keepalive" to prevent idle connections from
dying, but most kernels only send keepalive probes every hour or so.
(The TCP RFCs actually specify how often to do this, IIRC.) If the
firewall drops idle connections after less than the TCP keepalive interval,
you got trouble.

You can of course work around this in any number of ways, but it's
better not to use a standards-challenged firewall in the first place.

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 3: if posting/reading through Usenet, please send an appropriate
subscribe-nomail command to ma*******@postgresql.org so that your
message can get through to the mailing list cleanly

Nov 23 '05 #5

Tom Lane <tg*@sss.pgh.pa.us> writes:
Postgres does enable TCP "keepalive" to prevent idle connections from dying,
but most kernels only send keepalive probes every hour or so. (The TCP RFCs
actually specify how often to do this, IIRC.)
RFC 1122 4.2.3.6:

Keep-alive packets MUST only be sent when no data or
acknowledgement packets have been received for the
connection within an interval. This interval MUST be
configurable and MUST default to no less than two hours.
If the firewall drops idle connections after less than the TCP keepalive
interval, you got trouble.


Of course it really ought to wait at least some reasonable multiple of the
keepalive interval since either the data or the ack could get dropped. In fact
dropping connections after only a single keepalive being dropped is explicitly
prohibited:

It is extremely important to remember that ACK segments that
contain no data are not reliably transmitted by TCP.
Consequently, if a keep-alive mechanism is implemented it
MUST NOT interpret failure to respond to any specific probe
as a dead connection.

Of course NAT violates uncounted RFCs in the first place. But if you're going
to do NAT you usually really want the timeouts to be on the order of days, not
hours.

--
greg
---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 23 '05 #6
be***@silentmedia.com (Ben) writes:
Well, R/W doesn't make much sense for TCP.... incoming/outgoing SYN
packets make more sense, and if the database is located outside the
firewall, you really only need to allow outgoing SYN packets on the port
(as well as packets related to that session, of course).


Are you suggesting that the firewall be configured so that the only
outgoing packets allowed through are ones with the SYN bit set in the
CODE BITS field of the TCP header? I'm fairly ignorant on protocol
matters, and I don't understand why one would single out these types
of TCP segments. Could you please expound?
--
% Randy Yates % "Bird, on the wing,
%% Fuquay-Varina, NC % goes floating by
%%% 919-577-9882 % but there's a teardrop in his eye..."
%%%% <ya***@ieee.org> % 'One Summer Dream', *Face The Music*, ELO
http://home.earthlink.net/~yatescr
Nov 23 '05 #7
On Wed, Sep 08, 2004 at 03:12:29 +0000,
Randy Yates <ya***@ieee.org> wrote:
be***@silentmedia.com (Ben) writes:
Well, R/W doesn't make much sense for TCP.... incoming/outgoing SYN
packets make more sense, and if the database is located outside the
firewall, you really only need to allow outgoing SYN packets on the port
(as well as packets related to that session, of course).


Are you suggesting that the firewall be configured so that the only
outgoing packets allowed through are ones with the SYN bit set in the
CODE BITS field of the TCP header? I'm fairly ignorant on protocol
matters, and I don't understand why one would single out these types
of TCP segments. Could you please expound?


Blocking SYN packets can be used to prevent the set up of a TCP connection.
One way to block inbound connections to ports, but allow outbound connections
to them is to block incoming SYN packets. This has the advantage that no
state needs to be maintained about the connection. The normal situation is
that inbound SYN packets are blocked except for the few ports to which you
want to allow connections to.

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

Nov 23 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: PrisNo6 | last post by:
I have some old code locked in two Access 97 files where I lost the mdw file and the pid do to system crashes. Can someone refer me to a commercial vendor who can crack these files? - Regards -...
1
by: Gilbert Van Hauwe | last post by:
Hello, How can i make a connection to MS Access DB ( Security DB )? I make a new workgroupinformationfile (mdw file ), a new MS Access DB that can working with the workgroupfile. Now, i want...
1
by: premmehrotra | last post by:
I have an access 2000 database which has several levels of security defined, i.e., certain users can only see certain forms, run certain reports. I am splitting this database in front end and...
26
by: Stav | last post by:
Hi there. I'm working on an application that currently uses DAO to connect to an Access 97 database. The database is created by and used exclusively by the product to store search results and...
0
by: walid | last post by:
Hi all, I was wondering if anybody knows why Image.save(pathstring) is allowed in ASP.net without any security permissions . the user can create an image and save it in the web page directory,...
1
by: Jason Tost | last post by:
Good afternoon, I was wondering if there is a way you can determine what the security requirements are of a control. I have an application that throws a security exception if there is a...
0
by: nebbiasun | last post by:
I have a split database which calls a word document (mail merge from query) which works perfectly in both access 2003 and 2007. I have secured the frontend and backend (user level security) in 2003...
1
by: Luke Bailey | last post by:
I have an access database that I have secured using ueser-level security. I have my own logon in the Admins group. I have also removed Admin from the Admins group so that the standard end-user...
2
by: daz_oldham | last post by:
Hi everyone I'm trying to lock my SQL Server Desktop Edition down which is running on a relatively fresh install of Windows 2003 Server Standard Edition which is a dedicated server from...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.