IPv6 Setup for Linux/Windows

This article shows you how to setup your IPv6 subnet on Debian, CentOS, FreeBSD and Windows.

All our servers are delivered with a single IPv4, and a /48 IPv6-subnet. Your IPv6-subnet is statically routed for best support.

In this example, your subnet is:

2a03:94e0:1000::/48

Removal of dibbler-client

We need to make sure that you do not have dibbler-client installed on your server before proceeding.

For Ubuntu/Debian

apt-get purge dibbler-client

For CentOS/RHEL

yum remove dibbler-client

For FreeBSD

pkg remove dibbler-client

Configuration files

Make sure configuration files are removed:

rm -fr /etc/dibbler
rm -fr /var/lib/dibbler

The gateway address

Your IPv6 gateway address is always the last subnet in the /40-prefix containing your /48-prefix.

Example, your subnet is 2a03:94e0:1561::/48, the gateway would be 2a03:94e0:15ff::1. Gateway is always xxFF::1.

2a03:94e0:149b::/48 - Gateway -> 2a03:94e0:14ff::1
2a03:94e0:1144::/48 - Gateway -> 2a03:94e0:11ff::1

Debian / Ubuntu

Open /etc/network/interfaces. Your IPv4 configuration will already be present in the file:

auto lo
iface lo inet loopback

auto eth0 
iface eth0 inet static
address 185.125.168.100
netmask 255.255.255.0
gateway 185.125.168.1

Add the following block

iface eth0 inet6 static
address 2a03:94e0:1000::1
netmask 48
post-up /sbin/ip -6 route add 2a03:94e0:10ff::1 dev eth0
post-up /sbin/ip -6 route add default via 2a03:94e0:10ff::1
pre-down /sbin/ip -6 route del default via 2a03:94e0:10ff::1
pre-down /sbin/ip -6 route del 2a03:94e0:10ff::1 dev eth0

You can add additional addresses by duplicating this block and change eth0 to eth0:0 and increase the number from e.g. 1 to 2.

Please note that your interface may differ from the example above. Instead of eth0 it can be e.g. ens0, or ens12930.

Save the file and restart your network by issuing service networking restart. We usually recommend a full reboot of your serviceer.

CentOS / RHEL

Open /etc/sysconfig/network and add the following:

NETWORKING_IPV6=yes

Open /etc/sysconfig/network-scripts/ifcfg-eth0 and add these lines:

IPV6INIT=yes
IPV6ADDR=2a03:94e0:1000::1/48

Open /etc/sysconfig/network-scripts/route6-eth0 and add these lines:

2a03:94e0:10ff::1 dev eth0
default via 2a03:94e0:10ff::1

Replace eth0 with your respective interface name. It may not be the same.

Save the file and restart your network by issuing service network restart. We usually recommend a full reboot of your server.

FreeBSD

Open /etc/rc.conf and add these lines:

ipv6_activate_all_interfaces="YES"
ipv6_defaultrouter="2a03:94e0:10ff::1"
ifconfig_em0_ipv6="inet6 2a03:94e0:1000::1 prefixlen 40"

Replace em0 with your respective interface name. It may not be the same.

Windows

Go to your servers Control Panel and your network cards Properties.

Choose IPv6 and press Properties.

![alt text](http://docs.terrahost.no/images/ipv61.JPG "1")

Configure your IPv6 as shown below

![alt text](http://docs.terrahost.no/images/ipv62.JPG "1")
Last updated on 31st Jul 2019