How to Disable IPv6 on Ubuntu
While IPv6 is essential for the long-term growth of the Internet, there are cases where you may need to disable it on your Ubuntu system.
Here's how to disable IPv6 on Ubuntu to help you resolve compatibility issues, network configurations, or specific use cases that require IPv6 deactivation.
How to permanently disable IPv6 on Ubuntu
Note : By default, IPv6 is enabled and used in parallel with IPv4.
To disable IPv6 on your Ubuntu system, open a terminal by pressing Ctrl + Alt + T and use the nano editor to open the sysctl configuration file:
sudo nano /etc/sysctl.conf
Now, add the following code to the configuration file to disable IPv6 services:
net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1
In the code above:
- The first line disables IPv6 for all network interfaces on the system
- The second line specifically targets the default interface and disables it
- The third line disables IPv6 on the loopback interface, meaning the machine will not use IPV6 for internal communication.
After adding the given code, press Ctrl + O to save changes and exit the editor. Now, apply changes to the system with:
sudo sysctl -p
Restart your network services with:
sudo systemctl restart systemd-networkd
Verify the status of disabled IPv6 services by running:
cat /proc/sys/net/ipv6/conf/all/disable_ipv6
If the output shows a status of "1" , it means IPv6 has been successfully disabled on Ubuntu.
How to temporarily disable IPv6 on Ubuntu
To temporarily disable IPv6 on Ubuntu, run the following systemctl command with the -w option :
sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1
Now, restart network services with:
sudo systemctl restart systemd-networkd
Therefore, all dependencies will be configured to temporarily disable IPv6 services.
Ubuntu makes controlling IPv6 settings relatively simple, ensuring that you can configure your system's networking behavior to your specific needs. Remember to use this knowledge carefully as IPv6 will continue to play an important role in the global Internet infrastructure.
You should read it
- Disable IPv6 to troubleshoot Internet connectivity issues on Windows computers
- About IPv6 address
- Instructions for configuring IPv6 on Windows Server
- How to transfer IPv4 addresses to IPv6
- How to check IPv6 connection
- How to disable IPv6 rules in UFW to increase firewall security on Linux
- How to secure your VPN more secure?
- How to fix the error IPv6 No Network Access
- Things to know about IPv6 protocol
- 9 things to know when moving to IPv6
- Switching to IPv6 is not easy
- Instructions for configuring RIPng routing protocol for IPv6
Maybe you are interested
How to use Canva's Magic Studio to edit designs Avoid These Mistakes When Playing Situs Judi QQ Online Indonesia How to listen to Google Drive music on Windows 10 How to play Dropbox music, Google Drive on iPhone Instructions for splitting compressed files with WinRAR The method helps prevent drowsiness and instant alertness for office people