chmod 755 /
chmod 755 /etc
chmod 755 /etc/rc.d
chmod 755 /etc/rc.d/rc.local
(以上4条很重要!!!)
vim /etc/rc.d/rc.local
echo 1 > /proc/sys/net/ipv4/ip_forward
iptables -F
iptables -Z
iptables -X
iptables -t nat -I POSTROUTING -s 内部网络号/子网掩码位数 -o 出口网卡dev名 -j MASQUERADE
如果觉得《双网卡centos7 iptables防火墙与/etc/rc.d/rc.local开机运行》对你有帮助,请点赞、收藏,并留下你的观点哦!