How to disable IPv6
This document (7003131) is provided subject to the disclaimer at the end of this document.
Environment
SUSE Linux Enterprise Server 12
SUSE Linux Enterprise Server 11
SUSE Linux Enterprise Server 10
Situation
Resolution
This is described in chapter 19.2 of the SUSE Linux Enterprise Server 15 SP1 Administration Guide.
Alternatively you may even follow the below steps on the command line.
1. To disable IPv6 persistent across reboot.
In the file /etc/sysctl.conf add the following lines: net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1 Reload the options with the following command: sysctl -p Or reboot the server with the following command: reboot
2. Disable on the fly - Temporary (does not persists a reboot)
echo 1 > /proc/sys/net/ipv6/conf/all/disable_ipv6
Additional Information
Disabling ipv6 by setting it to '1' only for "all" (via "net.ipv6.conf.all.disable_ipv6 = 1" in /etc/sysctl.conf) won't disable ipv6 on reboot on the loopback device.
"net.ipv6.conf.lo.disable_ipv6 = 1" has to be set explicitly
This was noticed on SLES12 SP5 wicked version -0.6.68-3.16.1 and SLES15 SP3.
The net.ipv6.conf.all.disable_ipv6 alone automatically sets up the other parameters in /etc/sysctl.conf.
However the "all.disable_ipv6" parameter is ignoring the loopback device, ipv6 is started on the loopback device.
Also net.ipv6.conf.lo.disable_ipv6 is set/changed to 0.
The reason for this:
- net.ipv6.conf.all.disable_ipv6 = 1 disables IPv6 addresses for all future interfaces that come up (with state UP in the output of "ip addr".
- net.ipv6.conf.lo.disable_ipv6 = 1 disables IPv6 addresses specifically for the "lo" interface.
Enabling network interfaces on boot changed.
The loopback interface now comes up before the configuration is changed, whereas in previous versions the configuration change happened first.
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:7003131
- Creation Date: 27-Apr-2009
- Modified Date:07-Mar-2023
-
- SUSE Linux Enterprise Server
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com