New Customers: 50% OFF Your First Month on All VPS Servers & Web Hosting Plans!

Ipv6 support

IPv6 on a VPS requires three things: an IPv6 address and default route, firewall configuration, and DNS AAAA records. This guide covers configuration on Ubuntu 24.04 using Netplan and AlmaLinux 9 using NetworkManager, including safe testing and link-local gateway handling.

Rhys CallowayLinux VPS, servers, security and the command line 8 min read Updated 23 Sep 2026 AlmaLinux 9, Ubuntu 24.04

IPv6 support

IPv6 on a VPS means three things: your server has an IPv6 address and default route, your firewall handles IPv6, and your DNS publishes AAAA records if you want a hostname to resolve over IPv6. On Ubuntu 24.04 this is configured with Netplan. On AlmaLinux 9 this is configured with NetworkManager.

Before you start

  • Check your Hostworld VPS has an IPv6 allocation. You manage the VPS in Virtualizor from the Hostworld client area. Look for the IPv6 address and gateway that are assigned to your VPS. If you cannot see any IPv6 details for your VPS, open a support ticket and we will add or confirm them.
  • Plan for remote access while you change networking. On Ubuntu, use Netplan’s safety mode so you do not lock yourself out. The command is netplan try. It applies the change then rolls back automatically if you do not confirm within a timeout. If things go wrong, use the VNC console in Virtualizor to get back in.
  • Know how your upstream gateway is presented. If the gateway Hostworld gives you is link‑local (starts with fe80::), Linux needs the route tied to your interface. Netplan does this with on-link: true in a routes block. The ip tool shows the equivalent with dev <iface> on a route.
  • Avoid deprecated keys in Netplan. gateway6 is marked deprecated. Use a default route under routes: with to: default and via:.
  • Do not block essential ICMPv6. IPv6 relies on ICMPv6 for Router Advertisements, Neighbour Discovery and path MTU discovery. Blocking these often breaks IPv6 in confusing ways. UFW must be IPv6‑enabled on Ubuntu. Firewalld on AlmaLinux must not block essential ICMPv6 types.
  • Respect the minimum IPv6 MTU of 1280 bytes. Do not configure a lower MTU.
  • On Ubuntu cloud images, cloud‑init may regenerate /etc/netplan/50-cloud-init.yaml. Either disable cloud‑init networking or add your own separate Netplan file so your changes persist. Netplan merges files in /etc/netplan/.
  • If you want your hostname to answer over IPv6, you must publish AAAA records in DNS. cPanel’s Zone Editor supports AAAA records. If your domain is registered elsewhere, set the nameservers there to Hostworld’s: ns1.serverworld.uk, ns2.serverworld.uk, ns3.serverworld.uk, ns4.serverworld.uk.

Step 1: Gather the IPv6 details for your VPS

Collect the IPv6 address and prefix length, and the IPv6 gateway. These come from Hostworld. If your gateway is link‑local it will look like fe80::xxxx. You will also want DNS resolver addresses. Netplan and NetworkManager both accept IPv6 and IPv4 DNS addresses.

If you do not have these details, open a support ticket and tell us the VPS you want IPv6 on. We will confirm the exact address, prefix and gateway to use.

Step 2: Configure static IPv6 on Ubuntu 24.04 with Netplan

Netplan is Ubuntu’s network configuration system. You define addresses and default routes in YAML. Default gateways must be declared as routes. Netplan’s documentation shows IPv6 default routes under a routes block with on-link: true when the gateway is link‑local.

  1. Create a dedicated Netplan file for IPv6 so cloud‑init does not overwrite it.

    This command opens a text editor to create a new Netplan file.

    Ubuntu 24.04

    sudo nano /etc/netplan/10-ipv6.yaml

    Paste a configuration like this, replacing the interface name, IPv6 address, prefix, gateway and DNS addresses with the values Hostworld gave you. The interface name must match your server, for example ens3 or eth0.

    network:
      version: 2
      renderer: networkd
      ethernets:
        <your-interface>:
          addresses:
            - 2001:db8:1234:5678::100/64
          nameservers:
            addresses:
              - 2001:db8::53
              - <another-dns-ipv4-or-ipv6>
          routes:
            - to: default
              via: fe80::1
              on-link: true
          accept-ra: false
    • addresses: your static IPv6 address with CIDR prefix length.
    • nameservers: put your resolver IPs here. IPv4 and IPv6 are both allowed.
    • routes: a default route via your IPv6 gateway. Use on-link: true when the gateway is link‑local.
    • accept-ra: false: disable Router Advertisements when you are using a static IPv6 configuration. If you need to use RA as well as static settings on this interface, set accept-ra: true.
  2. Test the configuration without risking a lockout.

    This command applies the Netplan change temporarily and will roll it back automatically if you do not confirm. Keep your SSH session open and be ready to confirm.

    Ubuntu 24.04

    sudo netplan try

    Confirm when asked. If you lose connection and cannot confirm in time, Netplan will revert the change after the timeout. If you do get stuck, use the VNC console in Virtualizor to regain access, then correct the file.

  3. Apply the configuration permanently once you are happy it works.

    This command applies your Netplan configuration persistently.

    Ubuntu 24.04

    sudo netplan apply

Step 3: Configure static IPv6 on AlmaLinux 9 with NetworkManager

AlmaLinux 9 uses NetworkManager and keyfile connection profiles by default. The old ifcfg files are deprecated. You add IPv6 addresses, gateway and DNS to the active connection profile with nmcli.

  1. Identify the NetworkManager connection you want to edit.

    This command lists connection profiles known to NetworkManager so you can note the connection name.

    AlmaLinux 9

    nmcli connection show
  2. Add the static IPv6 address, gateway and DNS to that connection.

    This command sets IPv6 to manual, adds your static address and prefix, sets the gateway, and configures DNS for the connection.

    AlmaLinux 9

    sudo nmcli connection modify <connection-name> \
      ipv6.method manual \
      ipv6.addresses 2001:db8:1234:5678::100/64 \
      ipv6.gateway <your-ipv6-gateway> \
      ipv6.dns "2001:db8::53 <another-dns-ipv4-or-ipv6>"

    After modifying, bring the connection up to apply the change.

    This command activates the updated connection.

    AlmaLinux 9

    sudo nmcli connection up <connection-name>

    If the gateway Hostworld gave you is link‑local (it starts with fe80::), do not assume a working default route has appeared. Check it, as described in Step 6: run ip -6 route and confirm there is a default route on the interface you expect, then ping the gateway. If there is no default route, or the route exists but nothing answers, open a support ticket with the output of ip -6 route and we will confirm the correct addressing and route from our side.

Step 4: Enable and adjust the firewall for IPv6

IPv6 must be handled explicitly by the host firewall. Ubuntu’s UFW needs IPv6 enabled in its defaults file. Firewalld on AlmaLinux should not block essential ICMPv6 types. ICMPv6 is required for Router Advertisements, Neighbour Discovery and path MTU discovery.

Ubuntu 24.04: enable IPv6 in UFW

  1. Enable IPv6 support in UFW’s configuration.

    This command changes the UFW defaults so IPv6 firewalling is enabled.

    sudo sed -i 's/^IPV6=.*/IPV6=yes/' /etc/default/ufw
  2. Reload UFW to apply the setting.

    This command reloads UFW with the updated configuration.

    sudo ufw reload
  3. Confirm UFW status.

    This command shows whether UFW is active and the current rules.

    sudo ufw status verbose

    Keep essential services allowed. Avoid rules that drop core ICMPv6 traffic. UFW relies on the kernel’s IPv6 stack, and blocking ICMPv6 can break routing and PMTU.

AlmaLinux 9: verify firewalld does not break IPv6

  1. Check if you are blocking any ICMP types.

    The first command lists the ICMP types blocked in the running configuration. The second lists the ones stored in the permanent configuration.

    sudo firewall-cmd --list-icmp-blocks
    sudo firewall-cmd --permanent --list-icmp-blocks

    Check both. A block can exist in the permanent configuration without being active right now, in which case it comes back on the next reload or reboot and the runtime list alone will not warn you.

  2. Remove any blocks on essential ICMPv6.

    These commands remove blocks on Router Advertisements, Neighbour Solicitation, Neighbour Advertisement and Packet Too Big if they were present. Firewalld’s type names use the British spelling, which you can confirm with firewall-cmd --get-icmptypes.

    sudo firewall-cmd --permanent --remove-icmp-block=router-advertisement
    sudo firewall-cmd --permanent --remove-icmp-block=neighbour-solicitation
    sudo firewall-cmd --permanent --remove-icmp-block=neighbour-advertisement
    sudo firewall-cmd --permanent --remove-icmp-block=packet-too-big
  3. Reload firewalld to apply changes.

    This command reloads firewalld rules.

    sudo firewall-cmd --reload

Firewalld provides predefined services and ICMP types you can manage. The Red Hat documentation covers these in detail, and notes that DHCPv6 client handling is part of the defaults. The important point is that ICMPv6 necessary for IPv6 operation should not be blocked.

Step 5: Publish AAAA DNS records in cPanel and point your domain at Hostworld

If you want a hostname like www.example.com to resolve over IPv6, you must publish AAAA records. You manage DNS for Hostworld web hosting in cPanel.

  • In cPanel, open Zone Editor for your domain and add an AAAA record with the hostname and your server’s IPv6 address. The Zone Editor supports AAAA records.
  • At your domain registrar, set the nameservers to Hostworld’s:
    • ns1.serverworld.uk
    • ns2.serverworld.uk
    • ns3.serverworld.uk
    • ns4.serverworld.uk

After nameserver changes, DNS propagation is external to Hostworld and can take time at the registrar’s side. You can add AAAA records in cPanel at any time once the domain is delegated to Hostworld.

Step 6: Test IPv6 connectivity

  1. Check your IPv6 routing table.

    This command shows the kernel’s IPv6 routes. Look for a default route via your gateway, on the interface you expect.

    Ubuntu 24.04 and AlmaLinux 9

    ip -6 route
  2. Ping your IPv6 gateway.

    This command sends IPv6 pings to your gateway. Replace the address with the gateway Hostworld gave you.

    Ubuntu 24.04 and AlmaLinux 9

    ping -6 fe80::1%<your-interface>

    If your gateway is link‑local, scope it to the correct interface with %<your-interface> so the kernel knows which NIC to use.

  3. Ping an external IPv6 address.

    This command sends IPv6 pings to an external IPv6 host. Replace with a known external IPv6 address or hostname that has AAAA records.

    Ubuntu 24.04 and AlmaLinux 9

    ping -6 <remote-ipv6-or-hostname-with-aaaa>

    On recent Ubuntu releases, ping with -6 is the right tool. ping6 is a symlink that behaves the same.

Step 7: Troubleshoot common IPv6 pitfalls

  • Netplan changes rolled back or no route:
    • Use sudo netplan try first so you do not lose access.
    • Ensure you used a default route under routes: with to: default and via:. Do not use gateway6. It is deprecated.
    • If your gateway is link‑local, include on-link: true in the route.
    • If you need Router Advertisements alongside static config, set accept-ra: true on that interface in Netplan when using the networkd backend.
  • NetworkManager profile not applying:
    • Confirm the connection name with nmcli connection show and that you modified the right one.
    • Activate the profile with sudo nmcli connection up <connection-name>.
    • Check the result with ip -6 route rather than assuming the profile took effect.
  • IPv6 appears disabled:
    • On AlmaLinux, NetworkManager can disable IPv6 per connection or system‑wide by setting kernel sysctls. Check for unexpected disables.
    • This command prints the system‑wide IPv6 disable flag. 0 means enabled.
    • Ubuntu 24.04 and AlmaLinux 9

      sysctl net.ipv6.conf.all.disable_ipv6
  • Firewall blocking IPv6:
    • On Ubuntu, ensure IPV6=yes in /etc/default/ufw and reload UFW. Avoid rules that drop ICMPv6.
    • On AlmaLinux, check both the runtime and permanent ICMP block lists, remove blocks for Router Advertisements, Neighbour Solicitation, Neighbour Advertisement and Packet Too Big, then firewall-cmd --reload.
  • Cloud‑init overwrote your Netplan file:
    • Do not edit /etc/netplan/50-cloud-init.yaml directly on cloud images if you want changes to persist. Either disable cloud‑init networking or add your own file, for example /etc/netplan/10-ipv6.yaml.

What next

If you are putting IPv6 into production on a new VPS, browse our VPS guides for hardening, updates and SSH configuration. Our UK VPS run from our own data centre in Maidenhead, Berkshire, and our US VPS from New York.

If you want us to check or to allocate IPv6 to your existing Hostworld VPS, please open a support ticket and include the VPS name and what you want to achieve. We will confirm the correct addressing and route on our side.

Common questions

Do I even need IPv6 on my VPS?

If your applications work fine over IPv4 and you do not have clients that require IPv6, you may not need it. If you want your services reachable over IPv6 or you need outbound IPv6 connectivity, configure it following the steps above and publish AAAA records for hostnames you want to resolve over IPv6.

Is “ping6” required on Ubuntu 24.04?

No. Use ping with -6. ping6 is commonly a symlink to ping and provides the same functionality.

Why does my Ubuntu route not work with gateway6?

Netplan marks gateway6 as deprecated. Define a default route under routes: with to: default and via:. If your gateway is link‑local, add on-link: true. Then use sudo netplan try to test safely.

My gateway is fe80::… and I get “No route to host”. What did I miss?

Link‑local gateways require the egress interface to be specified. In Netplan use a default route with on-link: true. The equivalent low‑level route would include dev <iface>. On AlmaLinux using NetworkManager, ensure the gateway is configured on the correct connection and then activate that connection.

Do I need to change anything in DNS for IPv6?

For hostnames to resolve over IPv6 you must add AAAA records with your IPv6 address. In Hostworld web hosting, add AAAA records in cPanel’s Zone Editor. If your domain is registered elsewhere, set its nameservers to Hostworld: ns1.serverworld.uk, ns2.serverworld.uk, ns3.serverworld.uk and ns4.serverworld.uk.