1:vi/etc/sysconfig/iptables
# Firewall configuration written by System-config-firewall
# Manual Customization of this file are not recommended.
*filter
: INPUT ACCEPT [0:0]
: FORWARD ACCEPT [0:0]
: OUTPUT ACCEPT [0:0]
#-a input-m State--state established,related-j ACCEPT
#-a input-p icmp-j ACCEPT
#-a input-i lo-j ACCEPT
#-a input-m State--state new-m tcp-p TCP--dport 22-j ACCEPT
#-a input-j REJECT--reject-with icmp-host-prohibited
#-a forward-j REJECT--reject-with icmp-host-prohibited
-A input-m state--state new-m tcp-p TCP--dport 3306-j ACCEPT
-A input-m state--state new-m tcp-p TCP--dport 3690-j ACCEPT
-A input-m state--state new-m tcp-p TCP--dport 2001-j ACCEPT
-A input-m state--state new-m tcp-p TCP--dport 3001-j ACCEPT
-A input-m state--state new-m tcp-p TCP--dport 80-j ACCEPT
#-a input-m State--state new-m udp-p TCP--dport 80-j ACCEPT
COMMIT
2:service iptables Restart
Linux Modify Firewall