03-27-2012 11:41 AM - edited 02-21-2020 05:58 PM
Hi Folks,
I have a question regarding both Site to Site IPSEC VPN and NAT. Basically what I want to achieve is to do the following:
ASA2 is at HQ and ASA1 is a remote site. I have no problem setting up a static static Site to Site IPSEC VPN between sites. Hosts residing at 10.1.0.0/16 are able to communicate with hosts at 192.168.1.0/24, but what i want is to setup NAT with IPSEC VPN so that host at 10.1.0.0/16 will communicate with hosts at 192.168.1.0/24 with translated addresses
Just an example:
Host N2 (10.1.0.1/16) will communicate with host N1 192.168.1.5 with destination lets say 10.23.1.5 not 192.168.1.5 (Notice the last octet should be the same in this case .5)
The same translation for the rest of the communication (Host N2 pings host N3 destination ip 10.23.1.6 not 192.168.1.6. again last octet is the same)
It sounds a bit confusing for me but i have seen this type of setup before when I worked for managed service provider where we had connection to our clients (Site to Site Ipsec VPN with NAT, not sure how it was setup)
Basically we were communicating with client hosts over site to site VPN but their real addresses were hidden and we were using translated address as mentioned above 10.23.1.0/24 instead of (real) 192.168.1.0/24, last octet should be the same.
Appreciate if someone can shed some light on it.
Solved! Go to Solution.
03-27-2012 12:26 PM
Hi,
Ok so were going with the older NAT configuration format
To me it seems you could do the following:
I could test this setup tomorrow at work but let me know if it works out.
Please rate if it was helpful
- Jouni
03-27-2012 12:06 PM
Hi,
What software are you running on the ASAs?
Just asking because the NAT configurations changed when moving from 8.2 -> forward (8.3 , 8.4 , 8.5)
03-27-2012 12:11 PM
Hi JouniForss,
Both ASAs have Version 8.0(2) software. I'm implementing this setup in lab environment.
Thanks
03-27-2012 12:26 PM
Hi,
Ok so were going with the older NAT configuration format
To me it seems you could do the following:
I could test this setup tomorrow at work but let me know if it works out.
Please rate if it was helpful
- Jouni
03-27-2012 12:41 PM
Thanks Jouni,
I had a feeling that i would use a Static Policy NAT, but had some doubts regarding the traffic flow logic. I'll try this now and let you know.
Parves
03-27-2012 12:44 PM
Hi,
I've actuall done a sametype of NAT setup on our own network.
Though in that case I did around 20 of single address static policy nat translations instead of doing one for the whole network.
So should work
03-28-2012 05:38 AM
Spot on Jouni,
works like a charm. Thanks for a help. One more thing though, I need some clarification if you don't mind. When host N2 communicates with host N1 (10.23.1.5) ASA1 performs translate, how come? Before I though that if I apply Static Policy Nat the direction of policy is from inside to outside. Like you said that policy nat dictates if traffic from inside interface and from inside network going to X destination then translate it to x.x.x.x , but to me it does not make sense that how ASA 1 knows that it needs to translate incoming traffic from ASA2 via tunnel. Lets see this from ASA2 perspective, as far as i understand from this setup is that when interesting traffic enters ASA2 then ASA2 routes the traffic via tunnel <<< 10.1.0.1="" ="" 10.23.1.5="">>>, ASA1 receives it (I could not figure out this part) translates dest. to real ip (192.168.1.5). The weirdest part is about last octet. How ASA1 knows that it needs to translate 10.23.1.5 to 192.168.1.5 (lets assume that this is the first packet in entire communication from host N2(initiator) to host N1?>
Many Thanks
03-28-2012 06:08 AM
Hi,
Never had a really thorough understanding of the process itself. Usually I have enough time to make things to work but not enough to really read up on the theory behind the actual process.
I think the reason is simply that the NAT is bi-directional. So it works both directions. ASA sees traffic coming to host on network 10.23.1.0/24 so it finds a matching rule to that traffic when its going through its own process of forwarding the traffic. (sees the Static Policy NAT configuration, same thing works with NAT0 I guess)
The question about the real and NAT IP last octect staying the same most probably relates to the fact that the source network in the access-list is with network mask of /24 (just like to NAT network 10.23.1.0/24) and as both the NAT address and access-list address end with ".0" it matches the untranslated and translated address by the last octect.
This is how I understand it. I'm sure though that someone can explain it a bit better
- Jouni
03-28-2012 06:26 AM
Never mind. I was thinking something similar to it about real and NAT ip, but as long things work, the life is good. Thanks for your help.
04-21-2012 04:35 PM
I'm wondering instead of doing it like this can this work as well?
"nat (inside) 5 192.168.1.5"
"global (outside) 5 10.23.1.5
or something like:
"nat (inside) 5 192.168.1.0 255.255.255.248"
"global (outside) 5 10.23.1.1-10.23.1.5 netmask 255.255.255.248"
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide