Hardcore Linux

Anything about Ubuntu, Centos, openSuSe and Fedora

Disable IPV6 on Ubuntu 10.04

Already found a workaround for this on Ubuntu 9.04 (here), but when version 10.04 arrives, I got this from the net which is a better idea to disable IPV6 on Ubuntu.

Here’s how:

1. Modify the /etc/sysctl.conf and add the following:

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

2.  Save the file and reboot your system.

3. Done.

4 responses to “Disable IPV6 on Ubuntu 10.04

  1. Matt September 1, 2010 at 3:00 pm

    Doesn’t work. I am running 10.04 x64 with latest updates.

    sysctl -p
    kernel.printk = 4 4 1 7
    error: “net.ipv6.conf.all.disable_ipv6” is an unknown key
    error: “net.ipv6.conf.default.disable_ipv6” is an unknown key
    error: “net.ipv6.conf.lo.disable_ipv6” is an unknown key

  2. gwr February 28, 2011 at 3:27 am

    work like a charm

  3. Sami March 31, 2011 at 6:11 am

    Worked well for a while, but again after resuming laptop from suspend mode, this issue came back – even though the settings seem to be okay.

    $ sudo sysctl -p
    net.ipv6.conf.all.disable_ipv6 = 1
    net.ipv6.conf.default.disable_ipv6 = 1
    net.ipv6.conf.lo.disable_ipv6 = 1
    
    $ cat /etc/sysctl.d/bindv6only.conf 
    net.ipv6.bindv6only = 0
    

    This issue can be seen for example when I try to establish SSH-connection. It gets stuck for 30 seconds on this:

    $ ssh -vv myserver.mydomain.com
    OpenSSH_5.3p1 Debian-3ubuntu5, OpenSSL 0.9.8k 25 Mar 2009
    debug1: Reading configuration data /etc/ssh/ssh_config
    debug1: Applying options for *
    debug2: ssh_connect: needpriv 0
    *** 30 seconds wait here ***
    debug1: Connecting to myserver.mydomain.com...
    
  4. Pingback: Fix Error Net.ipv6.conf.all.disable_ipv6 Is An Unknown Key Errors - Windows XP, Vista, 7, 8

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: