首页 > 其他 > 详细

Centos7下常用配置命令

时间:2018-02-01 16:40:15      阅读:229      评论:0      收藏:0      [点我收藏+]

1.禁用ipv6

Step 1: add this rule in /etc/sysctl.conf : net.ipv6.conf.all.disable_ipv6=1

Step 2: add this rule in /etc/sysconfig/network: NETWORKING_IPV6=no

Step 3: add this setting for each nic X (X is the corresponding number for each nic) in /etc/sysconfig/network-scripts/ifcfg-ethX: IPV6INIT=no

Step 4: disable the ip6tables service : chkconfig ip6tables off

Step 5: Reload the sysctl configuration:

# sysctl -p && service network restart
or
# reboot

 

验证ipv6是否成功禁用

方法1

# cat /proc/sys/net/ipv6/conf/all/disable_ipv6

If the output is 0, IPv6 is enabled.

If the output is 1, IPv6 is already disabled.

方法2

ifconfig命令查看网卡信息,是否包含inet6信息

技术分享图片

如果不包含,则表示禁用成功

 

Centos7下常用配置命令

原文:https://www.cnblogs.com/Kevin-1967/p/8398766.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!