What is the "proper" way to completely disable IPv6?
SlackwareThis Forum is for the discussion of Slackware Linux.
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Support for IPv6 can be disabled in the kernel, assuming you build your own. That would be the most basic level and none of the configurations in user-space would matter. But it is also the most inconvenient, since it would require a kernel rebuild to re-enable support.
You can add blacklist ipv6 to your blacklist.conf ( /etc/modprobe.d/blacklist.conf)
# Listing a module here prevents the hotplug scripts from loading it.
# Usually that'd be so that some other driver will bind it instead,
# no matter which driver happens to get probed first. Sometimes user
# mode tools can also control driver binding.
I think what he wants is a "do not do any configuration of IPv6 from user space" solution. In other words, what configuration will be sure the init scripts do no ifconfig settings to configure IPv6, do neighbor discovery and router discovery, etc. Unfortunately, I think some of IPv6 is in the kernel and activates by default, such as link local address binding when an interface is brought up (though I have found one can go remove the link local address afterwards).
If you want named to only use IPv4 addresses (so, not any IPv6 addresses), then the "-4" option sounds right (I use that on ssh at times). That is not the same as disabling IPv6 on the interfaces or in the whole network stack. I suspect, eventually, IPv6 will be considered as "hard core" as IPv4, and it can't be easily removed. Maybe we're there, now. I have it on, am using it internally, and it's fine for me. If you need to turn it off due to an issue it seems to be causing, hopefully you are raising that issue, too. If it's just to do things like test program behavior under an IPv4-only condition, you'd probably need to reconfigure not just the kernel, but development libraries, too. Hopefully, in the near future there will be no need for testing in such a legacy environment.