# IPFW and NAT



## kalman84 (Nov 8, 2010)

Hello,

sorry for posting the third post on the argument but actually they are referred to different aspects of the same thing.

Basically I need to choice the network interface on the base of the user ID. For doing this I was thinking to use ipfw, for forwarding the traffic toward the gateway of the selected interface.

The problem is that:
fwd action of ipfw doesn't really change anything in the ip packet, in particular it doesn't change the destination ip address (that's good for my purposes), but it doesn't change the source ip address neither (that's not good at all).

in fact, when I forward the traffic using ipfw, the source ip address of the ip packet is still the one of the network interface chosen by default, so that noway it could work.

So I think I'd need a NAT function. Is there any built in NAT I can use for this purpose?
Any other suggestion?

Thanks


----------

