How To Disable IPv6 on openSUSE

Disable IPv6 on openSUSE

IPv6, the successor to IPv4, is a crucial component of modern networking. It offers a larger address space, improved security features, and enhanced performance. However, there may be situations where you need to disable IPv6 on your openSUSE system, such as troubleshooting network issues or ensuring compatibility with legacy applications. In this comprehensive guide, we will explore various methods to disable IPv6 on openSUSE, both temporarily and permanently. While disabling IPv6 is generally not recommended unless necessary, understanding how to control it can be beneficial for managing your openSUSE system effectively.

Understanding IPv6

Before we dive into the process of disabling IPv6, let’s take a moment to understand what it is and how it differs from its predecessor, IPv4. IPv6 is the latest version of the Internet Protocol, designed to address the limitations of IPv4, primarily the exhaustion of available IP addresses. IPv6 uses 128-bit addresses, providing an astronomical number of unique addresses compared to IPv4’s 32-bit address space. Additionally, IPv6 offers built-in security features like IPsec and improved support for mobile devices. OpenSUSE has had IPv6 enabled by default since version 10.1, embracing the benefits of this modern networking protocol.

Checking IPv6 Status

To determine whether IPv6 is currently enabled on your openSUSE system, you can use the ip command in the terminal. Open a terminal window and run the following command:

ip a

This command will display information about your network interfaces. Look for lines that contain “inet6” followed by an IP address. If you see any inet6 entries, it indicates that IPv6 is enabled on your system. If no inet6 entries are present, IPv6 is already disabled.

Disabling IPv6 Temporarily with sysctl

One way to disable IPv6 temporarily is by using sysctl, a tool that allows you to modify kernel parameters at runtime. To disable IPv6 for all interfaces, run the following command in the terminal:

sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1

To disable IPv6 for the default interface, use this command:

sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1

If you want to disable IPv6 for a specific interface, such as eth0, you can use the following command:

sudo sysctl -w net.ipv6.conf.eth0.disable_ipv6=1

Remember that these changes using sysctl are temporary and will revert after a system reboot. To make the changes permanent, you’ll need to modify the sysctl configuration file, which we’ll cover in the next section.

Permanently Disabling IPv6 by Modifying sysctl.conf

To permanently disable IPv6 on your openSUSE system, you can modify the /etc/sysctl.conf file. This file contains kernel parameters that are applied during system boot. Follow these steps to disable IPv6 permanently:

Open the /etc/sysctl.conf file in a text editor with root privileges. For example, you can use nano:

sudo nano /etc/sysctl.conf

Add the following lines at the end of the file:

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

Save and close the file, then apply the changes without rebooting, run the following command:

sudo sysctl -p

After following these steps, IPv6 will be permanently disabled on your openSUSE system. However, keep in mind that a system reboot is necessary for the settings to persist across restarts.

Disabling IPv6 via Kernel Parameters with GRUB

Another way to permanently disable IPv6 is by modifying the kernel parameters through the GRUB bootloader configuration. GRUB (Grand Unified Bootloader) is responsible for loading the Linux kernel and initializing the operating system during the boot process. Here’s how you can disable IPv6 using GRUB:

Open the GRUB configuration file /etc/default/grub in a text editor with root privileges:

sudo nano /etc/default/grub

Locate the line that starts with GRUB_CMDLINE_LINUX and append ipv6.disable=1 to the existing parameters. For example:


Save the changes, then run the following command to regenerate the GRUB configuration file:

sudo grub2-mkconfig -o /boot/grub2/grub.cfg

By adding ipv6.disable=1 to the kernel parameters, IPv6 will be disabled at boot time. However, it’s important to note that when you disable IPv6 in the kernel, you won’t be able to re-enable it without rebooting the system.

Potential Issues After Disabling IPv6

After disabling IPv6 on your openSUSE system, you may encounter some issues with certain applications that rely on IPv6 functionality. Two common examples are sshd (SSH daemon) and postfix (mail transfer agent). If you experience problems with these services after disabling IPv6, you may need to modify their configuration files to use IPv4 only.

For sshd, open the /etc/ssh/sshd_config file and add or uncomment the following line:

AddressFamily inet

This line instructs sshd to use IPv4 addresses only.

Similarly, for postfix, open the /etc/postfix/ file and add or modify the following line:

inet_protocols = ipv4

After making these changes, restart the respective services for the modifications to take effect:

sudo systemctl restart sshd
sudo systemctl restart postfix

Keep in mind that disabling IPv6 can break functionality in some programs that heavily rely on IPv6. If you encounter issues with a specific application after disabling IPv6, consult its documentation or seek support from the application’s developers or community forums.


In this comprehensive guide, we explored various methods to disable IPv6 on openSUSE, including temporary disabling using sysctl, permanent disabling by modifying sysctl.conf, disabling via kernel parameters with GRUB, and configuring network interfaces to ignore IPv6. While disabling IPv6 can be necessary for troubleshooting or compatibility purposes, it’s generally recommended to keep it enabled to take advantage of its benefits and ensure future-proofing your network setup.

Remember to only disable IPv6 if absolutely necessary and to re-enable it once the issue is resolved or when applications require it. Understanding how to control IPv6 on your openSUSE system is a valuable skill for system administrators and users alike, as it allows for better network management and troubleshooting capabilities.

If you encounter any issues or have further questions, consult the openSUSE documentation, forums, or community resources for additional support and guidance. Happy networking!


r00t is a seasoned Linux system administrator with a wealth of experience in the field. Known for his contributions to, r00t has authored numerous tutorials and guides, helping users navigate the complexities of Linux systems. His expertise spans across various Linux distributions, including Ubuntu, CentOS, and Debian. r00t's work is characterized by his ability to simplify complex concepts, making Linux more accessible to users of all skill levels. His dedication to the Linux community and his commitment to sharing knowledge makes him a respected figure in the field.
Back to top button