From c74796de23b1ebfa3f8dbddd40a7a9b3af2e9254 Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 26 Apr 2020 00:52:12 +0200 Subject: [PATCH] Misc improvements --- ipv6.md | 41 +++++++++++++++++++++++++---------------- 1 file changed, 25 insertions(+), 16 deletions(-) diff --git a/ipv6.md b/ipv6.md index e3295791..962c1b35 100644 --- a/ipv6.md +++ b/ipv6.md @@ -1,4 +1,6 @@ -# Guide to setup IPv6 on your server. +# Setting up IPv6 + +IPv6 may work out of the box in many cases. But in some cases or some specific provider, you may need to tweak things manually to enable IPv6. ## With a VPS from OVH @@ -6,6 +8,7 @@ OVH give one IPv4 address and one IPv6 address for VPS but by default, only IPv4 The OVH's documentation is here : https://docs.ovh.com/gb/en/vps/configuring-ipv6/ ### Configure the DNS server + Here : https://yunohost.org/#/dns_subdomains ### Configure the server @@ -13,25 +16,31 @@ Here : https://yunohost.org/#/dns_subdomains On the OVH panel, you will copy two element : - the IPv6 address - the IPv6 gateway address -And you need the prefix. On OVH's VPS SSD, prefix are /128 because you have only one IPv6 address. +- the IPv6 prefix. On OVH's VPS SSD, prefixes are `/128` because you have only *one* IPv6 address. -On you're VPS create a backup of the file with : ''cp /etc/network/interfaces ~/interfaces'' in home directory. -Then, you can edit the configuration file (''/etc/network/interfaces) : +On your VPS, create a backup of the network configuration with : `cp /etc/network/interfaces ~/interfaces` in home directory. +Then, you can edit the configuration file (`/etc/network/interfaces`) with the following. It is assumed that : - iface inet6 static - address - netmask - post-up /sbin/ip -6 route add dev - post-up /sbin/ip -6 route add default via dev - pre-down /sbin/ip -6 route del default via dev - pre-down /sbin/ip -6 route del dev +
+In this example, it is assumed that your network interface is `eth0`. If it's different (check with `ip a`) you need to adapt the example below. +
-Now, save the file and restart the network service with : ''service networking restart''. +```plaintext +iface eth0 inet6 static +address +netmask +post-up /sbin/ip -6 route add dev eth0 +post-up /sbin/ip -6 route add default via dev eth0 +pre-down /sbin/ip -6 route del default via dev eth0 +pre-down /sbin/ip -6 route del dev eth0 +``` + +Now, save the file and restart the network service with : `service networking restart`. (TODO : ideally we should find a way to validate the content of the configuration, otherwise it could fuck up the network stack and get disconnected from the VPS ?) Check your configuration with these commands : -- ''ip a'' to display address with interfaces -- ''hostname -I'' to display address of the system -- do a ping to a IPv6 serveur (for example you can use yunohost.org) -- do a ping on your PC to your serveur +- `ip a` to display network interfaces and addresses +- `hostname -I` to display the system IP addresses +- try to ping an IPv6 server (for example you can use `ping ip6.yunohost.org`) +- try to ping your server from your PC (assuming your PC has IPv6 enabled) If it's ok, it's ok !