LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   What is the "proper" way to completely disable IPv6? (https://www.linuxquestions.org/questions/slackware-14/what-is-the-proper-way-to-completely-disable-ipv6-868689/)

narz 03-15-2011 06:23 AM

What is the "proper" way to completely disable IPv6?
 
Hey guys. Is simply adding "alias net-pf-10 off" to modprobe.conf enough to keep IPv6 completely dead? Should I comment out the IPv6 loopback address in /etc/hosts or anything like that?

Crashbox 03-15-2011 06:29 AM

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.

narz 03-15-2011 06:35 AM

I already build my own kernels but I still want IPv6 around for when I need it, I just want to keep it in total hiberation at the moment.

Andersen 03-15-2011 06:43 AM

You can add blacklist ipv6 to your blacklist.conf ( /etc/modprobe.d/blacklist.conf)

Quote:

#
# 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.
blacklist ipv6
That will do the trick.

Skaperen 03-15-2011 08:44 AM

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).

IPv6 doesn't exactly work the same way as IPv4.

Gerard Lally 03-15-2011 09:08 AM

I'm not sure how to do this in Slackware but on my NetBSD gateway I run named as a caching nameserver and add the "-4" flag for IPv4 traffic only.

named=YES "-4"

I'm sure there must be something similar in Slackware.

Skaperen 03-15-2011 09:34 AM

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.

timetraveler 03-15-2011 07:49 PM

There's a file called /etc/lilo.conf and you can boot to different kernels. Why not have a kernel with and a kernel without ipv6?

acummings 03-16-2011 10:49 PM

http://www.linuxquestions.org/questi...irefox-853021/

I did so on two SW 13.1 boxes, a 32 and a 64 bit box.

My reason was the Firefox web browsing being terribly balky and slow.

I created the ipv6.conf with the blacklist ipv6 in it. Firefox web browsing on both boxes works fine now.

--
Alan.


All times are GMT -5. The time now is 01:43 AM.