轉自網絡資料,目前最簡單直接的方法
CentOS6
在/etc/modprobe.d/dist.conf結尾添加
alias net-pf-10 off
alias ipv6 off
然後chkconfig ip6tables off關閉ipv6的防火牆功能
重啓即可
2016-05-05更新
以上方法對CentOS6.7 32bit無效,改爲使用以下方法
1. vi /etc/sysctl.conf
新增行:
net.ipv6.conf.all.disable_ipv6=1
2. 編輯網卡配置文件
新增行:
NETWORKING_IPV6="no"
IPV6_AUTOCONF=no
3.卸載模塊 #這一步可不做
vi /etc/modprobe.d/blacklist.conf
新增行:
blacklist ipv6
4.開機不啓動
chkconfig ip6tables off