Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running Debian Squeeze (with a stock 2.6.32 kernel). I'd like to completely disable any kind of IPv6 traffic. Can I do this? There doesn't seem to be any relevant module loaded. Perhaps some setting in /sys or /proc?

I read this, but my /etc/modprobe.d/aliases doesn't have a

alias net-pf-10 ipv6

line, it's commented-out already.

share|improve this question
    
That's not IPv6 traffic. SRC=192.168.2.100 DST=192.168.2.255 – Michael Hampton Mar 9 '13 at 3:49
    
@MichaelHampton: You're right. But the question is still generally relevant. – einpoklum Mar 10 '13 at 5:10
    
In that case, I will have to remind future readers that disabling IPv6 is generally a really bad idea, and should not be done except as a last resort, as it will cause you problems later when you have to use IPv6. – Michael Hampton Mar 10 '13 at 5:16
    
@MichaelHampton It's a simple process to re-enable it, assumng you remember. I disabled it as a quick fix (I've since changed the preference properly) on openSUSE a while ago, because it preferred IPv6 which would take a while to time out - giving me a not-so-nice several second delay on every request... But, yea, there's almost alwys a better way than flat out disabling it. – Bob Mar 10 '13 at 5:21
    
FYI: A working solution is at askubuntu.com/a/337736/164798 – Tino May 29 '14 at 7:51
up vote 3 down vote accepted

You can find the answer in Debian's Wiki:

# echo net.ipv6.conf.all.disable_ipv6=1 > /etc/sysctl.d/disableipv6.conf

But be aware that this disables IPv6 globally, so anything that needs it wont work properly.

share|improve this answer
    
Note that you need to restart your computer for this to be applied, but you probably already knew that. – 1ace Mar 9 '13 at 0:22
    
To avoid a restart, you can load the configuration file with sysctl -p /etc/sysctl.d/disableipv6.conf (I'm not too sure about this - I normally only use it on /etc/sysctl.conf) or directly set the value (non-persistent) with echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6 or sysctl -w net.ipv6.conf.all.disable_ipv6=1 – Bob Mar 10 '13 at 5:18
    
With Kernel 3.2.x this does not completely disable IPv6. It only disables IPv6 Kernel autoconfiguration. The IPv6 interface then is unconfigured and can induce major problems in IPv4-only-boxes. – Tino May 29 '14 at 7:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .