开机自启 - "iptables"和"route"
- /etc/rc.local
iptables-save > /etc/sysconfig/iptables-rule
echo "iptables-restore < /etc/sysconfig/iptables-rule" >> /etc/rc.local
chmod +x /etc/rc.d/rc.local
- em1-rules
192.168.1.0/24 via 192.168.0.1 dev em1
- em1-iptables
-A INPUT -i em1 -p tcp --dport 22 -j ACCEPT
-A OUTPUT -o em1 -p tcp --sport 80 -j ACCEPT
欢迎加 1092845214 交流沟通呀~
本文来自博客园,作者:难德糊涂,转载请注明原文链接:https://www.cnblogs.com/yangkaiyue/p/18244887