sudo vim /etc/sysctl.conf
添加如下內容
linux
#disable ipv6 net.ipv6.conf.all.disable_ipv6=1 net.ipv6.conf.default.disable_ipv6=1 net.ipv6.conf.lo.disable_ipv6=1
執行
shell
sudo sysctl -p
備註:vim /etc/sysctl.conf後執行sysctl -p 報錯vim
error: "net.bridge.bridge-nf-call-ip6tables" is an unknown key error: "net.bridge.bridge-nf-call-iptables" is an unknown key error: "net.bridge.bridge-nf-call-arptables" is an unknown key
解決方法以下:spa
sudo modprobe bridge sudo lsmod|grep bridge
sudo service iptables stop
sudo chkconfig iptables off
sudo setenforce 0
sudo vim /etc/sysconfig/selinux #修改SELINUX=disabled