What is IPV6? How to disable IPV6 on Linux/Ubuntu and centOS (disable IPV6)
IPv6 (Internet Protocol version 6) is the next version of the Internet Protocol (IP) protocol used to identify and locate devices on the Internet. IPv6 was developed to solve the problem of IP address exhaustion in IPv4 and create a sustainable network infrastructure for the future, opening up many new opportunities and development potentials on the Internet.
Why disable IPV6 on Linux (Server)
IPv6 uses 128-bit IP addresses, while IPv4 uses 32-bit IP addresses. This allows IPv6 to provide a larger address space, with the ability to support a larger number of unique IP addresses than IPv4.
However, in some cases, IPv6 may not be compatible or work well with certain applications, devices, or network environments. This may require users or network administrators to implement how to disable or disable IPv6 on Linux to ensure compatibility and stable operation of the system. Here are some common reasons users might want to disable IPv6:
- Application compatibility: Some applications or services may not be compatible or work correctly on IPv6 networks. In this case, you will certainly find a way to disable IPv6 on your Linux to ensure that applications perform better on IPv4 networks.
- Security: In some cases, IPv6 networks can create potential security holes. By disabling IPv6, you can reduce the security risks associated with IPv6 and focus on protecting the IPv4 network.
- Connection issues: Some users may experience problems connecting to IPv6 networks, such as slow website access or inability to connect. Disabling IPV6 on Ubuntu Linux can be a temporary solution to these connectivity issues.
- Prioritize using IPv4: In some cases, users may prefer to use IPv4 networks over IPv6. This can happen when specific services or applications still work well over IPv4, or when your current IPv4 network configuration meets your needs.
How to disable, disable IPV6 on Ubuntu, Debian or centOS
To disable IPv6 on Ubuntu, Debian or CentOS operating systems, you can follow these steps:
First press the key combination “Ctrl + ALT + T” to open the terminal on your computer. Then log into the server via SSH and type the following command to open the IP protocol configuration file:
sudo nano /etc/sysctl.conf
In the configuration file, find the line containing the configurations below and change its value to 1 to disable IPV6 on Linux. If these configurations are not present, add it at the end of the file. Then save it by pressing “Ctrl + X” and select “Y”.
net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1 net.ipv6.conf.lo.disable_ipv6 = 1
Continue running the command to apply the changes:
sudo sysctl -p
Or:
sudo sysctl --load=/etc/sysctl.conf
However, there is a problem that when you restart the server (server), the configuration will not be applied. The way below will help you fix permanently disable IPV6 on Linux-based operating systems.
How to permanently disable IPV6 on Debian Linux, centOS and Ubuntu
This method will add a configuration in the file /etc/default/grub, now open terminal and login to the server via SSH. Then run the command below to start the process of disabling IPV6 on Linux.
sudo nano /etc/default/grub
When the grub file is opened look for 2 lines that look like this:
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash" GRUB_CMDLINE_LINUX=""
And change its value as follows:
GRUB_CMDLINE_LINUX_DEFAULT="ipv6.disable=1 quiet splash" GRUB_CMDLINE_LINUX="ipv6.disable=1"
Then save the file by pressing “Ctrl + X” and select “Y”. Now we will run the GRUB bootloader update command, to apply the IPV6 shutdown changes on Ubuntu, Linux.
sudo update-grub
Those are 2 steps to disable IPV6 on Linux based operating systems like Ubuntu, Debian or CentOS. You can check again using the command ifconfig
or ip addr
to see the current IP addresses being used on the system.
If you want to use or reopen IPV6 on your system, you can repeat the steps such as changing the value of the “ipv6.disable=0” configurations and rebooting your system.
– Advertising –