How do I set up IPv6 on my server?

~ 0 min
25.07.2021 05:02

To set up Ipv6 on your server, you need the IPv6 information from your ZKM:

Attention: Please use only the IPv6 fe80::1 as gateway!

Debian / Ubuntu since 18.04:

Log in on the server as user root and open the network configuration with:

nano /etc/netplan/config.yaml

Add the following line under "addresses" if your IPs are listed seperately:

- <IPv6 address>/64 # An address from your /64 IPv6 subnet

Add the the IP like this if your IPs are listed in square brackets:

addresses: [ 127.0.0.1/32, 2001:cccc:ffff:dddd::1/64 ]

Debian / Ubuntu up to 16.04:

Log in on the server as user root and open the network configuration with:

nano /etc/network/interfaces

Add the following lines there:

iface enp1s0f0 inet6 static
   address <Eine IP aus Ihrem /64 Subnetz>
   netmask 64
   gateway fe80::1

*** Important ***
Please change the name of the network device (enp1s0f0) if necessary. This is already in the configuration. You can find an example in the screenshot:

Save with CTRL + O and close nano with CTRL + X.

It is best to restart the entire server. If this is not possible, you can also restart only the network with the following command:

service networking restart

 

CentOS

Log in to the server as root user and open the network configuration:

nano /etc/sysconfig/network-scripts/ifcfg-eth0

*** Important: The name of the device eth0 can be different, please check this with "ip addr" ***

There you compare all the already preset settings with the ones below and adjust them if necessary. All missing lines must be added and others that start with IPV6 can be removed.

IPV6INIT=yes
IPV6ADDR=<IPV6 Adresse><Prefix z.B. /64>
IPV6_DEFAULTGW= fe80::1
IPV6_DEFAULTDEV=<Interface z.B. enp5s0 oder eth0>

Save with CTRL + O, close with CTRL + X

It is best to restart the entire server afterwards, or at least the network if this is not possible:

service network restart

The configuration can be checked with the command ifconfig.

 

Windows

Log in to the server as user administrator.

Please press START at the bottom left of your task bar. There you will find the item "Run". Enter cmd there.

A black window with white text opens (command prompt or also called Windows shell). Enter the following commands there:

netsh interface ipv6 add address store=persistent
netsh interface ipv6 add route ::/0 fe80::1 store=persistent

Check the setting with the following command:

ipconfig -all

test IPv6 

To test if the IP address is correctly reachable you can proceed as follows:

1. ping the configured IP address on your server. If the server cannot reach the address configured on it, something is wrong. A ping on the IP v6 address can be done with the console command:

ping -6 <IP address>

2. ping the IP address of the gateway from the server, as this is usually outside of your own network, so you can see if there is a problem with the routing.

3. ping an external address e.g. 2a00:1450:4001:814::200e this is an address from Google that was set up exactly for this test purpose.

4. try to reach your server from outside via IPv6 If your computer does not have an IPv6 address at home, you can use an online ping service such as www.subnetonline.com/pages/ipv6-network-tools/online-ipv6-ping.php.

 

Average rating 1.87 (15 Votes)

You can comment this FAQ

Gravatar
Andreas (18.12.2020 09:51)
Guten Tag,



leider kann ich mit Hilfe dieser Anleitung keine IPv6 Adresse einstellen show morebzw. den Server erreichbar machen.



Bitte überarbeiten Sie die FAQ so dass auch "nicht" Netzwerk Administratoren diese einfach umsetzen können.



Vielen Dank
Gravatar
Joachim (18.01.2021 14:26)
Das Tutorial sollte für Ubuntu 20.04 erweitert werde da dort standardmäsig netplan benutzt wird.

netplan.io/
show more/>