NAT on a multi-homed box

Adrian jimbud@arborlink.com
Mon, 18 Oct 1999 20:22:54 -0500 (EST)


Hi folks,
  I have a box running kernel 2.3.21, netfilter 0.1.10, with two NICs.
One NIC (eth0) goes to a switch on my LAN, while the other one is
connected to an eight port hub in my room.  To this hub I connect other
computers that I have access the LAN, and throught that, the internet.  In
the past I used ipfwadm, ipmasqadm, ipchains, et al.  I setup iptables and
ipnatctl to do the same, and it works, save one thing: now I can't access
services through the eth1 device of my main box, from my main box :)
Let's name these boxes, box0 (the multihomed), and box1 (a box on my
internal network).
So, in other words, if I try to telnet to box0 from box0 using eth1, it
just sits there.  I can ping eth1 from box0 and box1, and well as telnet
to box1 from box0, and vice versa.  Box0 has 1.2.3.4 (some valid internet
address) and 192.168.66.25, and box1 has 192.168.66.27.  It seems to me
that packets are being sent to eth1, but on their way back get confused
and lost, possibly because NAT isn't suppose to mangle packets for the
host.  Anyhow, I confirmed that packets are being sent, for after I try
telnetting, netstat shows this line: 
   box0(eth1):telnet  box0(eth0):2568  SYN_RECV
which means, "I was connected, but then i got sent a termination
sequence."
If I remove the masquerade entry from the NAT tables, I can telnet to
eth1.  So I'm fairly confident that this is the problem.

I'd be grateful if there's a solution to this problem, I've looked
and can't seem to find any switches or flags that pertain to this.

Thanks for listening :)

Adrian