ipv6
Contents
Permanently Disable IPv6 on Linux
# Remove any existing IPv6 settings to ensure a clean configuration
sed -i '/net.ipv6.conf.all.disable_ipv6/d' /etc/sysctl.conf
sed -i '/net.ipv6.conf.default.disable_ipv6/d' /etc/sysctl.conf
sed -i '/net.ipv6.conf.lo.disable_ipv6/d' /etc/sysctl.conf
# Add configurations to disable IPv6
echo "net.ipv6.conf.all.disable_ipv6=1" >>/etc/sysctl.conf
echo "net.ipv6.conf.default.disable_ipv6=1" >>/etc/sysctl.conf
echo "net.ipv6.conf.lo.disable_ipv6=1" >>/etc/sysctl.conf
# Apply the changes
sysctl -p >/dev/null 2>&1