I have created an AWS RDS postgres instance and i am trying to hit the db using postgres4 dashboard from my local machine but am unable to create a connection and it is throwing an error like
Unable to connect to server:
could not connect to server: Connection timed out (0x0000274C/10060)
Is the server running on host "clienteledev2.XXX.ap-south-1.XXX.com" (xx.xx.xx.xx) and accepting
TCP/IP connections on port 5432?
I went through AWS documentation and have already done the necessary settings like: setting public availability
1)setting Public accessibility flag to YES
2)Adding inbound rule in security group in order to open ports for communication i.e port 5432 as tcp for postgresSQL
3)even have added rule for incoming traffic from my machine as custom tcp and for source myIP
I am using default VPC which is public and on my personal machine i have exempted or allowed pgadmin to connect through firewall.
I have searched enough online and have found some solutions suggested for previous questions like these none of them worked. What is that i am doing wrong?
The easiest way would be to add an INBOUND rule to your DB Security group allowing access from anywhere 0.0.0.0/0
for the DB TCP port (in this scenario, it is 5432
). This will allow any IP address to access to your publicly accessible DB instance. Please be warned that this brings in its own set of security risks.
To avoid this, commonly used alternative is to connect via a VPN and have the VPN IP address allowed for INBOUND.
User contributions licensed under CC BY-SA 3.0