Disable IPv6 in a 2.6 kernel

Debian linux running a 2.6 kernel

To disable IPv6 you need both the following lines in your /etc/modprobe.conf file


alias ipv6 off
alias net-pf-10 off

Thanks to the guys on the #debian freenode channel for help with this.

Update

Moved the config to /etc/modprobe.d/local

Update

This stopped working on 2.6.18 on debian etch. Now my /etc/modprobe.d/local now contains just


blacklist ipv6

Apparently - in some cases this may still not work - in that case it is possible to try


install ipv6 /bin/true

Technorati Tags:Technorati Tags:

Comments

chris's picture

Interesting. I knew that

Interesting. I knew that modutils and modules.conf is 2.4 stuff. According to the modprobe manpage it can use the optional /etc/modprobe.conf and /etc/modprobe.d directory - I do know that it works with /etc/modprobe.conf - so it appears that both approaches work.

Thanks, your hint got me

Thanks, your hint got me going in the right direction. I'll share what more I've learned today on #debian:

1. /etc/modprobe.conf is not needed (used?) anymore. Instead, modprobe just reads all the files in /etc/modprobe.d
2. /etc/modutils, /etc/modules.conf, and update-modules are only used by a 2.4 kernel. If you have these files but don't want to go back to a 2.4 kernel, use aptitude to purge the modutils package
3. To disable IPv6 you should put both of those lines mentioned into /etc/modprobe.d/local (a new file for me)
4. You can use "modprobe -c | less" to see what modules it finds out of /etc/modprobe.d
5. Reboot after putting the lines into /etc/modprobe.d/local, then it should be disabled.

-David

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <p> <span> <div> <h1> <h2> <h3> <h4> <h5> <h6> <img> <map> <area> <hr> <br> <br /> <ul> <ol> <li> <dl> <dt> <dd> <table> <tr> <td> <em> <b> <u> <i> <strong> <font> <del> <ins> <sub> <sup> <quote> <blockquote> <pre> <address> <code> <cite> <embed> <object> <strike> <caption>
  • Lines and paragraphs break automatically.
  • Replace [debbug:xxxxx] with a link to the relevant debian bug.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Insert Flickr images: [flickr-photo:id=230452326,size=s] or [flickr-photoset:id=72157594262419167,size=m].
  • You may link to Gallery2 items on this site using a special syntax.
  • Insert Google Map macro.
  • Images can be added to this post.
  • You can link nodes to other nodes using the following syntax:
    [node:node_id,param_1="val1",param_2="val2"]

More information about formatting options