https://bosnadev.com/2015/12/15/allow-remote-connections-postgresql-database-server/
- Type:
PostgreSQL - Protocol:
TCP - Port Range:
5432 - Source:
Custom0.0.0.0/0
First, allow more than just localhost to connect to the DB
/etc/postgresql/9.4/main/postgresql.conf
listen_addresses = '*'
Then, pick what IP's have access
/etc/postgresql/9.4/main/pg_hba.conf (replace xx.xx.xx.xx with your IP address, or add 0.0.0.0/0 md5 to allow all connections)
# IPv4 local connections:
host all all 127.0.0.1/32 md5
host all all XX.XX.XX.XX/32 trust