Setup ipv6 on Dedi box with Ubuntu 18.04

Okay , so it’s not so easy to always get the ipv6 on dedi working. So i decided to write a tutorial for it.


This is for Ubuntu 18.04.




  1. Edit the following file: /etc/dhcp/dhclient6.conf
  2. Put the following inside where DUID is what you get from console and enp2s0 is your networking device:
    interface "enp2s0" {
       send dhcp6.client-id DUID;
  3. Check that the client gets the config from router:
    dhclient -cf /etc/dhcp/dhclient6.conf -6 -P -v enp2s0

    If the path of the dhclient is different can be found via: which dhclient

  4. Now we need to configure the network for ipv6
  5. Edit the netplan config

    cd /etc/netplan
    # This file describes the network interfaces available on your system
    # For more information, see netplan(5).
      version: 2
      renderer: networkd
          dhcp4: yes
          dhcp6: no
          - 2001:xxxxxxx/64


  7. then:
    netplan apply
  8. Ping test:
    PING 56 data bytes
    64 bytes from icmp_seq=1 ttl=58 time=0.954 ms
    64 bytes from icmp_seq=2 ttl=58 time=0.961 ms
    64 bytes from icmp_seq=3 ttl=58 time=0.938 ms


  9. If config doesnt work edit: /etc/sysctl.conf




Leave a Reply

Your email address will not be published.