Connecting to a remote Postgres 9.1 DB
You have to configure the following two files

pg_hba.conf

host all all 0.0.0.0/0 md5


postgresql.conf

listen_addresses='*'


Make sure to restart postgres service after changing the files.

You have to check if the port 5432 is open: http://www.yougetsignal.com/tools/open-ports/

If it's not then add a rule to your iptables:

iptables -A INPUT -s 0/0 -p tcp --dport 5432 -j ACCEPT


0/0: If you want anybody to access it.
You can change it to a specific IP address or range of IP addresses.