I've got a PostgreSQL data base that I'd like to configure to accept all incoming connections regardless of the source IP address. How can this be configured in the pg_hba.conf file? I'm using postgreSQL version 8.4.
+3
A:
Just use 0.0.0.0/0:
host all all 0.0.0.0/0 md5
Make sure the listen_addresses in postgresql.conf allows all incoming connections as well:
listen_addresses = '*'
After the changes you have to reload the configuration (as a superuser):
SELECT pg_reload_conf();
Frank Heikens
2010-07-19 06:20:19
does this really work with type `md5`? I thought it would be necessary to use type `trust`...
Dan LaRocque
2010-07-19 16:56:39
"trust" allows all users to connect without any password. That's something I wouldn't use, a password is the bare minimum you should always use. Even on your own computer.
Frank Heikens
2010-07-19 17:59:14
ah, i read the question differently -- i thought he meant accept connections from all clients unconditionally (for some unimportant testbed, maybe). i see what you're getting at now.
Dan LaRocque
2010-07-19 19:00:30
Yes worked a treat. Thanks Frank.
Fergal
2010-07-23 00:40:41