Skip to contentSkip to conversation

iptables NAT entry times out but connects from firewall

DISCUSSION Hanasaki JiJi 2 participants 2 messages Apr 28, 2003 – Apr 29, 2003

lore
Share & tools
lore
#0 lore raw

There is a firewall with two NICs and the below rule to allow an internal host to connect out to smtp servers on the internet. Some hosts have a connection timeout on a connect from $INTERNAL_IP_OF_SMTP yet connect from the firewall just fine.

iptables -t nat -A POSTROUTING -p tcp -o $NIC_EXTERNAL \
--dport 25 -s $INTERNAL_IP_OF_SMTP -j MASQUERADE

ex:
on firewall:
telnet csoc-mail-msfc.csoconline.com 25

above connects ok

on $INTERNAL_IP_OF_SMTP
telnet csoc-mail-msfc.csoconline.com 25

connection times out

#1 lore raw
Quoted 4 lines · Hanasaki JiJi

There is a firewall with two NICs and the below rule to allow an internal host to connect out to smtp servers on the internet. Some hosts have a connection timeout on a connect from $INTERNAL_IP_OF_SMTP yet connect from the firewall just fine.

this seems to be an iptables usage problem, please follow-up to the netfilter mailinglist at [email protected].

for more information, plaese see the netfilter homepage at
http://www.netfilter.org

Signature · 5 lines
- Harald Welte <[email protected]>             http://www.netfilter.org/
============================================================================
  "Fragmentation is like classful addressing -- an interesting early
   architectural error that shows how much experimentation was going
   on while IP was being designed."                    -- Paul Vixie