1. 禁止加载IPv6模块
# echo "install ipv6 /bin/true" > /etc/modprobe.d/disable-ipv6.conf
每当系统需要加载IPv6模块时,强制执行/bin/true来代替实际加载的模块。
2. 关闭ip6tables
# chkconfig ip6tables off
3. 禁用基于IPv6网络,使之不会被触发启动
# vi /etc/sysconfig/network
NETWORKING_IPV6=no
4. 禁用网卡IPv6设置,使之仅在IPv4模式下运行
# vi /etc/sysconfig/network-scripts/ifcfg-ethX 或 vi /etc/sysconfig/network-scripts/ifcfg-em1X
IPV6INIT=no
IPV6_AUTOCONF=no
5. 重启生效
# reboot
6. 验证是否生效
# lsmod | grep ipv6
如果没有任何输出就说明IPv6模块已被禁用,否则被启用
方法二:
在/etc/modprobe.d/dist.conf中追加
alias net-pf-10 off
alias ipv6 off 
重启即可

相关文章:

  • 2022-12-23
  • 2021-05-16
  • 2022-12-23
  • 2021-09-30
  • 2021-07-27
  • 2021-11-09
  • 2021-09-14
  • 2022-12-23
猜你喜欢
  • 2021-12-31
  • 2022-12-23
  • 2021-07-19
  • 2022-02-25
  • 2022-12-23
  • 2021-07-21
  • 2022-12-23
相关资源
相似解决方案