disable IPv6 in Ubuntu can be one of the frequent jobs for the administrator or user who wants to reduce network settings, troubleshoot compatibility problems, or increase the security level for certain cases. Although IPv6 was created to become a successor of IPv4 and has numerous benefits, there are some instances that require disabling IPv6. Par exemple, some applications or networks may not be able to work with IPv6. Dans ce tutoriel, you will discover how it might be helpful to disable IPv6 and how to turn it off on your Ubuntu machine.
Why You Might Need to Disable IPv6 in Ubuntu
In modern networks, IPv6 is designed to replace IPv4 and provides an unlimited number of IP addresses. Cependant, there are still many real-world scenarios where users choose to disable IPv6 in Ubuntu.
Compatibility
One of the most common reasons is compatibility. Some networks, especially older infrastructures or enterprise environments, may not fully support IPv6. When your system tries to use IPv6 on such networks, it can result in slow connections, DNS resolution delays, or even complete connection failures.

Mauvaise configuration
Another key reason is misconfiguration. Dans certains cas, a network may technically support IPv6 but not be configured properly. This results in a « broken » IPv6 connection, where your system prefers IPv6 routes but cannot communicate effectively. Disabling IPv6 in such situations can significantly improve stability and performance.
Design of some servers and applications
There are also specific use cases. Par exemple, some servers or applications are built only for IPv4 environments. Dans ces cas, enabling IPv6 serves no purpose and may introduce unnecessary complexity. Security considerations can also play a role – some administrators prefer to reduce the attack surface by disabling unused protocols.
Hébergement Web WordPress
À partir de 3,99 $/mois
Finalement, choosing to disable IPv6 in Ubuntu is not about rejecting modern technology, but rather about aligning your system configuration with the real needs of the network and ensuring optimal performance.
Checking If IPv6 Is Enabled on Your System
Before making any changes, it’s essential to confirm whether IPv6 is active on your Ubuntu system. Many users assume it is disabled by default, but in most modern Ubuntu versions, IPv6 is enabled out of the box.
A quick and effective way to check is by running the following one-liner command:
ip -6 addr show $(ip route show default | awk '/default/ {print $5}') | grep -oP '(?<=inet6\s)(?!fe80)[\da-f:]+'
This command inspects your primary network interface and filters out loopback or link-local addresses. If you see output, it means your system has one or more IPv6 addresses assigned. Cependant, having an address does not necessarily mean full IPv6 connectivity is functional.
Another simple method is:
Serveur VPS pas cher
À partir de 2,99 $/mois
ip -6 addr show
This command lists all IPv6 addresses across interfaces. If nothing appears (except loopback), IPv6 may already be disabled or inactive.
Understanding your current configuration is critical before deciding to disable IPv6 in Ubuntu, as it helps you choose the most appropriate method and avoid unnecessary changes.

Temporary vs Permanent Methods to Disable IPv6
When planning to disable IPv6 in Ubuntu, it’s important to distinguish between temporary and permanent solutions. Each approach serves different purposes depending on your needs.
Temporary methods are ideal for testing or troubleshooting. These changes remain active only until the system is rebooted. Par exemple, you might disable IPv6 temporarily to verify whether it is causing network issues. If performance improves, you can then proceed with a permanent solution.
Hébergement VPS Windows
Remote Access & Full Admin
Permanent methods, d'autre part, ensure IPv6 remains disabled even after a reboot. These are typically implemented through system configuration files such as sysctl.conf or GRUB settings. Permanent changes are best suited for production environments where consistency is crucial.
There are also multiple levels at which IPv6 can be disabled:
- Application Level: Disable IPv6 for specific applications like browsers or package managers
- Network Manager Level: Disable IPv6 for selected network connections
- Kernel Level: Completely disable IPv6 across the entire system
Choosing the right level depends on how broadly you want the change to apply. Par exemple, if only your browser has issues, you may not need a system-wide change. Understanding these options helps you implement a precise and effective strategy.
How to Disable IPv6 Using sysctl Configuration
One of the most common and powerful ways to disable IPv6 in Ubuntu is through the sysctl configuration, which directly controls kernel parameters.
To disable IPv6 system-wide, you can add the following lines to your /etc/sysctl.conf file:
sudo echo "net.ipv6.conf.all.disable_ipv6 = 1" >> /etc/sysctl.conf
sudo echo "net.ipv6.conf.default.disable_ipv6 = 1" >> /etc/sysctl.conf
sudo echo "net.ipv6.conf.lo.disable_ipv6 = 1" >> /etc/sysctl.conf
These parameters ensure that IPv6 is disabled for all interfaces, including the loopback interface.
After adding these lines, apply the changes without rebooting:
sudo sysctl -p
This method operates at the kernel level, making it one of the most comprehensive approaches. It is especially useful for servers where consistency and reliability are critical.
Because it directly modifies kernel behavior, this method is considered highly effective but also restrictive. Une fois appliqué, all IPv6 functionality is disabled unless the configuration is reversed.

Disabling IPv6 via GRUB Boot Parameters
Another advanced way to disable IPv6 in Ubuntu is by modifying GRUB boot parameters. This method ensures IPv6 is disabled during system startup, making it highly reliable.
To do this, edit the GRUB configuration file:
sudo nano /etc/default/grub
Find the line:
GRUB_CMDLINE_LINUX=""
Modify it to include:
GRUB_CMDLINE_LINUX="ipv6.disable=1"
After saving the file, update GRUB:
sudo update-grub
Then reboot your system for the changes to take effect.
This approach disables IPv6 at boot time, preventing it from being initialized at all. It is particularly useful in environments where strict control over network protocols is required.
Cependant, since it affects the entire system at a low level, it should be used with caution and proper understanding.
Turning Off IPv6 with Network Manager
For desktop users, one of the easiest ways to disable IPv6 in Ubuntu is through the Network Manager interface. This method allows you to disable IPv6 for specific network connections rather than the entire system.
Here’s how to do it:
- Open Settings
- Navigate to Network (for wired) or Wi-Fi
- Select your active connection and click the gear icon
- Go to the IPv6 tab
- Change the method to Disable
- Apply changes and reconnect
This approach is especially useful when working with multiple networks. Par exemple, you might disable IPv6 on a problematic Wi-Fi network while keeping it enabled elsewhere.
On Ubuntu Server systems, Network Manager is usually not used. Plutôt, IPv6 configuration is handled through netplan or other network configuration files. Dans de tels cas, removing IPv6-specific entries is often sufficient.
This method provides flexibility and is ideal for users who prefer a graphical interface over command-line tools.
Verifying That IPv6 Has Been Successfully Disabled
After applying any method to disable IPv6 in Ubuntu, it is crucial to verify that the changes were successful.
One way to check is by running:
ip -6 addr show
If no IPv6 addresses appear (except possibly loopback), it indicates IPv6 is disabled.
Another reliable method is:
cat /proc/sys/net/ipv6/conf/all/disable_ipv6
If the output is 1, IPv6 is disabled. If it is 0, IPv6 is still active.
Verification ensures that your configuration changes have taken effect and helps you avoid confusion during troubleshooting. It also confirms that your system is now operating strictly on IPv4 if that was your intention.

Potential Risks and Considerations Before Disabling IPv6
While it may seem beneficial, choosing to disable IPv6 in Ubuntu comes with certain risks and considerations.
D'abord, IPv6 is the future of networking. Many modern services and platforms are gradually transitioning to IPv6. Disabling it may limit access to certain services or reduce compatibility in the long term.
Second, some applications and cloud environments rely on IPv6 for optimal performance. Disabling it could lead to unexpected issues or reduced efficiency.
Third, troubleshooting can become more complex. If a service expects IPv6 and it is disabled, identifying the root cause may take additional effort.
Enfin, security implications should be considered carefully. While disabling unused protocols can reduce attack surfaces, improper configurations may introduce other vulnerabilities.
For these reasons, it is important to evaluate your specific needs before making a decision. Disabling IPv6 should be a deliberate choice, not a default action.
Smart Networking Starts with the Right Choice
Deciding whether to use or disable IPv6 ultimately depends on your environment, configuration réseau, and specific requirements. Throughout this guide, we explored multiple methods—from application-level tweaks to kernel-level configurations—and showed how each approach serves different use cases.
If your network does not support IPv6 or suffers from misconfiguration, disabling it can improve performance and stability. D'autre part, keeping IPv6 enabled ensures compatibility with modern internet standards and future-proofs your system.
The key is balance: understand your setup, test your changes, and choose the method that aligns best with your goals. With the right approach, you can confidently manage your Ubuntu networking and maintain a secure, efficient system.