I've been wrestling with sysctl to get it to keep iPv6 disabled and find it works fine if I set it up like so:

$ cat /etc/sysctl.d/10-ipv6-off.conf

And then reload sysctl:

$ sysctl --system

But after rebooting I find that IPv6 gets re-enabled. How can I permanently disable IPv6?

1 Answer 1


So what ended up working in this situation was to simply tell the kernel to disable IPv6 during boot. To accomplish this I merely added this string ipv6.disable=1 to the cmdline.txt file in `/boot.

$ cat /boot/firmware/cmdline.txt
net.ifnames=0 dwc_otg.lpm_enable=0 console=serial0,115200 console=tty1 root=LABEL=writable rootfstype=ext4 elevator=deadline rootwait fixrtc ipv6.disable=1

After doing so you can confirm that the kernel no longer provides access to IPv6 by looking in this directory:

$ ls /proc/sys/net/
core  ipv4  netfilter  unix

When IPv6 is enabled, the sub-directory, ipv6 shows up in this location.

You can also check to make sure none of your NIC interfaces have inet6 on them as well:

$ ip a l | grep inet6


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.