Please, I beg you, don’t get into a philosophical debate with me about why IPv6 is enabled by default on many OSes today, and why I should not disable it, and the future of IP, and so on, and so on… We’ll save that abstract aspect for a future post… Now, back to the point…
I always disable IPv6 when I am installing a new Suse server (in the initial setup dialogs).
Sometimes, however, I come across a system (customers, etc) that was installed with IPv6 enabled, and now I need to disable it. Not a big deal. I’ll get to that below, but first some background…
I want to point out that there are a few main aspects to “running” IPv6; a couple of them on the local system in question, and then one on the remote systems:
- Many utilities and clients that run on Linux (like Firefox, apache daemon, etc.) utilize IPv6 — if available — on the local host in some fashion, and many of these can have the IPv6 turned off (like Firefox
network.dns.disableIPv6
set to “Yes” in “about:config”)… - The kernel now has IPv6 enabled by default, but can easily be disabled (see below), effectively disabling IPv6 for all utilities and clients, and…
- Remote DNS servers (or any server for that matter) likely will not respond to your IPv6 DNS queries and requests anyway, so there is no real reason for you to have IPv6 enabled on *your* end… Unless, of course, your organization has made a mass decision to move to IPv6 completely (or at least mostly).
So, to disable IPv6 at the kernel level (on most Suse systems, though it’s basically the same on others), do the following:
vi /etc/modprobe.conf
…and change/set the following:
alias net-pf-10 off
Next, …
vi /etc/modprobe.conf.include
(or modprobe.conf.local
)
…and add the following:
alias ipv6 off
…and reboot to complete the change. That’s all!
Now, in theory, your system will be a “faster” client (or a faster server), even though the slowness was really no fault of its own in the first place….
Of course, it might be a good idea to go through any applications that were enabled to use IPv6 and modify them to only use IPv4. For instance, for Postfix, change/set the following values in /etc/postfix/main.cf
:
inet_protocols = ipv4
….instead of all
, and…
inet_interfaces = 127.0.0.1
…notice the lack of the IPv6 loopback address, “::1
“.
Enjoy!
🙂