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

 

posted @ 2022-06-14 20:30  thanksw  阅读(865)  评论(0)    收藏  举报