Proxmox 9.0.11

When IPv6 Routes Fail: Understanding the “IPv6 is Disabled on Nexthop Device” Error in Proxmox

October 17, 2025 7 months ago

Important Note from Virtnet.bond

At Virtnet.bond, we do not automatically modify IPv6 settings within Proxmox templates. This is a default configuration set by the image developers. We intentionally leave it as-is to respect the original design and avoid interfering with any custom network configurations that our users may wish to implement.
This ensures that the VPS images behave consistently with the developers’ intentions while giving you full control over your network setup.

If you’ve ever reloaded your network configuration on a Linux VPS and seen something like this:

error: eth0: cmd '/bin/ip route replace default via 2a0b:4e07:8::1 proto kernel dev eth0 onlink' failed: returned 2 (Error: IPv6 is disabled on nexthop device.)

you’re not alone.
 This cryptic message often pops up when working with Proxmox, Debian, or Ubuntu systems — and it can be confusing even for experienced sysadmins.

Let’s break down what’s actually going on, why it happens, and how to fix it properly.

The Root Cause: IPv6 Disabled, But Still Configured

This error means your system is trying to set a default IPv6 route (the via 2a0b:4e07:8::1 part), but the kernel has IPv6 disabled on the relevant interface (eth0) — or even globally.

When IPv6 is disabled, the kernel refuses to handle any IPv6 routes or addresses. So when tools like ifupdown, ifreload, or iproute2 try to apply IPv6 settings, you get this failure.

Common Reasons

  1. Global IPv6 disabled via sysctl
  2. net.ipv6.conf.all.disable_ipv6 = 1
  3. Per-interface IPv6 disabled
  4. net.ipv6.conf.eth0.disable_ipv6 = 1
  5. Cloud or template configuration mismatch
    Many VPS templates include IPv6 gateway settings, even if the underlying system image has IPv6 disabled by default.
  6. Manual network edits
    Sometimes /etc/network/interfaces or /etc/netplan/*.yaml includes a gateway6 line even though IPv6 isn’t enabled yet.

The Fix: Re-enable IPv6

To fix the error and re-enable IPv6 support, apply these settings:

sysctl -w net.ipv6.conf.all.disable_ipv6=0
sysctl -w net.ipv6.conf.default.disable_ipv6=0
sysctl -w net.ipv6.conf.eth0.disable_ipv6=0

Then, make it persistent across reboots by adding the same lines to /etc/sysctl.conf:

net.ipv6.conf.all.disable_ipv6 = 0
net.ipv6.conf.default.disable_ipv6 = 0
net.ipv6.conf.eth0.disable_ipv6 = 0

Finally, reload the configuration:

sysctl -p

and reapply your network settings:

ifreload -a

Your IPv6 route should now load without errors.

Optional: Disabling IPv6 Properly (If You Don’t Need It)

If your server or customer doesn’t need IPv6 connectivity, it’s better to remove the IPv6 gateway instead of leaving IPv6 half-disabled.

In /etc/network/interfaces, look for and remove or comment out any line like this:

gateway6 2a0b:4e07:8::1

Then reload:

ifreload -a

No more IPv6 routes — and no more errors.

Why This Matters for VPS Hosts

At Virtnet.bond, we provide dual-stack VPS hosting — meaning every server gets both an IPv4 and an IPv6 address by default.

That’s great for performance and future-proofing, but it also means system templates must correctly handle IPv6. If IPv6 is disabled in sysctl while your network config expects it, you’ll see errors like this during provisioning or after reboot.

↑↓ navigate select
⌘K to toggle