Adding IPV6 on Debian or Ubuntu

Please note:

Edit the file eth0 (or similar) config file,

nano /etc/network/interfaces

If your network interface isn't eth0, you can find it by checking,

ifconfig    (or)    ifconfig -a

If using Ubuntu, the interface name may be ens3 (You can verify this with the command ifconfig -a)

  1. Replace INTERFACE with the value from the ifconfig output,
  2. Information for the IPv4_Address/Netmask/Gateway and IPv6_Address/Netmask/Gateway can be found from CrownPanel. Click here to know how
  3. Note IPv6_Netmask is either 48 or 64, do not add the "/" as shown in the panel.

And then add/edit the following to the file,

auto INTERFACE
iface INTERFACE inet static
address IPv4_Address
netmask IPv4_Netmask
gateway IPv4_Gateway

iface INTERFACE inet6 static
address IPv6_Address
netmask IPv6_Netmask
gateway IPv6_Gateway
dns-nameservers 2001:4860:4860::8844 2001:4860:4860::8888 

Save and exit the file.

systemctl restart networking