First if you suspect ipv6 is causing problems (usually it's timeouts on DNS so pages fail to load/load slowly or you find apt can't resolve some repositories) then you can quickly check if it's the case using Iceweasel/Firefox or Epiphany.
Open a new tab and type about:config and hit return. Go past any dire warnings and you'll see a filter box. Enter ipv6 and you'll see this:
Double click on the line to toggle the setting to 'true'
If you run a dnscache (dnscache-run, djbdns etc) you'll need to restart it. If you don't know if you run a dnscache then you almost certainly do not.
Close the tab, open a new one and go to some of the pages you had trouble with. If they now resolve then you can go ahead and disable ipv6 systemwide.
Here's how:
As root create a file /etc/modprobe.d/00local.conf and edit it to look as follows
Code: Select all
install ipv6 /bin/true
alias net-pf-10 off
alias ipv6 off
Reboot. You now have a system which doesn't use ipv6. You can verify this by checking if the ipv6 driver is loaded
Code: Select all
$ lsmod |grep ipv6
Code: Select all
$ lsmod |grep ipv6
ipv6 236036 18
Often it's advised to edit /etc/modprobe.d/aliases.conf or /etc/modprobe.d/blacklist.conf
In the case of blacklist.conf it simply won't work. ipv6 is a kernel module, a driver. From /etc/modprobe.d/blacklist.conf
From /etc/modprobe.d/aliases.conf# This file lists modules which will not be loaded as the result of
# alias expansion, with the purpose of preventing the hotplug subsystem
# to load them. It does not affect autoloading of modules by the kernel.
# This file is provided by the udev package.
So you possibly can disable ipv6 via aliases.conf but your changes will be not be persistent, that is a package/system upgrade will overwrite them. The advantage of creating /etc/modprobe.d/00local.conf is that it will be persistent. Nothing will automatically overwrite or delete it, it will continue to work even after dist-upgrading from release to release.# These are the standard aliases for devices and kernel drivers.
# This file does not need to be modified.
If you compile your own kernels you can easily build them with no ipv6 support.