Network load balancer, Cannot Ping from the ec2 in the same subnet

0

I am Trying to connect a private ec2 instance to a Api gateway using Vpc links, however when I created the NLB, my private instance cannot ping de DNS of the NLB, the NLB is internal, and its attach to the same private sub-net of the EC2 instance, I dont understand why is not connecting because the NLB and the EC2 share the same security group, and as result, that I can connect to my endpoints in EC2 but not connect at all with the NLB, Insade the EC2 its a spring boot, with one endpoint, in the port 8000, also the listeners and the target groups are in TCP 8000, however, I dont understand why I cannot ping the NLB.

asked 10 months ago933 views
2 Answers
2
Accepted Answer

NLBs don't have security groups so I'm not sure how your EC2 instance and the NLB can be configured in that way. You also can't ping a NLB - it doesn't respond to ICMP echo requests.

If you need to test whether the NLB is working or not you will need to connect on the port configured as a listener. You can do this using tools such as curl and wget or even netcat.

Update October 2023: Although it's not relevant to the answer, NLBs now support security groups: https://docs.aws.amazon.com/elasticloadbalancing/latest/network/load-balancer-security-groups.html

profile pictureAWS
EXPERT
answered 10 months ago
profile pictureAWS
EXPERT
reviewed 10 months ago
profile picture
EXPERT
reviewed 10 months ago
  • Hi, I am also having the same problem.. Even curl doesn't work... I am getting connection timed out error. I am having a instance in subnet 10.0.1.0/24 and a NLB interface attached to the same subnet..

  • I'd suggest that you create a new question which details your network setup so that a better answer can be provided. You should include IP address details, security groups and NACLs (if any).

0

Thanks, with wget works perfectly, Thanks so much for everything, now, figurated how to connect with the VPC Link to Apigateway, because for the moment, its showing "internal server error", Thanks to Much

answered 10 months ago

You are not logged in. Log in to post an answer.

A good answer clearly answers the question and provides constructive feedback and encourages professional growth in the question asker.

Guidelines for Answering Questions