Your VPS has both IPv4 and IPv6 address enabled by default in the operating system.
If you want to disable IPv6, you can do that within the operating system of the VPS.
From:
From:
Location: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters
Name: DisabledComponents
Type: REG_DWORD
Min Value: 0x00 (default value)
Max Value: 0xFF (IPv6 disabled)
To disable IPv6, you can execute the following command to modify the registry.
CentOS 7
To verify if IPv6 is enabled or not, execute the following command:
# ifconfig -a | grep inet6
inet6 fe80::211:aff:fe6a:9de4 prefixlen 64 scopeid 0x20
inet6 ::1 prefixlen 128 scopeid 0x10[host]
To disable IPv6 temporarily on CentOS 7, execute the following commands.
The below command will temporarily disable IPv6, meaning that the settings will not persist after reboot.
To re-enable IPv6 reboot your system or execute the below commands again however reverse the logic and change 1 to 0.
inet6 fe80::211:aff:fe6a:9de4 prefixlen 64 scopeid 0x20
inet6 ::1 prefixlen 128 scopeid 0x10[host]
sysctl -w net.ipv6.conf.all.disable_ipv6=1
sysctl -w net.ipv6.conf.default.disable_ipv6=1
To disable IPv6 permanently including reboots, you can modify the /etc/default/grub file by adding "ipv6.disable=1" to the GRUB_CMDLINE_LINUX parameter.
sysctl -w net.ipv6.conf.default.disable_ipv6=1
From:
GRUB_CMDLINE_LINUX="console=tty0 rd_NO_PLYMOUTH crashkernel=auto console=ttyS0,115200"
To:
GRUB_CMDLINE_LINUX="console=tty0 rd_NO_PLYMOUTH crashkernel=auto console=ttyS0,115200 ipv6.disable=1"
After modifying the /etc/default/grub file file, regenerate the Grub menu by executing the following command.
grub2-mkconfig -o /boot/grub2/grub.cfg
Restart the system and verify that IPv6 has been disabled.
reboot
ip addr show | grep inet6
Ubuntu 20.04
To disable IPv6 temporarily on Ubuntu 20.04, execute the following commands. The below command will temporarily disable IPv6, meaning that the settings will not persist after reboot. To re-enable IPv6 reboot your system or execute the below commands again however reverse the logic and change 1 to 0.
sysctl -w net.ipv6.conf.all.disable_ipv6=1
sysctl -w net.ipv6.conf.default.disable_ipv6=1
To disable IPv6 permanently including reboots, you can modify the /etc/default/grub file by adding "ipv6.disable=1" to the GRUB_CMDLINE_LINUX_DEFAULT parameter.
sysctl -w net.ipv6.conf.default.disable_ipv6=1
From:
GRUB_CMDLINE_LINUX_DEFAULT="quiet elevator=noop fsck.repair=yes"
To:
GRUB_CMDLINE_LINUX_DEFAULT="quiet elevator=noop fsck.repair=yes ipv6.disable=1"
After modifying the /etc/default/grub file file, update the Grub menu by executing the following command.
sudo update-grub
Windows 2019
By default, Windows favors IPv6 over IPv4 addresses. The IPv6 functionality can be configured by modifying the following registry key:Location: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters
Name: DisabledComponents
Type: REG_DWORD
Min Value: 0x00 (default value)
Max Value: 0xFF (IPv6 disabled)
To disable IPv6, you can execute the following command to modify the registry.
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters" /v DisabledComponents /t REG_DWORD /d 255 /f
To enable IPv6, you can execute the following command to modify the registry.
reg add "HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip6\Parameters" /v DisabledComponents /t REG_DWORD /d 0 /f