IPv6 is the next-generation IP protocol that will replace IPv4. IPv4 is the current and the most popular IP protocol and used for 40 years. Even there are plans to jump IPv6 there are different technical problems that prevent the transition from IPv4 to IPv6. In daily life, normal users do not require IPV6 in most of the cases and it comes enabled by default for Windows, Linux, and MacOSX operating systems. In this tutorial, we will learn how to disable IPv6.
Check If IPv6 Is Enabled?
Even the IPv6 is enabled by default also the current network and intermediate systems should support it to properly use IPv6. We can check if the IPv6 is enabled and can connect to the internet via the IPv6 address with the http://test-ipv6.com . Just browse this website in order to check if the IPv6 is enabled.
Disable IPv6 From Network Adaptor Properties For Windows
The most popular way to disable IPv6 is using the Network Adaptor Properties which is provided via the network configuration. The network configuration can be opened in different ways for different Windows versions but very similar in general. Open the Control Panel -> Network Connections will list the current network adaptors which can be an Ethernet Interface or Wireless interface. Then we will right-click to the network interface we want to disable IPv6. Also, the wireless interfaces may be enabled for the IPv6 and can be disabled easily by using the same steps as below.
We will see the following screen where we will navigate to the line “Internet Protocol Version 6 (TCP/IPv6)” line and clear the check. Then we will click to the OK button to apply new configuration.
The last step is restarting the system in order to apply new setting which will disable the IPv6.
Disable IPv6 From PowerShell For Windows
PowerShell provides the Disable-NetAdapterBinding command in order to disable some features and protocols for a specific interface. We can disable IPv6 with this command by specifying the network interface name and IPv6 component name which is “ms_tcpip6“. First, we will list current Network interfaces and enabled with the Get-NetAdapterBinding command like below.
We have learned that the IPv6 is enabled which is shown as True for the command output. We will disable the IPv6 for the interface named Ethernet0 with the Disable-NetAdapterBinding command like below. But keep in mind that the PowerShell should be opened with Administrator privileges which are described below. If not you will get an “Access is denied” error.
PS> Disable-NetAdapterBinding -InterfaceAlias "Ethernet0" -ComponentID ms_tcpip6
Disable IPv6 for MacOSX
The IPv6 is enabled for the MacOSX operating systems. It can be disabled from the TCP/IP configuration. First open the TCP/IP configuration by following these steps System Preferences -> Network ->Ethernet /Wireless -> Advanced -> TCP/IP. There you will see the Configure IPv6 line which is configured as “Link-local only“. Change this configuration as Automatically.
Disable IPv6 for Linux (Ubuntu, Mint, Debian, Kali, CentOS)
Most of the Linux distributions like Ubuntu, Mint, Debian, Kali, CentOS comes with IPv6 enabled by default. IPv6 can be disabled from GUI or command line but disabling from the command line is the easiest way. We will use the sysctl command to disable IPv6 related configuration like below. We will also use the sudo command for root privileges where the root user does not require it.
$ sudo sysctl -w net.ipv6.conf.all.disable_ipv6=1 $ sudo sysctl -w net.ipv6.conf.default.disable_ipv6=1 $ sudo sysctl -w net.ipv6.conf.lo.disable_ipv6=1
This will disable IPv6 temporarily which will not be persistent across reboots. The IPv6 can be disabled permanently even after reboots by putting this configuration into file /etc/sysctl.conf .
net.ipv6.conf.all.disable_ipv6=1 net.ipv6.conf.default.disable_ipv6=1 net.ipv6.conf.lo.disable_ipv6=1