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 年前

您尚未登入。 登入 去張貼答案。

一個好的回答可以清楚地回答問題並提供建設性的意見回饋,同時有助於提問者的專業成長。

回答問題指南