I don't believe that you can disable IPv6 "completely" in the firmware image and many of the packages no longer have "IPv6 enable" flags.
There are perhaps a couple packages you could remove, like odhcpd6
, but most are now "dual stack". At this point in time, Linux libraries generally support both IPv4 and IPv6, so there typically isn't a lot of "wasted space" in two code paths like there was many years ago.
I only see a handful of "toggles" in .config
matching IPv6 (of any case). CONFIG_BUSYBOX_DEFAULT_FEATURE_IPV6=y
is there, but it's nearly impossible to replace busybox
without a complete reflash and really easy to mess things up trying to do so.
If you want to disable IPv6, you could add to /etc/sysctl.conf
or a file in /etc/sysctl.d/
net.ipv6.conf.all.disable_ipv6=1
net.ipv6.conf.default.disable_ipv6=1
which will "turn it off" for the kernel and associated drivers. I recently ran into a program that would fail to run unless the loopback interface had its IPv6 address, so I also add
net.ipv6.conf.lo.disable_ipv6=0
When I do this, I do it with two files in /etc/sysctl.d/
, something like
10-disable-ipv6.conf
11-enable-lo-ipv6.conf
so I can easily tell what I've modified.