All of lore.kernel.org
 help / color / mirror / Atom feed
* NAT for multiple non-directly connected subnets
@ 2007-11-08 21:53 Bradley Kite
  2007-11-08 22:04 ` Matt Zagrabelny
  0 siblings, 1 reply; 12+ messages in thread
From: Bradley Kite @ 2007-11-08 21:53 UTC (permalink / raw)
  To: netfilter

Hi all,

I've been using NAT for my home network (a single /24 RFC1918 address
range) and it has been working well, however I've recently tried
NATing a more complex environment environment as follows:

 Linux Machine:
Internal Interface: 192.168.1.50/30 -> 192.168.1.49/30
External Interface: 81.179.30.111/24

Now, connected off the internal interface is a whole network
consisting of several subnets all linked off each other - ie they are
not directly connected to the linux machine.

The problem I have is that the NAT on the linux box is only actually
nating traffic that comes directly from  192.168.1.49 - the first
upstream router. Any traffic from, for example, 192.168.2.0/24 wont
get natted to  81.179.30.111  as expected. I can see this with tcpdump
- traffic from the directly connected router gets natted, other
traffic is seen (so its not a routing issue) its just not being
natted.

I am using kernel 2.6.18 and this is the rule I'm using for iptables:

iptables --table nat -A POSTROUTING -o eth0 -j SNAT --to-source 81.179.30.111

Is there any thing I am missing with this configuration? Is there some
limitation with doing NAT that only allows directly connected subnets
to be natted?

Any help or suggestions will be much appreciated as I've tried all
configurations that I can think of and I'm at my limit now.

--
Brad.

^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2007-11-10  8:29 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-11-08 21:53 NAT for multiple non-directly connected subnets Bradley Kite
2007-11-08 22:04 ` Matt Zagrabelny
2007-11-08 22:17   ` Bradley Kite
2007-11-08 22:23     ` Grant Taylor
2007-11-08 22:25     ` Matt Zagrabelny
2007-11-08 22:34       ` Bradley Kite
2007-11-08 22:37         ` Grant Taylor
2007-11-09 10:43         ` Bradley Kite
2007-11-09 15:42           ` Bradley Kite
2007-11-09 16:47             ` Grant Taylor
2007-11-09 23:08             ` Pascal Hambourg
2007-11-10  8:29               ` Bradley Kite

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.