Linode Forum
https://forum.linode.com/

Disabling ipv6
https://forum.linode.com/viewtopic.php?f=19&t=1016
Page 1 of 1

Author:  cexpert [ Tue Jul 13, 2004 11:12 am ]
Post subject:  Disabling ipv6

How is it possible to have ipv6 support disabled in the kernel?

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.

Author:  Ciaran [ Tue Jul 13, 2004 3:03 pm ]
Post subject: 

First off, are you sure it's *kernel* support for IPv6 that you want to disable? If you're having trouble building an application because it fails trying to compile IPv6 support - or if for any reason you want to disable IPv6 support for one particular program - then bear in mind that you may be able to disable that application's IPv6 support through its ./configure script, if it has one, in which case you shouldn't need to disable kernel support.

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:

Code:
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.]

Author:  jhmartin [ Thu Apr 14, 2005 2:59 pm ]
Post subject:  ip6tables

If you install ip6tables you can set the default policy for INPUT , FORWARD and OUTPUT to 'drop', effectively disabling ipv6.

Author:  efudd [ Thu Apr 14, 2005 5:04 pm ]
Post subject: 

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

Author:  sednet [ Thu Apr 14, 2005 5:22 pm ]
Post subject: 

efudd wrote:
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.

Author:  caker [ Thu Apr 14, 2005 5:24 pm ]
Post subject: 

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

Author:  nagya [ Thu Aug 25, 2005 10:27 am ]
Post subject: 

caker wrote:
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

Author:  caker [ Thu Aug 25, 2005 12:39 pm ]
Post subject: 

nagya wrote:
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

Author:  nagya [ Thu Aug 25, 2005 3:20 pm ]
Post subject: 

caker wrote:
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: http://v6fix.net/db/bind9-ipv6-transport.html

(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

Page 1 of 1 All times are UTC-04:00
Powered by phpBB® Forum Software © phpBB Group
http://www.phpbb.com/