How to Disable IPv6 on Ubuntu
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
- 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
May be interested
- How to enable Dark Mode in Ubuntu 20.04 LTSif you have ever used dark mode on a mobile phone, then you will be surprised to learn that it is also available on linux computers. in this tutorial, tipsmake.com will show you how to enable dark mode on a full ubuntu linux system.
- What's New in Ubuntu 21.10?version 21.10 is the latest release of ubuntu and although canonical is turning more attention to the cloud and developers, ubuntu 'impish indri' still comes with some notable changes for those users use the ubuntu desktop every day.
- Why are some Internet service providers slow to adopt IPv6?known as ipv6 (internet protocol version 6), this approach overcomes some of the problems plaguing ipv4 and expands the address space to accommodate the multitude of new devices now connecting. with the internet.
- Switching to IPv6 is not easyswitching networks to ipv6 is really a tiring problem because even your network hardware is not ready.
- Instructions for configuring RIPng routing protocol for IPv6if you are interested in ipv6 technology, you may know that the exhaustion of ipv4 address space is only a matter of time. 2012 is the year for network engineers and people looking to become network engineers to learn how to configure routing protocols for ipv6, especially ripng, eigrp and ospfv3.
- Why is Ubuntu LTS preferred over regular distros?ubuntu is one of the most widely used linux distributions among software developers and other content creators. ubuntu is also used for many servers around the globe.
- How to Fix 'IPv4/IPv6 No Internet Access' Error on Windowsin this guide, tipsmake.com.com will explore some troubleshooting steps to help you resolve ipv4/ipv6 no internet access error and restore your internet connection.
- What's new in Ubuntu 18.04 LTS just released?ubuntu 18.04 lts code-named bionic beaver has just been officially launched on april 26th. this version is canonical's up to 5 year support period.
- How to prolong the life of Ubuntu 18.04 installation with Ubuntu Proubuntu 18.04, bionic beaver, is one of the most popular distros in use today, but support will end in may 2023, meaning you won't receive updates or security patches anymore.
- What is the difference between Ubuntu Desktop and Ubuntu Server?ubuntu is divided into ubuntu cloud, ubuntu core, ubuntu kylin, ubuntu desktop and ubuntu server. in this article, we will explore all the similarities and differences between ubuntu server and ubuntu desktop.