I am attempting to follow this guide to allow remote connections to postgres http://www.cyberciti.biz/tips/postgres-allow-remote-access-tcp-connection.html
At the moment I am running into issues with the firewall.
I have it setup so I have a /tmp/v4
that I can modify and just restore my firewall rules from.
I have tried 2 settings.
The one the guide recommends:
-A INPUT -p tcp -s 0/0 --sport 1024:65535 -d 00.000.000.00 --dport 5432 -m state --state NEW,ESTABLISHED -j ACCEPT
-A OUTPUT -p tcp -s 00.000.000.00 --sport 5432 -d 0/0 --dport 1024:65535 -m state --state ESTABLISHED -j ACCEPT
When I use this setting and run nc ipofserver 5432
I get Ncat: connection timed out
If I try settings
-I INPUT -p tcp -s 00.000.000.00 --dport 5432 -j ACCEPT
-I INPUT -p tcp -s 00.000.000.00 --dport 5432 -j ACCEPT
I run the same ncat command, I get Ncat: Connection refused
I use the same base firewalls (not what is listed above) on another server for serving redis and it works correctly.
firewalld has been disabled on this box in favor of iptables, mostly for familiarity purposes.
Both machines are CentOS 7
00.000.000.00 replaces the IP of the computer I am actually using