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!
Trackbacks: (Trackback URL)