configure zimbra firewall howto

[root@mail ~]# cat /etc/sysconfig/iptables
# Firewall configuration written by system-config-firewall
# Manual customization of this file is 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 -s 46.35.160.170/32 –dport 22 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp -s 0/0 –dport 22 -j REJECT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 80 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 53 -j ACCEPT
-A INPUT -m state –state NEW -m udp -p udp –dport 53 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 110 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 443 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 25 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 143 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 993 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 389 -j ACCEPT -s 46.35.160.170/32
-A INPUT -m state –state NEW -m tcp -p tcp –dport 465 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp –dport 587 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp -s 46.35.160.170/32 –dport 7071 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp -s 0/0 –dport 7071 -j REJECT
-A INPUT -m state –state NEW -m tcp -p tcp -s 46.35.160.170/32 –dport 7025 -j ACCEPT
-A INPUT -m state –state NEW -m tcp -p tcp -s 0/0 –dport 7025 -j REJECT
-A INPUT -j REJECT –reject-with icmp-host-prohibited
-A FORWARD -j REJECT –reject-with icmp-host-prohibited
COMMIT

how to flush iptables rules

ето как да ресетнем всичко въведено до момента

iptables  -P  INPUT ACCEPT

iptables -P OUTPUT ACCEPT

iptables -P FORWARD ACCEPT

iptables  -t nat -P  PREROUTING ACCEPT

iptables -t nat -P  POSTROUTING ACCEPT

iptables -t nat -P  OUTPUT ACCEPT

iptables -t mangle -P PREROUTING ACCEPT

iptables  -t mangle -P OUTPUT ACCEPT

iptables  -F

iptables  -t  nat  -F

iptables -t  mangle  -F

iptables  -X

iptables  -t  nat  -X

iptables  -t mangle -X