Are ok those rules to not filter smtp?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



When I send a mail, there is a delay of  15 second. Why is this problem?

Thank you, for your help. 


ITF_EXT=eth1
ITF_INT=eth0
MAIL_SERVER="200.26.91.2"
WEB_SERVER="200.26.91.10"
 
echo 1 > /proc/sys/net/ipv4/ip_forward
 
# Nuevas chains
iptables -N externa-interna
iptables -N interna-externa
iptables -N interna-if
 
 
# Politicas paras INPUT OUTPUT (el INPUT no tiene DROP, pues esta en cada cadena que llama)
iptables -P INPUT DROP
iptables -A INPUT -i $ITF_EXT -j externa-interna
iptables -A INPUT -i $ITF_INT -j interna-if
iptables -P OUTPUT ACCEPT
 
# Forward
iptables -A FORWARD -i $ITF_EXT -o $ITF_INT -j externa-interna
iptables -A FORWARD -i $ITF_INT -o $ITF_EXT -j interna-externa
iptables -A FORWARD -j DROP
 
 
# De afuera hacia adentro (no sean inicio de seccion)
iptables -A externa-interna -p tcp ! --syn -s $MAIL_SERVER --sport smtp -j ACCEPT
iptables -A externa-interna -p tcp ! --syn -s $MAIL_SERVER --sport pop-3 -j ACCEPT
iptables -A externa-interna -p tcp ! --syn -s $WEB_SERVER --sport ftp -j ACCEPT
iptables -A externa-interna -p icmp --icmp-type pong -j ACCEPT
 
 
# De adentro hacia afuera.
iptables -A interna-externa -d $MAIL_SERVER -p tcp --dport smtp -j ACCEPT
iptables -A interna-externa -d $MAIL_SERVER -p tcp --dport pop-3 -j ACCEPT
iptables -A interna-externa -d $WEB_SERVER -p tcp --dport ftp -j ACCEPT   
 iptables -A interna-externa -p icmp --icmp-type ping -j ACCEPT
 
 
# Interna-if
iptables -A interna-if -p icmp --icmp-type ping -j ACCEPT
iptables -A interna-if -p icmp --icmp-type pong -j ACCEPT
iptables -A interna-if -s 200.26.92.0/24 -d 200.26.92.4 -p tcp -j ACCEPT
 
 
# Postrouting
iptables -t nat -A POSTROUTING -o $ITF_EXT -j MASQUERADE                                                                                         



[Index of Archives]     [Linux Netfilter Development]     [Linux Kernel Networking Development]     [Netem]     [Berkeley Packet Filter]     [Linux Kernel Development]     [Advanced Routing & Traffice Control]     [Bugtraq]

  Powered by Linux