AWS Reachability Analyzer says this path works, but in reality, it fails

0

I have two instances, Instance1 and Instance2. I ran a reachability analysis on the path from Instance1 to Instance2, and it succeeds. However, when I connect to Instance1 and run nc -z -v [dest IP] [port], I receive "no route to host".

What am I missing?

已提问 1 年前240 查看次数
1 回答
0

Netcat command that you mentioned will initiate a TCP connection to the destination host on the port number specified. If there is a route exist and server is listening on the specified port, the connection will succeed.

However, Reachability Analyzer analyzes the path between a source and destination by building a model of the network configuration, and then checking for reachability based on the configuration. It does not send packets or analyze the data plane.

So if you see reachability analyzer is returning path as succeeded, that mean it verified there is no traffic is getting blocked by security group, ACL and also there is a route between source and destination. These path can be internal when you specify instance 1 as source and instance 2 as destination. It could be possible that 2 instances may not be reachable over the internet but can be very well reachable using private ip. You should be able to see the route that vpc analyzer returned using the analysis explorer.

Also if the destination server is not listening on the specified port, reachability analyzer will still succeed as long as there is routable path exist between src and dst. But netcat will fail, as it try to send a SYN packet to the server and server will not acknowledge if its not listening on the port or some firewall is blocking the traffic at the OS level.

profile pictureAWS
navaz
已回答 1 年前

您未登录。 登录 发布回答。

一个好的回答可以清楚地解答问题和提供建设性反馈,并能促进提问者的职业发展。

回答问题的准则