qacafe - ip test solutions
Knowledge Base > How do I disable IPv6 on my Linux system?

How do I disable IPv6 on my Linux system?

IPv6 General Installation

Which Linux kernels need IPv6 disabled?

If you are using a kernel earlier than 2.6.35 and have the IPv6 add-on, disabling IPv6 at boot-time is necessary due to a Linux kernel bug that does not actually disable IPv6 on a network interface at run-time.

You can easily determine your kernel version by running uname -a from any user account.

Please inspect the following notes to determine how to configure your Linux system to work best with CDRouter.

  • If you are using a kernel 2.6.35 or newer (which is required for the Storage add-on), we do not recommend changing any settings on your system. None of the following configuration changes should be made.
  • Otherwise, you should follow the following instructions to disable IPv6 at boot time.

Ubuntu Maverick 10.10 and newer

Ubuntu 10.10 and newer have the 2.6.35 kernel, which does not require any manual configuration.

Ubuntu Karmic 9.10 and Lucid 10.04

Add the following line to /etc/sysctl.conf and reboot the system.
net.ipv6.conf.all.disable_ipv6 = 1

Ubuntu Jaunty 9.04

IPv6 can be disabled by adding a boot option to your grub configuration. Edit the /boot/grub/menu.lst file and add the option ipv6.disable=1 as a kernel option, as shown below:

title           Ubuntu 9.04, kernel 2.6.28-15-generic
uuid            ab986918-12fc-45e1-ad2e-559490039b8b
kernel          /boot/vmlinuz-2.6.28-15-generic 
                     root=UUID=ab986918-12fc-45e1-ad2e-559490039b8b 
                     ro quiet splash ipv6.disable=1
initrd          /boot/initrd.img-2.6.28-15-generic

Note that you must be running Linux kernel 2.6.28-15 or newer to disable IPv6 in Ubuntu 9.04. Note that you must also reboot the system after making the above change.

Ubuntu Intrepid 8.10

Add the following line to /etc/modprobe.d/blacklist and reboot the system.
blacklist ipv6

Related articles that may also be helpful: