1

I have set vpc peering between these VPCs (vpc-1 and vpc-2). I have my RDS in vpc-1 in this subnets (10.13.1.0, 10.13.2.0, 10.13.3.0) with this route rtb-vpc1-rds. In the second VPC and two subnets : one public (10.12.1.0 with route rtb-vpc2RoutePub) and other private (subnet 10.12.2.0 and route rtb-vpc2RoutePriv) with a nat. I created the right routes using the peering connections, and i created the right security groups.

From the private subnet (10.12.2.0) i can access my RDS instances but from the public i can't.

telnet myrds.cnojzxstksnn.eu-west-1.rds.amazonaws.com 5432 Connected to myrds.cnojzxstksnn.eu-west-1.rds.amazonaws.com. Escape character is '^]'. when i try from my public subnet (10.12.1.0) telnet myrds.cnojzxstksnn.eu-west-1.rds.amazonaws.com 5432 !5889 Trying 10.13.3.234... Do you have any idea about what i did wrong?

Thanks for your help and comments. Regards,

LotfiK
  • 41
  • 7

1 Answers1

1

VPC peering does not care about public vs. private subnets.

Take another look at your security group rules and route tables. You have something misconfigured, and that is what is causing your problems. Remember that both systems involved in the communication need to have routes to each other through your pcx endpoint.

EEAA
  • 109,363
  • 18
  • 175
  • 245
  • Thanks for your answer. I'm sure i did the same setting for my public subnet. I'm going to review my settings. Thanks again. – LotfiK Mar 09 '17 at 15:04
  • Hello EEAA. You were right. I missed a security group that authorizes traffic from one direction. Thanks for your help. – LotfiK Mar 10 '17 at 09:43