ubuntu22.04 server 关闭IPV6
1、
vim /etc/sysctl.conf
net.ipv6.conf.all.disable_ipv6=1 net.ipv6.conf.default.disable_ipv6=1 net.ipv6.conf.lo.disable_ipv6=1
2、
vim /etc/rc.local
#!/bin/bash # /etc/rc.local /etc/sysctl.d /etc/init.d/procps restart exit 0
3、
sudo chmod 755 /etc/rc.local
4、
sysctl -p

浙公网安备 33010602011771号