[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

multiple outbound NAT



Hi,

At one place I have a Debian wheezy machine that acts as router / firewall using iptables and default routing.
I used to have just 1 ip number on the uplink interface. And a simple 
  $IPTABLES --table nat -A POSTROUTING -o $WORLD_IF -j MASQUERADE
line in my firewall script sends all traffic out with that single ip addres via NAT.

Due to several reasons I now have to use more than 1 outbound ip address to make clear from which internal segment the traffic is coming from.
So traffic coming from 172.16.20.0/24 needs to use $WORLD_IP1
And traffic coming from 172.16.22.0/24 needs to use $WORLD_IP2
And maybe traffic coming from 172.16.24.0/23 needs to use $WORLD_IP3

How do I configure something like that?
If it is any use in this case, I have quagga on that machine as well but so far that is used to do routing for the internal network. But I'd rather not mess with that config.

Bonno Bloksma


Reply to: