Skip to contentSkip to conversation

Are ok those rules to not filter smtp?

DISCUSSION Alfredo Muchut 2 participants 2 messages Oct 17, 2002 – Oct 23, 2002

lore
Share & tools
lore
#0 lore raw

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

#1 lore raw
Quoted 1 line · Alfredo Muchut

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

I'd guess it's the remote mail server sending an IDENT request and getting no response.

Antony.

Signature · 6 lines
There are two possible outcomes.

If the result confirms the hypothesis, then you've made a measurement.
If the result is contrary to the hypothesis, then you've made a discovery.

 - Enrico Fermi