From: Alfredo Muchut <amuchut@sanluis.gov.ar>
To: netfilter@lists.netfilter.org
Subject: Are ok those rules to not filter smtp?
Date: Thu, 17 Oct 2002 20:54:42 -0300 [thread overview]
Message-ID: <02101721054005.10974@linux1.egovernment> (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
next reply other threads:[~2002-10-17 23:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-10-17 23:54 Alfredo Muchut [this message]
2002-10-23 9:35 ` Are ok those rules to not filter smtp? Antony Stone
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=02101721054005.10974@linux1.egovernment \
--to=amuchut@sanluis.gov.ar \
--cc=netfilter@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox