Centos7关闭ipv6方法

 时间:2024-11-03 03:31:19

1、使用ifconfig命令查看,如果出现ipv6表明开启了

Centos7关闭ipv6方法

2、cat /etc/sysctl.conf|grep -q "net.ipv6.conf.all.disable_ipv6=1"if [ "$?" != "0" ]; thencat >> /etc/sysctl.conf << EOFnet.ipv6.conf.all.disable_ipv6=1EOFfi

Centos7关闭ipv6方法

3、使用vim /etc/sysctl.conf进行验证

Centos7关闭ipv6方法

4、cat /etc/sysconfig/network|grep -q "NETWORKING_IPV6=no"if [ "$?" != "0" ]; thencat >> /etc/sysconfig/network << EOFNETWORKING_IPV6=noEOFfi

Centos7关闭ipv6方法

5、使用vim /etc/sysconfig/network进行验证

Centos7关闭ipv6方法

6、cat /etc/sysconfig/network-scripts/ifcfg-eth0|grep -q "IPV6INIT=no"if [ "$?" != "0" ]; thencat >> /etc/sysconfig/network-scripts/ifcfg-eth0 << EOFIPV6INIT=noEOFfi

Centos7关闭ipv6方法

7、使用vim /etc/sysconfig/network-scripts/ifcfg-eth0进行验证

Centos7关闭ipv6方法

8、关闭ip6tables开机自启动chkconfig ip6tables off

Centos7关闭ipv6方法

9、sysctl -p

Centos7关闭ipv6方法

10、使用ifconfig再次进行验证

Centos7关闭ipv6方法
  • Cloudreve在虚拟主机下安装伪静态问题解决方法
  • 利用Windows命令行创建ASP.NET Core应用程序
  • Commvault 如何从备份中恢复数据
  • eclipse上的svn如何检出工程
  • Linux系统中查看MAC和编辑网卡信息
  • 热门搜索
    雷电王座怎么去 立即的近义词 沙宣发型 怎么做代理商 乘机的近义词 本科怎么考 四川师范大学怎么样 长脸发型 怎么做好ppt 迟疑的近义词是什么