RHEL6關閉IPv6

一、在/etc/modprobe.d/目錄下增長一個新的配置文件ipv6.conf
cat << EOF > /etc/modprobe.d/ipv6.conf
 alias net-pf-10 off
 alias ipv6 off
EOF
  此步能夠禁用ipv6可是重啓網絡報錯:FATAL: Module off not found.因此建議使用下面更新的內容:
 
cat << EOF > /etc/modprobe.d/ipv6.conf
 alias net-pf-10 off
options ipv6 disable=1
EOF  
二、在 /etc/sysconfig/network新增一行內容:
NETWORKING_IPV6=off
三、禁止服務ip6tables隨系統啓動
#chkconfig ip6tables off
四、而後重啓系統
#reboot
五、確認禁用ip是否禁用成功,運行以下命令,無內容輸出便可
#ip -6 addr show
#lsmod |grep ipv6
相關文章
相關標籤/搜索