0

I cant get a PostgreSQL 10 instance to allow remote connections.

The database is hosted on Ubuntu 18.04

listen_addresses has been set to both '*' and 'myactualip' that needs to connect to the database.

pg_hba.conf has had IPV4 set to

host all all 0.0.0.0/0 md5
host all all myactualip/subnet md5

I still have no connection and get the usual "is x.x.x.x allowing tcp ip connections on port 5432".

The Postgres config file is listing 5432 as the listen port, netstat -atn shows the server listening on 5432.

firewall is disabled.

getenforce is disabled

I can ping the client computer.

The client computer that needs to connect also has firewall disabled.

I restart the Postgres service after every change, I've also tried restarting the VM multiple times to no avail.

9
  • 1
    listen_addresses should contain * or the IP address of the network interface, not the client IP address. What do you see in the PostgreSQL server log? Aug 21, 2019 at 17:02
  • "I can ping the client computer" -- but what about a ping in the other direction? That's what's important.
    – mustaccio
    Aug 21, 2019 at 17:06
  • connect with psql by using local socket and write show listen_addresses;
    – Sahap Asci
    Aug 21, 2019 at 22:06
  • I can ping in the other direction just fine. listen_addresses contains "*" Aug 22, 2019 at 13:11
  • I will check the log shortly. Aug 22, 2019 at 13:11

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.