How to configure IPv6 with Netplan on Ubuntu 18.04

Estimated reading time: 2 min


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

    version: 2  
    renderer: networkd  
            accept-ra: no        
                addresses: [,]


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.

Before changing the configuration file it’s recommended to check for syntax errors. This can be checked with

netplan try

You can also apply the changes without checking on syntax error

netplan apply

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


ping6 2a00:7b80:451:1::8


ping6 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.

Was this article helpful?
Dislike 7
Views: 4156

Reader Interactions

Leave a Reply

Your email address will not be published. Required fields are marked *