From: Ramen Sen <ramen@intnetsystems.com>
To: netfilter@lists.netfilter.org
Subject: per machine SNAT
Date: Fri, 30 Jun 2006 14:03:28 +0100 [thread overview]
Message-ID: <44A52120.7020206@intnetsystems.com> (raw)
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
reply other threads:[~2006-06-30 13:03 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=44A52120.7020206@intnetsystems.com \
--to=ramen@intnetsystems.com \
--cc=netfilter@lists.netfilter.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.