一直使用system-config-firewall来管理linux下的防火墙功能,但iptables一直不懂。这里记录一下使用的脚本:linux
iptables -I INPUT 7 -p tcp -m state --state NEW -m tcp --dport 12345 -j ACCEPT
另外能够直接编辑/etc/sysconfig/iptables文件来管理,语法差很少。tcp