We help IT Professionals succeed at work.

NAT by destination IP

mw-hosting asked
Is there a way to NAT an IP depending on the destination IP?

I have a load balancer that sends data out one IP no matter what LB pool the data comes from.

Example of what I want:  
data from dest 63.x.x.x/24 - NAT IP to (vpn#1)
data from dest 85.x.x.x/24 - NAT IP to (vpn#2)
-Any port (80, 443, etc...)
Watch Question

You can create a static NAT

63.x.x.x <-->
85.x.x.x <-->
Sr Software Engineer
what you want is called policy based natting.  it works like such:

access-list path1 permit ip host 63.x.x.x
access-list path2 permit ip host 85.x.x.x

static (inside,outside) access-list path1
static (inside,outside) access-list path2

this will NAT to if the traffic is going to any 63.x.x.x/24 IP and to if going to any 85.x.x.x/24 IP.  I'm not 100% on the syntax, but its roughly like that for policy-based natting