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)
- Find the connection of the interface:
nmcli -f NAME,DEVICE connection show - 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. - Check:
ip -6 addr show dev eth1should 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 aseno1orenp3s0are common on physical servers. - If a service still listens on IPv6, check its own settings too (for example
ListenAddressin SSH orlistenin Nginx).
Official documentation: NetworkManager ipv6 settings, Netplan YAML reference and IP sysctl settings.
Ucartz services for this topic
- KVM VPS hosting: NVMe SSD and full root access, with Free Basic Managed Support.
- Unmanaged dedicated servers: full root access and free IPMI KVM, with Free Basic Managed Support.
- Linux server management: hardening, patching, monitoring and automation for Ubuntu, Debian, RHEL and AlmaLinux.
