Skip to content

IPv6 only EC2 instance becomes unreachable for no apparent reason

0

I have an EC2 instance running in US-West. It has only an AWS allocated IPv6 public address, and no public IPv4 address. Until recently (a few weeks ago?) it has been reliable and I could access it via SSH and HTTP/HTTPS. I did not change any network related configuration like VPC. Now SSH fails with "Network is unreachable", HTTP/HTTPS does not go through either.

Some more details:

  1. The VPC has an associated public IPv6 address from the Amazon pool. There is one subnet.
  2. Routing table has target "local" for the CIDRs associated with the VPC, and the IGW for default (0.0.0.0/0 and ::/0).
  3. I can connect to the instance through EC2 Instance Connect. The connection is IPv6, and the client address appears to be outside my subnet's CIDRs.
  4. Reachability Analzyer reports "Not reachable" status. It seems to be trying IPv4 only, however.

asked 2 years ago321 views

1 Answer
0

The issue you're experiencing with your IPv6-only EC2 instance becoming unreachable could be due to several factors. Here are some potential causes and troubleshooting steps:

  1. Check your local network: Ensure that your local network and ISP support IPv6. If your local network doesn't have IPv6 connectivity, you won't be able to reach the instance.

  2. Security Group and Network ACL: Verify that your Security Group and Network ACL rules allow inbound traffic for SSH (port 22) and HTTP/HTTPS (ports 80/443) from your IPv6 address or ::/0.

  3. Route table: Confirm that your subnet is associated with a route table that has a route for IPv6 traffic (::/0) to an internet gateway.

  4. Instance configuration: Ensure that the EC2 instance itself is properly configured for IPv6. Check if the IPv6 address is correctly assigned to the network interface within the instance.

  5. Firewall settings: If you have a firewall configured on the instance, make sure it's not blocking incoming IPv6 traffic.

  6. Web server configuration: If you're running a web server like Nginx, ensure it's configured to listen on IPv6 addresses. Add a line like "listen [::]:80;" to your server block for IPv6 support.

  7. DNS resolution: Verify that DNS resolution is working correctly within your instance, as misconfigured DNS can lead to connectivity issues.

  8. Default route: Check if there's a default IPv6 route on the instance. You can use the command "ip -6 route show" to verify this.

  9. AWS network issues: Although rare, there could be temporary AWS networking issues affecting IPv6 connectivity.

Since you can connect via EC2 Instance Connect, the issue is likely related to either your local network's IPv6 support or a misconfiguration in the instance or VPC settings. Double-check all these areas to identify and resolve the connectivity problem.

If the issue persists after verifying these points, you may need to contact AWS support for further assistance, as there could be an underlying network issue on their end.

Sources
Web server running on IPv6-only instance not reachable from Internet | AWS re:Post
IPV6 not working in or out EC2 | AWS re:Post
EC2 with Ubuntu 16.04 in IPv6 VPC unreachable from outside | AWS re:Post
SSH IPv6 stopped working | AWS re:Post

answered 2 years ago

EXPERT

reviewed 2 years 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.