Home » Questions » Computers [ Ask a new question ]

How to disable ipv6 in Linux Mint

How to disable ipv6 in Linux Mint

ip a | grep inet6

Asked by: Guest | Views: 346
Total answers/comments: 1
bert [Entry]

"Linux Mint is Ubuntu-based which in turn is based on Debian, and I've seen two basic ways to do this in Debian:

First method: Blacklist the ipv6 module by adding the following to
/etc/modprobe.d/blacklist (on newer systems it's /etc/modprobe.d/blacklist.conf):

blackist ipv6

Second method: Turn off the aliases in /etc/modprobe.d/aliases. Create a new file in the /etc/modprobe.d directory, call it 00local. (This will prevent your change from being removed by an upgrade to a default alias file.) Add these lines to that file:

alias net-pf-10 off
alias ipv6 off

However, all of this is for disabling or turning off a module-based ipv6, and at least one post I saw suggested that very recent kernels (circa 2.6.29) have ipv6 support built in. So at some point, neither of these two methods will work. (Please note that you will need superuser privileges for either of these methods. I've also seen at least one post that mentioned a further required step for KDE users. I'll post links below.)

After this, there are two optional steps. First you can turn off ipv6 in your browser. I only know how to do this in Firefox, but I'm sure it can be done in other browsers. Second, you can comment out all lines in /etc/hosts that refer to ipv6. It's not clear to me that these two tweaks give any huge benefit, but I'll mention how to do each. For Firefox, you can disable ipv6 support by opening a window and entering 'about:config' in the address bar. Then search for ipv6 and set the network.dns.disableIPv6 option to true by double clicking on it. (It's a boolean and set to false by default, so you can switch its state easily.) For /etc/hosts, open that file in your favorite editor (you'll need superuser privileges to edit it), and put a # at the start of all the lines that refer to ipv6.

Links (some of these links offer methods that are slight variants on the two I give above; I stuck them in for added ideas):

http://www.cyberciti.biz/tips/linux-how-to-disable-the-ipv6-protocol.html
http://linux.com/community/blogs/disable-ipv6-on-debian-lenny-quick-howto.html
http://www.karkomaonline.com/index.php/2009/04/how-to-disable-ipv6-in-debian/
http://www.debian-administrationdotorg/articles/409
http://berangerdotorg/index.php?article=1127&page=3k"