Monday, November 02, 2009

Disable IPv6 using sysctl on Linux

Run


sysctl -w net.ipv6.conf.all.disable_ipv6=1
sysctl -w net.ipv6.conf.default.disable_ipv6=1
sysctl -w net.ipv6.conf.lo.disable_ipv6=1

on the command line to disable it immediatelly (you might need to put all interfaces down and up in order to loose your IPv6 addresses on the interface). The changes will not be permanent and will be lost on reboot. If you need to make them permanent add

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1


to your /etc/sysctl.conf.

7 Kommentare:

Anonymous said...

Hello from Russia!
Can I quote a post "No teme" in your blog with the link to you?

typecast said...

Sure, you can quote any post from this blog as long as you link to the original post on my blog.

Anonymous said...
This comment has been removed by a blog administrator.
Anonymous said...

I found this site using [url=http://google.com]google.com[/url] And i want to thank you for your work. You have done really very good site. Great work, great site! Thank you!

Sorry for offtopic

Anonymous said...
This comment has been removed by a blog administrator.
Anonymous said...

Even easier:
echo "options ipv6 disable=1" > /etc/modprobe.d/disable-ipv6

typecast said...

Thank you for the comment.

I've read that one solution on the net a while ago, too. But I think this can only work when you compiled ipv6 as a module (which I did not have). The solution in the post should work in any case.