Nowadays it became more important to configure your server with IPv6 and make it accessible via IPv6. To achieve this you can use this article to configure IPv6 for your Ubuntu server.
To configure your machine, you’ll need to have a working SSH connection to the server. Because the modifications affect core system settings, you’ll need to have root privileges to make changes to the network interface. Finally, note that these instructions are for Ubuntu 18.04, so note that this version of Ubuntu switched to netplan for network configuration.
Step 1 – Contact Support for an IPv6
If you do not have an IPv6 address assigned, the first step is to send an email to [email protected] in order the get the required information for configuring your server with IPv6.
Step 2 – Log in to your server
Open a terminal and log in to your server using SSH
ssh [email protected]_address_or_domain
Step 3 – Configure network configuration
Since Ubuntu 18.04 you can use Netplan to configure your network interfaces. This is a yaml based configuration file which is used to configure the network interface of your server. In our example, our yaml file has the following name
and the filename can be different on your installation. Please inspect the configuration file below
network: version: 2 renderer: networkd ethernets: ens18: accept-ra: no addresses: - 193.33.61.xxx/24 gateway4: 184.108.40.206 nameservers: addresses: [220.127.116.11, 18.104.22.168]
Step 4 – Apply the changes
We can see that IPv4 is configured for this server. To add IPv6 we can add the IPv6 address with the prefix below the addresses also do not forget to add the IPv6 gateway. The configuration file should be similar to the config file below.
network: version: 2 renderer: networkd ethernets: ens18: accept-ra: no addresses: - 193.33.61.xxx/24 - 2a00:7b80:454:2000::xxx/48 gateway4: 22.214.171.124 gateway6: 2a00:7b80:454::1 nameservers: addresses: [126.96.36.199, 188.8.131.52]
Before changing the configuration file it’s recommended to check for syntax errors. This can be checked with
You can also apply the changes without checking on syntax error
Step 5 – Verify IPv6 on your Server
The final step is to check whether the configured IPv6 is working. If your own working station is supporting IPv6 you can test it through your terminal. You can find the commands below per Operating System.
ping -6 2a00:7b80:451:1::8
If you followed this article you should have a working IPv6 address on your server. This allows you to enable IPv6 in software which supports IPv6. For example, you can serve now Websites via IPv6 connection.