Mahdi Shanak
Aug 27, 2017 · 1 min read

remotly connect to postgres hosted on google compute engin

first :

in postgres :

sudo vi /var/lib/pgsql/data/postgresql.conf

make sure the listen_address=”*”

listen_addresses = '*'

then

sudo vi /var/lib/pgsql/data/pg_hba.conf

add the followiung line

host  all  all 0.0.0.0/0 md5

in Google firewall roles , we need to open the postgres port

go to https://console.cloud.google.com/networking/firewalls

create firewall rule

create ingress and Egress rules to allow two direction connectios

)
Mahdi Shanak

Written by

Web Developer / #Palestine Follow me on http://t.co/RPgh5fm02v