Adding IPv6 to existing server (DigitalOcean)

While creating the server I didn’t add any IPv6 address. Later from the Control Panel I enabled IPv6 but the address didn’t get attached to ETH0.

Needed to do:

  • Edit the /etc/network/interfaces.d/50-cloud-init.cfg file
  • Add
# control-alias eth0
iface eth0 inet6 static
address 2400:xxxx:xxxx:xxxx:xxxx:xxxx:0000:6001/64
gateway 2400:xxxx:xxxx:xx::x
autoconf 0
dns-nameservers 2001:xxxx:xxxx::xxxx 2001:xxxx:xxxx::xxxx
  • The gateway and nameservers are important.
  • The NameServers are that of the server provider

Leave a Reply