> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Paul McDonald

> We have 15 internal servers generating outbound traffic.  Currently there is
> no NATing of the source addresses.  What we are interested in is NATing the
> source address *sometimes* but not *all* the time, with that decision being
> *very* dynamic and up to the application that is running on the 15 internal
> servers.

Would each application decide on a per-connection instance basis whether to
NAT or not?  In other words, would application X on server A sometimes NAT and
sometimes not?

Or is it the case that one particular application will always NAT, but that
other applications on the same server may or may not NAT?

It seems like it would be more cost effective, efficient and maintainable to
simply add an additional network interface to each server (whether a real NIC
or a virtual interface).  Then one interface should route via a non-NAT route,
and the other interface should always route via NAT.  The applications would
choose to bind to the appropriate interface depending on whether they wanted
NAT or not.

> For example, server A would bind to a specific interface & port, it would
> then contact this API on the ipfilt machine to add a rule for the IP address
> *and* port to NAT to another address.  When the application on server A
> closes the connection it would contact the API and remove the rule.  What I
> am concerned about is the impact of *lots* of rule adds/deletes on the
> performance of the machine running ipfilt and whether it is even practical.

Without looking at the code, but having had experience writing kernel-level
code (filesystems and device drivers), my wild guess is that adding/dropping
rules involves some single-threaded mutual exclusion (mutex) locks of some
sort.  That being the case, I think you'd be really asking for performance
problems (and crashes unless the code were 100% perfect), making lots of
ruleset changes.

And your ipfilt machine API probably ought to have some good authentication.
Otherwise some hacker could really cause damage, what with an exposed network
API that lets them manipulate your NAT tables.

Someone more familiar with the code will no doubt come along and correct me if
I'm wrong, though!  :-)



Reply via email to