[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

PostgreSQL Question



I've got a PostgreSQL Question:

   In my continuing effort to secure my system (and brush up for my
presentation Tuesday) I'm running nmap to check for open ports on eth1
(Internet Gateway). I'm finding that port 5432 (PostgreSQL) is open to the
world! In investigating the docs @
http://postgresql.readysetnet.com/devel-corner/docs/admin/runtime-config.htm
l They state that a config file called postgresql.conf should be on my
system. (I did an .rpm install) I ran 'locate postgresql.conf ' but it comes
back with nothing. I did locate a config file in
/var/lib/pgsql/data/postmaster.opts which holds some command line config
options.

   My real question is how do I tell PosrgreSQL to listen to 127.0.0.1 &
192.168.0.2 ONLY!

   I did find the config file /var/lib/pgsql/data/pg_hba.conf and it is
listed below:

<snip>
# By default, allow anything over UNIX domain sockets and localhost.

local        all
trust
host         all         127.0.0.1     255.255.255.255     crypt
host         all         192.168.0.0   255.255.255.0       crypt

I'm really clueless at this point and the doc's I have read are not helping
at this point so if anyone has any suggestions, they would be appreciated!

Thanks!

Richard

Richard Zimmerman                                     Richard@knbpower.com
Information Systems Manager                      ke4rit@earthlink.net
K&B Transport, Inc.
Elkhart, Indiana                     Advanced SKYWARN weather spotter

Support Operation Lifesaver
www.oli.org