localhost Dışı Bağlantılara Açmak 
sudo nano /etc/postgresql/*/main/postgresql.conf
# silinecek, localhost yerine *):
#listen_addresses = 'localhost'
listen_addresses = '*'
Sonra restart edip kontrol edin:
sudo systemctl restart postgresql ss -tulpn | grep 5432
Şimdi şu çıkmalı:
tcp LISTEN 0 244 0.0.0.0:5432 0.0.0.0:*
pg_hba.conf'ta sizin IP'niz için bir kural yok. Sunucudaki pg_hba.conf'a bu IP'yi eklemeniz gerekiyor.
sudo nano /etc/postgresql/*/main/pg_hba.conf
Yukarıdaki dosyanın içerisine:
host imfest150626 imf0526 0.0.0.0/0 md5

Kaynaklar