All of lore.kernel.org
 help / color / mirror / Atom feed
* per machine SNAT
@ 2006-06-30 13:03 Ramen Sen
  0 siblings, 0 replies; only message in thread
From: Ramen Sen @ 2006-06-30 13:03 UTC (permalink / raw)
  To: netfilter

Hi all,

I'm hoping someone might be able to point me in the right direction.

I have a large number of machines (potentially > 65,000) that I need to
be able SNAT to particular addresses for particular machines, onto a
different network.

Essentially I'm trying to achieve a dynamic DHCP -> fixed address
mapping onto a different network for logging and filtering based on ip
address.  (The easiest way would be to do away with dynamic DHCP but I
unfortunately do not have that option.  Also I will need to map
different networks onto the same network, which also negates the use of
static DHCP option.)

One way to do this is to write a custom rule for each machine, eg:

Chain POSTROUTING (policy ACCEPT)
target 	prot	opt 	source		destination
SNAT 	all 	--	192.168.100.50	anywhere	to: 10.0.0.1
SNAT 	all 	--	192.168.100.17	anywhere	to: 10.0.0.2
SNAT 	all 	--	172.16.45.18	anywhere	to: 10.0.0.3
...etc...

That's ok for a small number of machines, but performance obviously
drops off quickly for large numbers of rules.

I looked at using ipset, but this does seem to be able to be used in
this kind of case.

Also, unfortunately there is no algorithmic mapping in this case - the
information for the mappings will be stored in a database that will be
used to populate the rules.

Can anyone suggest a possible solution?  I am willing to write my own
GPL'd kernel module (probably based on another that is part way there -
e.g. ipset) if that is the answer, but before I throw my effort into
that, I'm hoping that someone else might have an idea.

regards
Ramen Sen



^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2006-06-30 13:03 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-06-30 13:03 per machine SNAT Ramen Sen

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.