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信息
如果不包含,则表示禁用成功
原文地址:https://www.cnblogs.com/Kevin-1967/p/8398766.html
时间: 2024-11-02 01:48:06