Centos 7禁用关闭IPv6的方法
1.在/etc/sysctl.conf中添加此规则:
net.ipv6.conf.all.disable_ipv6 = 1
2.在/etc/sysconfig/network中添加此规则:
NETWORKING_IPV6 = no
3.在/etc/sysconfig/network-scripts/ifcfg-ethX中添加此规则:
IPV6INIT = no
4.关闭防火墙的开机自启动服务:
systemctl disable ip6tables.service
5.重新加载sysctl配置或者重启服务器
#sysctl -p
or
#reboot
注:
在/etc/sysconfig/network-scripts/ifcfg-ethX中ethX为网卡名
示例:

vi /etc/sysctl.conf
vi /etc/sysconfig/network
vi /etc/sysconfig/network-scripts/ifcfg-eth0
建议阅读
- SSH 登录时出现如下错误:Disconnected:No supported authentication methods available(查看: 65131)
- 关于我们(查看: 2973)
- 问题解决:WSL的OracleLinux_7_9报错Failed to get D-Bus connection: Operation not permitted解决办法(查看: 452)
- Linux为新硬盘创建LVM(查看: 1464)
- 问题解决:WSL的OracleLinux_7_9报错Failed to get D-Bus connection: Operation not permitted解决办法(查看: 732)
中国
中国香港特别行政区
韩国
日本
新加坡
文莱
阿富汗
不丹
美国
墨西哥
巴拿马
巴哈马
古巴
多米尼加
格陵兰
危地马拉
阿根廷
玻利维亚
巴西
智利
哥伦比亚
厄瓜多尔
法属圭亚那
巴拉圭
美国云服务器
日本云服务器
新加坡云服务器
