AWS IPv6 address to Existing EC2 and VPC Guide

(0 comments)

Apple now forcing app developers to upload IOS builds with backend apis having support of IPv6 only. So sooner or later you have to add support of ipv6. 

Here is guide to setup ipv6 in AWS having ubuntu instance.

1. Go to VPC console and select existing vpc:
Actions > Edit CIDRs > in block "VPC IPv6 CIDRs" Associate auto IPv6 CIDR Block > Update
2. Go to VPC console > Subnets > Select subnets one by one and do following for all or yours selected one:
Actions > Edit IPV6 CIDRs > Associate auto IPv6 CIDR Block > Update
Actions > Modify Auto Assign IP Settings > Check both ipv4 and ipv6

3. Go to VPC Console > Route Tables :

Select > "Routes" Tab > Edit > Set Destination as `::/0` and select existing internet gateway.

4. Go to EC2 Console > Select Instance:

Actions > Networking > Manage IP Addreses > Associate IPV6 auto > update

5. Go to EC2 Console > Select Security Group:

Edit > Inbound/outbound > For port whom you want IPV6, set `::/0` > Save

6. IN Your domain DNS Management Add entry for AAAA against your IPV6 address. You can see IPV6 by selecting ec2 instance and in details section.

7. Logged into your EC2 instance and check inet6 address by typing following :

ifconfig | grep inet6

  If you can see your ipv6 address here then no need to follow below steps : 

Reason AWS not automatically set IPv6 address to your instance is you have probably created instance using different AMI, it may not be configured for DHCPv6. 

For Ubuntu , Follow below steps in sequence

cat /etc/network/interfaces.d/50-cloud-init.cfg

 Note down  network interface name. lets say its  eth0:

sudo vim /etc/network/interfaces.d/60-default-with-ipv6.cfg
put below content

iface eth0 inet6 dhcp 

Execute below lines :

sudo ifdown eth0 ; sudo ifup eth0
sudo dhclient -6

Now again check inet6 with ipconfig .

If you are using nginx then set following in conf file : 

listen       [::]:80 default_server;

If using apache set following in conf file :

Listen [::]:80

And restart : 
service nginx/apache2 restart

How its working for you guys. leave comment if its not. 

Currently unrated

Comments

There are currently no comments

New Comment

required

required (not published)

optional

required

captcha

required