关闭ubuntu的IPv6 的方法

Tuesday, Aug 24, 2021 | 1 minute read | Updated at Tuesday, Aug 24, 2021

@

修改 /etc/sysctl.conf 文件 添加以下内容

net.ipv6.conf.all.disable_ipv6=1
net.ipv6.conf.default.disable_ipv6=1
net.ipv6.conf.lo.disable_ipv6=1

执行 sysctl -p 使设置生效

懒人版

echo "net.ipv6.conf.all.disable_ipv6=1 

net.ipv6.conf.default.disable_ipv6=1  

net.ipv6.conf.lo.disable_ipv6=1  

" » /etc/sysctl.conf

© 2018 - 2026 vpslala

🌱 Powered by Hugo with theme Dream.