Skip to content

Instantly share code, notes, and snippets.

@devhero
Created August 1, 2015 10:23
Show Gist options
  • Save devhero/9734663968410902777d to your computer and use it in GitHub Desktop.
Save devhero/9734663968410902777d to your computer and use it in GitHub Desktop.
postgres listen tcp-ip
# ubuntu
/etc/postgresql/9.1/main
# centos
/var/lib/pgsql/9.x/data
postgresql.conf
listen_addresses = '*'
pg_hba.conf
host all all 0.0.0.0/0 md5
# tips
host all all 192.168.0.0/24 md5
This example grants MD5 encrypted password access to all databases to all users on the private network 192.168.0.0/24.
You can use the pg_hba.conf editor that is built into pgAdmin III to edit the pg_hba.conf configuration file. After changing pg_hba.conf, you need to trigger a server configuration reload using pg_ctl or by stopping and restarting the server process.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment