- Newest
- Most votes
- Most comments
Based on your description, it sounds like you have a routing issue within AWS that's preventing the traffic from your Azure VM from reaching the internet via your EC2 instance. Here are some potential causes and solutions:
-
Source/Destination Check: If your EC2 instance is acting as a NAT or router, you need to disable the "Source/Destination Check" on its network interface. By default, EC2 instances verify that they're the source or destination of any traffic they receive. When an instance acts as a router, it needs to be able to send and receive traffic where it's neither the source nor the destination.
-
Asymmetric Routing: Your VPN might be experiencing asymmetric routing issues. This happens when traffic enters through one path (like one VPN tunnel) but returns via another path. If both tunnels are in an Active/Active configuration, you may need to ensure your EC2 instance supports asymmetric routing.
-
NAT Configuration: Verify that your EC2 instance is properly configured for NAT masquerade. The instance needs to correctly translate the source IP addresses of packets from your Azure VM to its own IP address when forwarding them to the internet.
-
Route Tables: While you've verified that the route table has entries for the Azure subnet pointing to the VGW, also check that:
- The subnet where your EC2 instance resides has a route to the internet (0.0.0.0/0) via an Internet Gateway
- The EC2 instance has a route back to your Azure network via the VGW
-
Firewall Rules: Even though you've verified security groups and NACLs, double-check that your EC2 instance's OS-level firewall (like iptables if it's Linux) is configured to allow forwarding traffic.
-
MTU Issues: VPN connections can sometimes cause issues with packet sizes. Try adjusting the MTU on your Azure VM to a lower value (e.g., 1400 or 1300) to see if that resolves the issue.
Since you mentioned the EC2 instance is not seeing the ping traffic at all, I would first focus on checking the route tables and ensuring the Source/Destination Check is disabled on your EC2 instance.
Sources
EC2 Instances in eu-south-2 Subnet Cannot Access Internet Despite Correct NAT and Routing Setup. | AWS re:Post
ec2 instance not routing through virtual private gateway | AWS re:Post
VPN stopped working - not receiving ESP traffic back from AWS | AWS re:Post
Relevant content
- asked 2 years ago
- asked 3 years ago
