I am trying to connect to a Remote PostgreSQL Server(WINDOWS 8 Server) from my local machine (WINDOWS 10 Machine) and i am getting connection timeout error.
I have tried following things before posting this question.
- Checked and made sure that
listen_addresses
in postgresql.conf should be set to'*'
on the server end. - 2nd thing, allowed any ip address to communicate with host(i know its a bad practice but for development purpose) I have replaced the local host ipaddress with
0.0.0.0/0
inpg_hba.conf
file.
Something like below -
# IPv4 local connections:
host all all 0.0.0.0/0 scram-sha-256
- Whitelisting the PostgreSQL Port number by adding the Port Number -
5433
in the inbound rules section in Windows Firewall Advanced Settings on PostgreSQL Server machine (WIN 8 Server). - After performing above steps, I have restarted the PostgreSQL.
My local environment
WINDOWS 10 Machine
PostgreSQL 14
PGAdmin4
Port Number - Default 5432
My Server Environment
WINDOWS 8 Machine
PostgreSQL 15
PgAdmin 4
Port Number - Default 5433
I have tried PGAdmin4/PSQL to connect to this remote server but everytime its failing with time out error.
Please let me know what else needs to be done here.
Thanks in advance.