Skip to content

Github.com not reachable from an ipv6 only ec2 instance

0

I have setup a new VPC, Subnet, Route Table, EC2 instance with below given configuration. I am now trying to clone a github repository but I am getting error Failed to connect to github.com port 443 after 134244 ms: Couldn't connect to server. This is because github.com does not support ipv6 only network traffic (or similar to that)

VPC:

  • ipv4 and ipv6 CIDR

Subnet:

  • ipv6 only
  • Enabled DNS64

Route table:

  • All ipv4 and ipv6 traffic is targetted to Internet Gateway

EC2:

  • IPv6-only - IP based name: AAAA record only is available
  • Apache2 is accessible via the ipv6-only hostname from internet

Security Group:

  • All traffic is allowed
3 Answers
2

The workaround would be to use NAT Gateway which supports NAT64.

https://docs.aws.amazon.com/vpc/latest/userguide/nat-gateway-nat64-dns64.html

AWS
EXPERT

answered a year ago

AWS
EXPERT

reviewed a year ago

  • The primary reason I want to use ipv6 is to not pay for IP address. I took a look at NAT Gateway and it incur costs. Is there a cost-effective solution available? If not, then rather than setting up a NAT Gateway, I would keep using public ipv4 instead.

    I also did a simple cost comparison: 1 NAT Gateway costs - 40-50 USD a month 1 IP Address costs - 4 USD a month

  • You are correct, in this case since the limitation is on the destination endpoint you will need to use some sort of NAT64 forward proxy or use Public IPv4 at the source endpoint.

0

hi,

I wonder switching to a dual-stack subnet especially since You're trying to access GitHub, which is IPv4-only.

https://aws.amazon.com/blogs/aws/new-aws-public-ipv4-address-charge-public-ip-insights/

answered a year ago

AWS
EXPERT

reviewed a year ago

0

I had the same problem: I moved to IPv6 only instances to save a few bucks, and found I couldn't clone from Github.

I didn't want to pay for the NAT Gateway, so I made my own using a free-tier EC2 instance. I documented it here: https://pradeepcep.com/blog/free-nat-gateway-aws

answered 5 months 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.