How To Permanently Disable ipv6 Address In SLES 15 Linux

Ashok Raja T
Technology Specialist
September 20, 2021
Rate this article
Views    7692

With the default settings in SLES 15 Linux, the DHCP client would try to get both ipv4 and ipv6 addresses. If you are not in need of an ipv6 address, follow the steps in this article to permanently disable ipv6 address in SLES 15.

Disable ipv6 Address

There are multiple options available to disable the ipv6 address in SLES, like adding ipv6.disable=1 in grub and BOOTPROTO='dhcp4' in ifconfig file. The only option that worked for me without any issues is the config change in sysctl.conf file.

The below settings is applicable to both OpenSuse and SLES.

Configuration Steps

1. Edit the file sysctl.conf by executing the command sudo vi /etc/sysctl.conf
2. Add the below 2 lines to the file

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1

sysconf
3. Save and execute the command sudo sysctl -p . This would re-load the settings and disables ipv6 address.
4. Execute the command ip a | grep inet and verify that no ipv6 addresses are assigned.
ip_inet
5. If you still see any ipv6 addresses, re-start the server and it would work now.

Subscribe To Our Newsletter
Loading

Leave a comment