Disable ipv6 on Ubuntu & Debian
How to disable ipv6 on Ubuntu & Debian?
configure
add the following lines into /etc/sysctl.conf
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
sudo sysctl -p
check
cat /proc/sys/net/ipv6/conf/all/disable_ipv6
1
you may also find the inet6 in ifconfig is disappeared.
Some of the content is generated by AI, please be cautious in identifying it.