Everything was working in my previous office. I've now moved to a new office, and cannot connect remotely to postgres. SSH works though. My IP is currently 70.90.155.138.
Could not connect to server: connection timed out
IP tables config:
# Allpw postgres connections
-A INPUT -p tcp --dport 5432 -s 70.90.155.138/16 -j ACCEPT
iptables -L
Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- anywhere anywhere
REJECT all -- anywhere loopback/8 reject-with icmp-port-unreachable
ACCEPT all -- anywhere anywhere state RELATED,ESTABLISHED
ACCEPT tcp -- anywhere anywhere tcp dpt:http
ACCEPT tcp -- anywhere anywhere tcp dpt:https
ACCEPT tcp -- anywhere anywhere tcp dpts:http-alt:8090
ACCEPT udp -- anywhere anywhere udp dpts:60000:61000
ACCEPT tcp -- anywhere anywhere state NEW tcp dpt:ssh
ACCEPT tcp -- 70.90.0.0/16 anywhere tcp dpt:postgresql
pg_hba.conf:
local all postgres md5
host all all 0.0.0.0/0 md5
Listen_addresses is set correctly and not commented:
listen_addresses = '*'
Postgres is running:
/etc/init.d/postgresql status
Running clusters: 9.1/main
and listening:
sudo /etc/init.d/postgresql status
Running clusters: 9.1/main
user1@finance1:/var/log$ sudo netstat -nlp | grep 5432
tcp 0 0 0.0.0.0:5432 0.0.0.0:* LISTEN 17772/postgres
tcp6 0 0 :::5432 :::* LISTEN 17772/postgres
unix 2 [ ACC ] STREAM LISTENING 5667832 17772/postgres /var/run/postgresql/.s.PGSQL.5432
And I'm not seeing any failed connections in the IPtables log:
tail -5000 /var/log/kern.log | grep DPT=5432
What have I failed to check here? What could cause this to stop working when the only thing that has changed is the location of my laptop?