雨果书斋

拙笔记琐事 微语道真言

walkservers主机添加IPV6地址(官方文档)

技术 0 评

Configuring IPv6

If you are looking to utilise IPv6 connectivity with your Leaseweb server, then this guide is for you. In this guide we will cover how to configure the network interface to allow IPv6 support on your server. Please keep in mind that IPv6 is currently an unsupported feature, and as such we may be unable to fix issues arising from this.

If you have a service hosted with Hetzner, by default IPv6 is already configured and as such you do not need to follow this guide.

Step 1: Request the IPV6 address

Firstly reach out to us via ticket for your service requesting an IPv6 address. You will receive a reply that will include details similar to this:

IP: 2001:0db8:85a3::a040:5::/64
Gateway: 2001:0db8:85a3::a040:::1

Step 2: Register the IP on the server

Log in to your server via SSH then edit the interfaces configuration by executing this command: (Link to SSH tutorial).

sudo nano /etc/network/interfaces

You will be presented with a screen similar to this:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

auto eno1
iface eno1 inet static
        address 5.5.79.79
        netmask 255.255.255.0
        network 5.5.79.0
        broadcast 5.5.79.63
        gateway 5.5.79.62
        dns-search dedi.leaseweb.net
        dns-nameservers 62.212.65.123 8.8.8.8

auto eno2
iface eno2 inet dhcp
        mtu 9000

Here we need to add the IPV6 address, we will do this by adding another iface eno1 to the file. If you are on a bonded service, i.e 2x1gbit NFOrce then you will name the iface bond0 instead of eno1. The address is the IP line that walkerservers provide this is without the /64 part. The netmask is what is behind the /. The gateway is the gateway IP that walkerservers provides:

iface eno1 inet6 static
       address 2001:0db8:85a3::a040:5::
        netmask 64
        gateway 2001:0db8:85a3::a040:::1

The resulting file should resemble this, however with your provided info:

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

auto eno1
iface eno1 inet static
        address 5.5.79.79
        netmask 255.255.255.0
        network 5.5.79.0
        broadcast 5.5.79.63
        gateway 5.5.79.62
        dns-search dedi.leaseweb.net
        dns-nameservers 62.212.65.123 8.8.8.8

iface eno1 inet6 static
        address 2001:0db8:85a3::a040:5::
        netmask 64
        gateway 2001:0db8:85a3::a040:::1

auto eno2
iface eno2 inet dhcp
        mtu 9000

Press Ctrl+O and then Ctrl+X to save the file.

Step 3: Restart the network interface and test!

You can do this by restarting the server. Or by running the following command:

sudo systemctl restart networking

When running this command you will temporarily lose connection via ssh. This is normal and the connection should come return shortly.

Run this command:

ip a

You should see an output that includes this:

2: eno1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether d4:ae:52:c8:5b:a2 brd ff:ff:ff:ff:ff:ff
    inet 5.5.79.79/26 brd 5.5.79.63 scope global eno1
      valid_lft forever preferred_lft forever
    inet6 2001:0db8:85a3::a040:5::/64 scope global
      valid_lft forever preferred_lft forever
    inet6 fe80::d6ae:52ff:fec5:8ba4/64 scope link
      valid_lft forever preferred_lft forever

To confirm the IPv6 connection is working as intended execute:

ping6 ipv6.google.com

If all is working then you will see an output similar to this:

PING ipv6.google.com(ams16s32-in-x0e.1e100.net (2a00:1450:400e:80c::200e)) 56 data bytes
64 bytes from ams16s32-in-x0e.1e100.net (2a00:1450:400e:80c::200e): icmp_seq=1 ttl=117 time=0.881 ms
64 bytes from ams16s32-in-x0e.1e100.net (2a00:1450:400e:80c::200e): icmp_seq=2 ttl=117 time=0.954 ms
64 bytes from ams16s32-in-x0e.1e100.net (2a00:1450:400e:80c::200e): icmp_seq=3 ttl=117 time=0.930 ms
64 bytes from ams16s32-in-x0e.1e100.net (2a00:1450:400e:80c::200e): icmp_seq=4 ttl=117 time=0.968 ms
64 bytes from ams16s32-in-x0e.1e100.net (2a00:1450:400e:80c::200e): icmp_seq=5 ttl=117 time=0.925 ms
64 bytes from ams16s32-in-x0e.1e100.net (2a00:1450:400e:80c::200e): icmp_seq=6 ttl=117 time=0.934 ms
64 bytes from ams16s32-in-x0e.1e100.net (2a00:1450:400e:80c::200e): icmp_seq=7 ttl=117 time=0.946 ms
64 bytes from ams16s32-in-x0e.1e100.net (2a00:1450:400e:80c::200e): icmp_seq=8 ttl=117 time=0.945 ms

You can now press Ctrl+C to stop the test, your server now has IPv6 configured.

For info regarding configuring torrent clients to use IPv6 please see the “Configuring Torrent Clients for IPv6” guide under the Media Server category.

上一篇

发表评论