Skip to contentSkip to conversation

iptables smtp

DISCUSSION Kancha . 1 participant 1 message Oct 25, 2002

lore
Share & tools
lore

Kancha .

author
#0 lore raw

Below is my iptables rules:

# create allowed chain
/sbin/iptables -N allowed
/sbin/iptables -A allowed -p TCP --syn -j ACCEPT
/sbin/iptables -A allowed -p TCP -m state --state
ESTABLISHED, RELATED -j ACCEPT

/sbin/iptables -A FORWARD -p tcp -i $EXT_IF -o $DMZ_IF -d $MAILSERVER --dport 25 -j allowed

/sbin/iptables -A FORWARD -p tcp -o $EXT_IF -i $DMZ_IF -s $MAILSERVER --dport 25 -j allowed

$DMZ_IF and $EXT_IF are interfaces connected DMZ and External network respectively. An SMTP connection can be established from external network to dmz, but the same cannot be done from DMZ to external network. What's wrong with my script ?? Isnt' the last iptables rule suppose to allow smtp connection from dmz to external network ??

kancha.

__________________________________________________
Do you Yahoo!?
Y! Web Hosting - Let the expert host your web site
http://webhosting.yahoo.com/