1
votes

I have a VPC with public & private subnets (Windows 2019). I installed Postgres database (not RDS) manually in the private instance. As recommended by AWS I have created all the security group rules in public & private instance security groups. I wasn't able to connect to the DB from public instance. Please advise. Thanks.

Public instance security group:

  • HTTP TCP 80 0.0.0.0/0 -
  • PostgreSQL TCP 5432 0.0.0.0/0
  • RDP TCP 3389 0.0.0.0/0 -
  • HTTPS TCP 443 0.0.0.0/0

Outbound:

  • PostgreSQL TCP 5432 sg-0f189eca6a0f783dd (PRIVATE-SG)

Private instance security group:

  • PostgreSQL TCP 5432 sg-008ffcfcdec814a91 (PUBLIC-SG)
  • RDP TCP 3389 sg-008ffcfcdec814a91 (PUBLIC-SG)
1
Can you post SGs' settings. Also have you modified any of the network ACLs? - Marcin
I did not touch NACL. I have updated my initial post. Thanks - Srisfti
Also since its windows, are you sure there is no any default firewall running on private instance which would block outside connections? - Marcin
Windows firewall has 100s of rules; how would I trace and correct it? Thanks for your quick response. - Srisfti
you know what, I touched the firewall for ping command. your are right. I opened port 5432 explicitly in the private windows instance firewall. All set!! - Srisfti

1 Answers

0
votes

Based on the comments.

The connection issue was caused by build-in firewall on Windows instances.

The solution was to add rule to the firewall enabling port 5432.