设置宿主机IP内核规则
问题:docker可以ping通宿主机IP,ping不同www.baidu.com等外网
[root@ci-node1 ~]# cd /usr/lib/sysctl.d
[root@ci-node1 sysctl.d]# ls
00-system.conf 10-default-yama-scope.conf 50-default.conf 60-libvirtd.conf
[root@ci-node1 sysctl.d]# echo net.ipv4.ip_forward=1 >> 00-system.conf
[root@ci-node1 sysctl.d]# cat 00-system.conf
# Disable netfilter on bridges.
net.bridge.bridge-nf-call-ip6tables = 0
net.bridge.bridge-nf-call-iptables = 0
net.bridge.bridge-nf-call-arptables = 0
#添加net.ipv4.ip_forward=1规则
net.ipv4.ip_forward=1
[root@ci-node1 sysctl.d]# systemctl restart network