A self-managed NAT instance is in place and routes point to it, but private instances still can't reach the internet.
IntermediateTroubleshootingCloud networking: VPC, firewalls, NAT, VPN and proxies
Answer
Likely causes → Source/destination check is enabled on the NAT instance's ENI (AWS drops traffic not addressed to/from the instance itself), IP forwarding is off, or there's no MASQUERADE rule.
Diagnose →
aws ec2 describe-instance-attribute --instance-id <nat> --attribute sourceDestCheck
sysctl net.ipv4.ip_forward
sudo iptables -t nat -S POSTROUTING
Fix →
aws ec2 modify-instance-attribute --instance-id <nat> --no-source-dest-check
sudo sysctl -w net.ipv4.ip_forward=1
sudo iptables -t nat -A POSTROUTING -o eth0 -s 10.0.0.0/16 -j MASQUERADE
Persist both settings.
Prevent → Use managed NAT gateways unless cost forces otherwise; if you run NAT instances, bake them from a tested image with an ASG for recovery.
More on Cloud networking: VPC, firewalls, NAT, VPN and proxies
An EC2 instance in a private subnet hangs on `apt-get update` at `Connecting to archive.ubuntu.com`.BeginnerA new EC2 instance in a "public" subnet can't be reached over SSH from the internet; the SG allows port 22 from your IP.BeginnerThe SG allows inbound 443 and the app works from inside the VPC, but internet clients time out. The subnet NACL allows inbound 443.IntermediateA VPC peering connection is `Active`, but instances in the two VPCs can't ping each other.BeginnerALB targets are `unhealthy` with reason `Target.Timeout`, and VPC Flow Logs show `REJECT` from the ALB's IPs to the instances.BeginnerTwo VPCs are attached to a Transit Gateway, but traffic between them fails.Intermediate