Disabling ipv6
I have an already setup Debian (with latest 2.4 series kernel) and need to turn off IPV6 without reinstalling.
Any help will be appreciated.
9 Replies
If this isn't what you want, you should note that IPv6 support is built into the Linode kernels, and because custom kernels aren't allowed, you won't be able to remove support for it in the kernel completely, even if you were to reinstall.
However, after searching a bit on Google, I can see that in Fedora Core 2, at least, you can disable IPv6 support by using the following command as root, and rebooting:
echo "alias net-pf-10 off" >> /etc/modprobe.conf
I assume the same command can be used in other distributions, but you may want to check that.
Hope this helps.
[edit: Er, scratch that. I've just figured that fairly obviously, since support is built into the kernel, and not as a module, the above command won't work. Hmm. I'm trying to find some other means of doing it for you.]
Ie, PROTOCOLS="1 2" would enable unix sockets and ipv4 support. "1 2 10" would add ipv6 to that support….. a reboot and bewm.
-jbl
@efudd:
At least for Gentoo, and i'm presuming others are similarly setup, /etc/rc.conf has a definition for "PROTOCOLS". You can adjust that to enable/disable various protocol support… ala ipv6.
Ie, PROTOCOLS="1 2" would enable unix sockets and ipv4 support. "1 2 10" would add ipv6 to that support….. a reboot and bewm.
-jbl
PROTOCOLS=… in /etc/rc.conf will only affect module autoloading so it will make no difference here.
You can add -ipv6 to your USE flags in /etc/make.conf to not build IPv6 support in newly built software.
Of course thats only going to work on gentoo and it won't make any difference to the kernel anyway.
-Chris
@caker:
I'm curious why you need to disable ipv6 support in the first place. Without a tunnel, ip6 traffic isn't going to reach your box, nor be routed out anywhere…
-Chris
One reason is that some software tries to use ipv6 when it is available, and this might cause delays in their operation. For instance, a bind9 name server makes recursive queries via ipv6 if the name server it's asking has an ipv6 address. Of course when this request times out, it tries another name server address, eventually an ipv4 one, but these timeouts cause a delay.
It's a pain in the neck to disable ipv6 support one by one in each software, for instance, I still haven't been able to figure out how to disable the above behavior in bind.
Andras
@nagya:
One reason is that some software tries to use ipv6 when it is available, and this might cause delays in their operation. For instance, a bind9 name server makes recursive queries via ipv6 if the name server it's asking has an ipv6 address. Of course when this request times out, it tries another name server address, eventually an ipv4 one, but these timeouts cause a delay.
OK. This occurs even if the eth0 (or any interface, for that matter) isn't assigned an IPv6 IP?
-Chris
@caker:
OK. This occurs even if the eth0 (or any interface, for that matter) isn't assigned an IPv6 IP?
-Chris
Deleting the the auto-assigned ipv6 address on eth0 fixed the problem with bind 9.3. BTW, the '-4' command line param can also be used:
(I don't know about earlier versions, the phrase "try to use IPv6 transport even if the server host does not have IPv6 connectivity" may mean that they try to use it even if no interface has an ipv6 addr assigned.)
Andras
I am surprised you want to disable IPv6, which is the replacement for the older and soon to be obseleted IPv4. While Linode currently comes with both IPv4 and IPv6, it is better than competitors like Namecheap.com, whose VPS is IPv4 only.
Its better to be dual stack since once IPv4 is declared obseleted by ICANN, you can move to IPv6 easily.