Updated: 28 September 2026 · Applies to: NetworkManager 1.54 and 1.56 on AlmaLinux and Rocky Linux 9 and 10 and RHEL 9 and 10; netplan on Ubuntu 24.04 and 26.04; sysctl on all

Sometimes IPv6 must be off on one network interface only, for example an internal interface where IPv6 causes unwanted autoconfigured addresses, while the public interface keeps it. Switch it off per interface rather than for the whole system: disabling IPv6 globally can break software that expects the loopback address ::1.

AlmaLinux, Rocky Linux and RHEL (NetworkManager)

  1. Find the connection of the interface: nmcli -f NAME,DEVICE connection show
  2. Disable IPv6 for it and re-activate it:
    nmcli connection modify "eth1" ipv6.method disabled
    nmcli connection up "eth1"
    This briefly interrupts traffic on that interface.
  3. Check: ip -6 addr show dev eth1 should list no addresses.

This is stored with the connection and survives reboots. Undo it with ipv6.method auto.

Ubuntu (netplan)

In the interface's section of your netplan file, turn off both automatic configuration and the link-local address:

    eth1:
      dhcp6: false
      accept-ra: false
      link-local: []

Apply with netplan try. The default for link-local is [ ipv6 ]; an empty list stops the automatic fe80:: IPv6 address. We checked the generated network configuration on Ubuntu 24.04: it contains LinkLocalAddressing=no and IPv6AcceptRA=no.

Any distribution: sysctl

echo "net.ipv6.conf.eth1.disable_ipv6 = 1" > /etc/sysctl.d/90-no-ipv6-eth1.conf
sysctl --system

This switches IPv6 off in the kernel for that interface. The setting is applied at boot; if the interface appears later than that (for example a VLAN or USB adapter), the network manager method above is more reliable.

Things to know

  • Use the interface name as the system shows it (ip -br link); names such as eno1 or enp3s0 are common on physical servers.
  • If a service still listens on IPv6, check its own settings too (for example ListenAddress in SSH or listen in Nginx).

Official documentation: NetworkManager ipv6 settings, Netplan YAML reference and IP sysctl settings.

Ucartz services for this topic

Was this answer helpful? 0 Users Found This Useful (0 Votes)