centos6.x徹底禁用IPv6的方法

具體方法:dom

1.修改/etc/sysconfig/network,追加:ip

NETWORKING_IPV6=nonetwork

2.修改/etc/hosts,把ipv6的那句本地主機名解析的也註釋掉:grep

#::1   localhost localhost6 localhost6.localdomain6方法

3.在/etc/modprobe.d/dist.conf結尾添加:hosts

alias net-pf-10 off
alias ipv6 off註釋

而後重啓系統。di

執行lsmod | grep -i ipv6 和 ifconfig | grep -i inet6,若是什麼都沒有則說明成功禁用。co

相關文章
相關標籤/搜索