Bird Brother Chaoyangchun client Firewall Design and Firewall Rule Storage
# 1. Clear Rul
Iptables-F clears all established rules
Iptables-X kills all users'"custom" chain (tables should be said)
Iptables-Z returns all chain counts and traffic statistics to zero.
# 2. Set a policy
Iptables-P INPUT DROP
Iptables-P OUTPUT ACCEPT
Iptables-P FORWARD ACCEPT
# 3-5. Make rules
Iptables-An INPUT-I lo-j ACCEPT
Iptables-An INPUT-I eth0-m state-- state RELATED,ESTABLISHED-j ACCEPT
# iptables-An INPUT-I eth0-s 192.168.1.0 take 24-j ACCEPT
# 6. Write to firewall rule profile
/ etc/init.d/iptables save
[root@www ~] # sh bin/firewall.sh
Iptables: Saving firewall rules to / etc/sysconfig/iptables: [OK]