How to Add IPv6 connectivity to your server

[vc_row][vc_column][vc_column_text]On the servers provided by WebHostingPeople an IPv6 address is already preconfigured. However on some servers the IPv6 connectivity still has to be activated. If your server can not establish a IPv6 connection, please perform the following steps:

Linux

  • Connect to your server via SSH
  • Execute the following command with root rights:
    enable_ipv6
  • Reboot your server

Windows

  • Connect to your server via RDP with the administrator account
  • Open the command prompt by pressing the Windows+R keys and typing “cmd”
  • Execute the following command:
    reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters" /v DisabledComponents /t REG_DWORD /d 0x00 /f
  • Reboot your server

If your operating system was not installed by us, e.g. because it is a colocation device or it was installed manually by you, the necessary information needs to be added to your system manually. The following guide should give you enough information to get IPv6 up and running on your server.

At this time, the following additional information is valid for every IPv6 enabled server:

Netmask / Prefix length: 64 Gateway: fe80::1

For servers with a /64 network starting with “2a02:c205”, please use the following IP addresses as resolving name servers:

Resolver/DNS server 1: 2a02:c205::1:53 Resolver/DNS server 2: 2a02:c205::2:53

For servers with a /64 network starting with “2a02:c207”, please use the following IP addresses as resolving name servers:

Resolver/DNS server 1: 2a02:c207::1:53 Resolver/DNS server 2: 2a02:c207::2:53

Initial configuration (Linux-based operating systems)

Before adding this IPv6 address to your configuration files and thus making the changes persist after a server reboot, you might want to configure it manually. I will use the IPv6 address 2001:db8::1 in this example. Please replace it with the appropriate address assigned to the server in question. If your network card is not eth0, you will have to replace “eth0” with the appropriate value, too.

Add the address to the server’s network interface in the format /:

ip addr add 2001:db8::1/64 dev eth0

You can validate that the address has been enabled by running

ip -6 addr show

which should show, among others, the following lines:

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qlen 1000 inet6 2001:db8::1/64 scope global valid_lft forever preferred_lft forever

In order to reach everyone else in the ever growing IPv6 world, add a default route to the server’s configuration:

ip route add default via fe80::1 dev eth0

Again, you can verify the setting by running

ip -6 route show

which should show the following output:

default via fe80::1 dev eth0 metric 1024 mtu 1500 advmss 1440 hoplimit 4294967295

You can now check your IPv6 connectivity by using the ping6 command:

ping6 2a02:c205:0:5001::1

Making things persist (Linux-based operating systems)

Different operating systems have different ways of setting up the network configuration. If in doubt, please search the documentation for your operating system. Sample configurations for Debian/Ubuntu and CentOS/Fedora/RedHat will be provided here. Please be very careful when applying these changes. Errors may result in your server no longer responding to any network traffic at all!

Debian / Ubuntu till 17.04

Edit the file /etc/network/interfaces and add the following lines:

iface eth0 inet6 static address 2001:db8::1 netmask 64 gateway fe80::1 accept_ra 0 autoconf 0 privext 0

Ubuntu 17.10 and above

Ubuntu is using Netplan since version 17.10. To configure IPv6, please add the required address as shown in the example bellow into your /etc/netplan/01-netcfg.yaml. Please also add the entry for “gateway6”. The usage of correct indentations is important. Please leave the other entries, for example “macaddress”, the way they are.

network: version: 2 renderer: networkd ethernets: eth0: match: macaddress: 00:50:56:3d:c3:aa addresses: - 207.180.193.3/32 - 2001:0db8::1/64 gateway6: fe80::1 routes: - to: 0.0.0.0/0 via: 192.51.100.1 on-link: true nameservers: search: [ invalid ] addresses: - 79.143.183.251 - 79.143.183.252 - 2a02:c205::1:53 - 2a02:c205::2:53

CentOS / Fedora / RedHat

Make sure IPv6 networking is enabled at all by editing /etc/sysconfig/network. Add the following line to this file:

NETWORKING_IPV6=yes

Then add the IP configuration to the file /etc/sysconfig/network-scripts/ifcfg-eth0

IPV6INIT = "yes" IPV6ADDR = "2001:db8::1/64" IPV6_DEFAULTGW = "fe80::1" IPV6_DEFAULTDEV = "eth0"

This should make sure the IPv6 address gets enabled again after your server reboots.

Configuration steps for Windows Server operating systems

After you have connected to your server using RDP, click on “Start” > “Control Panel” > “Network and Internet” > “Network and Sharing Center”. Click on “Change Adapter Settings” on the left side of the window. Right-click the icon for the network connection, select “Properties” from the menu:

IPv6-Windows-1

Highlight the entry “Internet Protocol Version 6 (TCP/IP)” on the list, make sure that the checkbox is ticked and click on “Properties” again. Enter the information you gathered from step one as shown below:

IPv6-Windows-2

Click on “OK”, to close the dialogues and save the changes.

Still cannot reach your server via IPv6?

If you have made the changes as described above and if the ping6 command did return a response but you nevertheless cannot reach your server via IPv6 from your local computer, chances are that IPv6 might not yet be enabled in your local network. Your local ISP can help in this case.[/vc_column_text][/vc_column][/vc_row]

Configuring additional IP addresses in Server

[vc_row][vc_column][vc_column_text]Upon ordering a Dedicated Server or VPS you will receive one IPv4 address and one /64 IPv6 subnet. As an example, this could be the IPv4 address 192.51.100.10 and the IPv6 subnet 2001:0db8:2a02:c200::/64.

Your server comes pre-configured with this IPv4 (192.51.100.10) and one IPv6 address (2001:0db8:2a02:c200:0000:0000:0000:0001). Additional IPv4 addresses can be ordered by contacting us at [email protected] or through our homepage when placing an order for a new server. These additional IPv4 addresses will not be added to your system automatically but will have to be configured manually.

The following will give an overview on how to configure additional IP addresses on the most popular operating systems. The server used in these examples has the primary IPv4 address 192.51.100.10 and will receive the additional IPv4 addresses 192.51.100.42 and 192.0.2.23. As a general rule we recommend configuring these addresses with a netmask of 255.255.255.255 (/32) and /64 respectively and without adding a new gateway.

Arch Linux

The network configuration file of Arch Linux is stored under /etc/systemd/network/eth0_STATIC.network. For configuring additional IPv4 addresses, it is sufficient to add further Address= entries at the end of the file.

#/etc/systemd/network/eth0_STATIC.network [Match] Name=eth0 [Network] Address=2001:0db8:2a02:c200:0000:0000:0000:0001/64 Gateway=fe80::1 DNS=2a02:c207::1:53 Address=192.51.100.10/24 Gateway=192.51.100.1 DNS=213.136.95.11 DNS=213.136.95.10 Address=192.51.100.42/32 Address=192.0.2.23/32

Further IPv6 addresses can be added similarly:

#/etc/systemd/network/eth0_STATIC.network ... Address=2001:0db8:2a02:c200:0000:0000:0000:0002/64 Address=2001:0db8:2a02:c200:0000:0000:0000:0003/64 ...
To apply the changes, reboot your server.

CentOS 6.x

CentOS has all its network interface configuration files stored in /etc/sysconfig/network-scripts/. In order to configure additional IPv4 addresses, one virtual interface per additional IPv4 address has to be created. If the main interface is e.g. eth0, the virtual interfaces would be named eth0:0eth0:1eth0:2 and so on. Their configurations reside in individual configuration files named ifcfg-eth0:0ifcfg-eth0:1ifcfg-eth0:2 receptively.

#/etc/sysconfig/network-scripts/ifcfg-eth0:0 DEVICE="eth0:0" BOOTPROTO="none" ONBOOT="yes" IPADDR="192.51.100.42" NETMASK="255.255.255.255"

#/etc/sysconfig/network-scripts/ifcfg-eth0:1 DEVICE="eth0:1" BOOTPROTO="none" ONBOOT="yes" IPADDR="192.0.2.23" NETMASK="255.255.255.255"

Additional IPv6 addresses can be specified using the variable IPV6ADDR_SECONDARIES in the interface’s primary configuration file (/etc/sysconfig/network-scripts/ifcfg-eth0 in case of eth0). Multiple addresses are separated by a white space:

#/etc/sysconfig/network-scripts/ifcfg-eth0 ... IPV6ADDR_SECONDARIES="2001:0db8:2a02:c200:0000:0000:0000:0002/64 2001:0db8:2a02:c200:0000:0000:0000:0003/64" ...

To apply the changes, reboot your server.

CentOS 7.x / Fedora

The network interface configuration files of both CentOS 7.x and Fedora are stored under /etc/sysconfig/network-scripts/. Additional IPv4 addresses can be added to the respective interface’s configuration file by using variables of the pattern IPADDR0IPADDR1IPADDR2 and PREFIX0PREFIX1PREFIX2 etc., in case of e.g. eth0 this would be /etc/sysconfig/network-scripts/ifcfg-eth0:

#/etc/sysconfig/network-scripts/ifcfg-eth0 ... IPADDR0="192.51.100.42" PREFIX0="32" IPADDR1="192.0.2.23" PREFIX1="32" ...

The old method using virtual interfaces as employed in CentOS 6.x and described above will also still work.

Additional IPv6 addresses can be specified using the variable IPV6ADDR_SECONDARIES in the interface’s primary configuration file (/etc/sysconfig/network-scripts/ifcfg-eth0 in case of eth0). Multiple addresses are separated by a white space:

#/etc/sysconfig/network-scripts/ifcfg-eth0 ... IPV6ADDR_SECONDARIES="2001:0db8:2a02:c200:0000:0000:0000:0002/64 2001:0db8:2a02:c200:0000:0000:0000:0003/64" ...
To apply the changes, reboot your server.

cPanel

With cPanel there is no need to deal with configuration files. Log in to WHM and navigate to “IP Functions” » “Add a New IP Address”. Enter the IP address, select subnet mask 255.255.255.255 and click “Submit”:

cpanel-ip

Debian / Ubuntu (until 17.04)

Debian’s and Ubuntu’s network interface configuration is stored in /etc/network/interfaces. Additional IP addresses can be assigned by adding them in separate iface sections. The following adds 192.51.100.42 and 192.0.2.23 to eth0 whose primary address is 192.51.100.10:

#/etc/network/interfaces auto eth0 allow-hotplug eth0 iface eth0 inet static address 192.51.100.10/24 gateway 192.51.100.1 iface eth0 inet static address 192.51.100.42/32 iface eth0 inet static address 192.0.2.23/32 ...

Additional IPv6 addresses are configured similarly:

#/etc/network/interfaces ... iface eth0 inet6 static address 2001:0db8:2a02:c200:0000:0000:0000:0001/64 gateway fe80::1 accept_ra 0 autoconf 0 privext 0
iface eth0 inet6 static address 2001:0db8:2a02:c200:0000:0000:0000:0002/64 ...

To apply the changes, reboot your server.

Ubuntu (17.10 and above)

In Ubuntu beginning with version 17.10, you can find the network configuration in the file /etc/netplan/01-netcfg.yaml. With this method you can assign additional IPv4 and IPv6 addresses to the interface eth0. Additionally to the main IPv4 address 192.51.100.10 and the first IPv6 address of your IPv6 network, you might configure the additional IPv4 addresses 192.51.100.42 and 192.0.2.23 and the additional  IPv6 addresses 2001:0db8:2a02:c200:0000:0000:0000:0002 and 2001:0db8:2a02:c200:0000:0000:0000:0003 in the area  addresses: below of eth0: . It is important to keep the correct indentation!

#/etc/netplan/01-netcfg.yaml
network:  version: 2  renderer: networkd  ethernets:    eth0:      match:        macaddress: 00:50:56:3d:c3:aa      addresses:        - 192.51.100.10/24        - 192.51.100.42/24        - 192.0.2.23/24        - 2001:0db8:2a02:c200:0000:0000:0000:0001/64        - 2001:0db8:2a02:c200:0000:0000:0000:0002/64        - 2001:0db8:2a02:c200:0000:0000:0000:0003/64      gateway6: fe80::1      routes:        - to: 0.0.0.0/0        via: 192.51.100.1        on-link: true      nameservers:        search: [ invalid ]        addresses:          - 79.143.183.251          - 79.143.183.252          - 2a02:c205::1:53          - 2a02:c205::2:53

To apply the changes, please enter the command below and reboot your server:
netplan apply

openSUSE

openSUSE has its network interface configuration files stored under /etc/sysconfig/network/. All settings concerning e.g. eth0 are saved in ifcfg-eth0, additional IPv4 and IPv6 addresses can be added using the pattern IPADDR_1IPADDR_2IPADDR_3 etc:

#/etc/sysconfig/network/ifcfg-eth0 ... IPADDR_1='192.51.100.42/32' IPADDR_2='192.0.2.23/32' IPADDR_3='2001:0db8:2a02:c200:0000:0000:0000:0002/64' IPADDR_4='2001:0db8:2a02:c200:0000:0000:0000:0003/64' ...
To apply the changes, reboot your server.

Windows Server 2008, 2012 and 2016

Open the “Network and Sharing Center” and click on “Local Area Connection”.

In Windows Server 2016:  Open the “Network and Sharing Center” and click on “Ethernet”.

ws2008_01

In the newly opened windows, click on “Properties”.

ws2008_02

If you want to add an additional IPv4 address, select “Internet Protocol Version 4 (TCP/IPv4)” and click on “Properties”.

ws2008_03

In the newly created windows, click on “Advanced…” and in the following one on “Add…” under “IP addresses”

ws2008_05

Enter the new IP address and its netmask into the dialog and then click “Add”.

ws2008_06

The new IP address is now active.

ws2008_07

IPv6 addresses can be added similarly by selecting “Internet Protocol Version 6 (TCP/IPv6)”:

ws2008_08

ws2008_09

ws2008_12

ws2008_13[/vc_column_text][/vc_column][/vc_row]