Keith Watanabe * NET 2.0

Configuring Postgres Over the Network
By: Keith Watanabe
Published On: 1-23-2005

Had a bitch of a problem trying to get my remote system to connect to my postgres server. Turned out there were at least two places to look. One (the hardest to determine) was the firewall (iptables) and the other which was slightly easier was pg_hba.conf. Although I'm not 100% certain that I did this correctly, I basically hacked /etc/sysconfig/iptables and added a line: -A RH-Firewall-1-INPUT -m state --state NEW -m tcp -p tcp --dport 5432 -j ACCEPT before one of the reject rules. then i restarted the iptables service. Still when you run postgres to allow TCP connections to come in, you still have another layer of security: pg_hba.conf. Here, you can fine tune the settings so that only certain users can get access to a database, etc. For instance, you might have a line like: host foo bar 192.168.2.24 255.255.255.255 trust this line indicates that database foo can let user bar in through the ip/host 192.168.2.24. very useful!

Tags: Linux Postgres
AddThis Social Bookmark Button Sphere: Related Content

Trackbacks: (Trackback URL)

No Comments Posted Yet
December [January] February
Sun Mon Tue Wed Thu Fri Sat
28 29 30 31 1 2 3
4 5 6 7 8 9 10
11 12 13 14 15 16 17
18 19 20 21 22 23 24
25 26 27 28 29 30 31