1

I have a router/host with multiple public IP addresses. I want to change the source ip depending on some destination addresses. This has already been asked here:

If the traffic originates from some internal/other host, then the source address has already been selected and we are forced to use NAT, fine.

So we're with local originated traffic. The answer to the above question suggests, that this only works using appropiate ip route entries using src.

  • Can one create that entry without replicating the default route (which might change for example)?

Another answer on the contrary says, that NAT also works for local originated traffic.

  • Does NAT work for local traffic?
  • IF it works, is there any recommendations whether NAT or routing should be used? My current thoughts go like this:
    • NAT has the pro, that it handles both local and non-local traffic in one rule (one place to maintain config is good!)
    • NAT has all the cons of NAT.
    • Routing makes things more obvious (and possibly goes into IGP easier).
Elrond
  • 556
  • 2
  • 5
  • 16

0 Answers0