How to allow remote connections to your PostgreSQL 9.0 database server on Ubuntu 10.04 LTS
September 8, 2011 Comments
Change directory to /etc/postgresql/9.0/main and modify the following configs (I know you’re sick of hearing this, but I recommend you back up your original configs before making any changes):
postgresql.conf
In “Connections and Authentication” section:
From
#listen_addresses = 'localhost' #password_encryption = on
To
listen_addresses = '*' password_encryption = on
pg_hba.conf
From
host all all 127.0.0.1/32 md5 host all all ::1/128 md5
To
host all all 0.0.0.0/0 md5 host all all ::0/0 md5
Restart the ssh daemon: /etc/init.d/ssh restart
Tags: security, tech, database, postgresql