Im trying to connect to a DB with Postgres JDBC, both machines are linux
- the firewall, selinux, iptables are down on both machines
- I can connect to the DB, (on my personal windows computer) with Mobaxterm and DBeaver using ssh: ssh -L 9999:127.0.0.1:5432 root@dbhost
- they can ping each other
- I can Telnet to port 22, but no 5432
- I get this when I run the command netstat -nlp | grep 5432
tcp 0 0 127.0.0.1:5432 0.0.0.0:* LISTEN 86870/postgres
I have added this lines at the end of postgresql.conf
listen_addresses = '*'
port = 5432
I have added this lines pg_hba.conf
host all all 0.0.0.0/0 md5
host all all ::/0 md5
and I have run this query to reload the config
SELECT pg_reload_conf();
but still can't connect, What do you recommend?