In Linux-like operating systems, you can disable IPv6 both for all interfaces and for a specific one. There are generic methods that can be applied to all operating systems.
/etc/sysctl.d/
:cd /etc/sysctl.d/
99-sysctl.conf
the necessary parameters to disable IPv6, which can be done in several ways:vi 99-sysctl.conf
You need to add the following lines to the end of the file:
net.ipv6.conf.all.disable_ipv6 = 1 net.ipv6.conf.default.disable_ipv6 = 1
printf "\n net.ipv6.conf.all.disable_ipv6 = 1 \n net.ipv6.conf.default.disable_ipv6 = 1" >> 99-sysctl.conf
sysctl -p
ifconfig
ifconfig
eth0
./etc/sysctl.d/
:cd /etc/sysctl.d/
99-sysctl.conf
the necessary parameters to disable IPv6, which can be done in several ways:vi 99-sysctl.conf
At the end of the file you need to add a line:
net.ipv6.conf.eth0.disable_ipv6 = 1
Instead eth0
specify the interface you want.
printf "\n net.ipv6.conf.eth0.disable_ipv6 = 1" >> 99-sysctl.conf
Instead eth0
specify the interface you want.
sysctl -p
ifconfig