Disable ipv6 in Debian 6 (Squeeze) - How I Did It

in General Technical Discussion (PUBLIC)
Last update: May 12, 2012

(Yes, I know we all should be migrating to ipv6, but some of us have projects and requirements that still need ipv4 ... only! Wink )

If you have upgraded to Debian 6 (Squeeze), you might notice that ipv6 support is built into the kernel. Here is how you can disable ipv6 support in case you are not ready to migrate (or your firewalls don't support ipv6) :

To disable ipv6 in Debian 6 (Squeeze):
    ("$" = shell prompt)
    $sudo ifconfig
    Shows your current network configuration. It might look something like this:
    inet6 addr: 2a12:dcc1:edb:88:13:178:b676:dc15/128 Scope:Global

    $vim /etc/sysctl.conf
    Edit /etc/sysctl.conf (feel free to use your preferred editor, like nano, vi etc).

    Add this line at the end of the file:
    $net.ipv6.conf.all.disable_ipv6 = 1

    I rebooted in order to see the change:

    Caution: before rebooting make sure you prep your system/backup/follow your own shutdown procedure

    $sudo shutdown -r now
    ... log back in
    $sudo ifconfig
    ipv6 should now be gone!


That's it. Hope this helps you!

Updates:
May 12, 2012: Added tweaks and clarifications.

Your rating: None Average: 4 (1 vote)

Post new comment

 

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Enter the characters shown in the image.

Copyright © 2007-2013, WidWad LLC. All Rights Reserved.
All trademarks and service marks are the property of their respective owners.