标签:tab rc.d cep ssh port drop war 添加 table
1.iptables -L
2.iptables -F service iptables save or /etc/rc.d/init.d/iptables save
3.iptables -A INPUT -p tcp --dport 22 -j ACCEPT (先保证ssh)
4.iptables -P INPUT DROP
5.iptables -P OUTPUT ACCEPT
6.iptables -P FORWARD DROP
7.添加需要的协议和端口:
eg1: iptables -A INPUT -p icmp -j ACCEPT
eg2: iptables-A INPUT -m state --state ESTABLISHED,RELATED -j ACCEPT iptables-A OUTPUT -m state --state ESTABLISHED,RELATED -j ACCEPT
eg3: iptables -A INPUT -s 192.168.0.104 -p tcp --dport 22 -j ACCEPT iptables -D INPUT -p tcp --dport 22 -j ACCEPT
标签:tab rc.d cep ssh port drop war 添加 table
原文地址:http://www.cnblogs.com/feral/p/6546945.html