03-02-2016 12:59 PM - edited 03-12-2019 12:26 AM
Hello all,
I have seen, and indeed used object groups in a "twice NAT" configuration especially for exempting translation for VPN traffic.
I was wondering how object groups are processed correctly as so far, the results have been as expected. Please see the brief example below:
object-group network vpn-local
network-object 192.168.10.0 255.255.255.0
object-group network vpn-remote
network-object 10.0.10.0 255.255.255.0
network-object 10.0.20.0 255.255.255.0
network-object 10.0.30.0 255.255.255.0
network-object 10.0.40.0 255.255.255.0
nat (inside,outside) 1 source static vpn-local vpn-local destination static vpn-remote vpn-remote
Why and how does the NAT process work when for example, the remote network is 10.0.30.0/24? How does the ASA know to translate that to itself rather than the first object in the list - 10.0.10.0/24?
We make extensive use of object groups in NAT statements and I have never found the logic behind the process!
Thanks in advance,
Solved! Go to Solution.
03-02-2016 05:21 PM
Hi DarrenB_UK,
The logic is the traffic is matched with the NAT entities and since nat exemption takes precedence over other NAT
The statement "nat (inside,outside) 1 source static
states that whenever
You might want to take a moment and go through this wonderful document on nat:
https://supportforums.cisco.com/document/132066/asa-nat-83-nat-operation-and-configuration-format-cli
Hope this helps.
Regards,
Dinesh Moudgil
P.S. Please rate helpful posts.
03-02-2016 05:21 PM
Hi DarrenB_UK,
The logic is the traffic is matched with the NAT entities and since nat exemption takes precedence over other NAT
The statement "nat (inside,outside) 1 source static
states that whenever
You might want to take a moment and go through this wonderful document on nat:
https://supportforums.cisco.com/document/132066/asa-nat-83-nat-operation-and-configuration-format-cli
Hope this helps.
Regards,
Dinesh Moudgil
P.S. Please rate helpful posts.
03-02-2016 09:41 PM
Thank you Dinesh - exactly what I needed to have confirmed!
"ASA confirms if the destination is part of the object group" is the key criteria"
All the best,
Darren
03-02-2016 09:50 PM
You got
Cheers!
-Dinesh
03-02-2016 09:58 PM
One question does arise though Dinesh, what happens if the destination object group is different?
object-group network vpn-local
network-object 192.168.10.0 255.255.255.0
object-group network vpn-remote
network-object 10.0.10.0 255.255.255.0
network-object 10.0.20.0 255.255.255.0
network-object 10.0.30.0 255.255.255.0
network-object 10.0.40.0 255.255.255.0
object-group network vpn-remote-new
network-object 172.16.10.0 255.255.255.0
network-object 172.16.20.0 255.255.255.0
network-object 172.16.30.0 255.255.255.0
network-object 172.16.40.0 255.255.255.0
nat (inside,outside) 1 source static vpn-local vpn-local destination static vpn-remote vpn-remote-new
If the ASA cannot confirm the entry is in the list, will it fail or will it match to the entry at the same location?
03-02-2016 10:08 PM
Darren,
You don't have to worry about the latter part of destination static i.e.
As long as the traffic is coming from "
Hope this addresses your query.
Regards,
Dinesh Moudgil
P.S. Please rate helpful posts.
03-02-2016 10:18 PM
Hi Dinesh and thank you for your continued input!
So looking at these remote object groups:
object-group network vpn-remote
network-object 10.0.10.0 255.255.255.0
network-object 10.0.20.0 255.255.255.0
network-object 10.0.30.0 255.255.255.0
network-object 10.0.40.0 255.255.255.0
object-group network vpn-remote-new
network-object 172.16.10.0 255.255.255.0
network-object 172.16.20.0 255.255.255.0
network-object 172.16.30.0 255.255.255.0
network-object 172.16.40.0 255.255.255.0
If the matched destination address is 10.0.30.0, at position 3 in the object group, would the ASA translate this to position 3 in the vpn-remote-new group - 172.16.30.0?
Just want to be clear about the order of processing logic in object groups for ASA NAT!
Thanks again
03-02-2016 11:37 PM
Darren,
I will suggest you to create separate nat statements for the destination object-groups so that 10.0.30.0 translates to 172.16.30.0 and similarly for other objects.
Regards,
Dinesh Moudgil
P.S. Please rate helpful posts.
03-03-2016 11:18 AM
Hi Dinesh,
Thanks again for your input.
So you are suggesting that whilst using the same object group for identity NAT is OK, use separate NAT statements with the relevant objects if an actual translation is required?
Best regards,
Darren
03-03-2016 05:22 PM
I'd suggest that whether you go for nat exemption or
Regards,
Dinesh Moudgil
P.S. Please rate helpful posts.
03-06-2016 12:46 AM
I finally managed to lab this up!
ciscoasa# show object-group
object-group network vpn-remote
network-object 10.0.100.0 255.255.255.0
network-object 10.0.101.0 255.255.255.0
network-object 10.0.102.0 255.255.255.0
network-object 10.0.103.0 255.255.255.0
object-group network vpn-remote-new
network-object 192.168.100.0 255.255.255.0
network-object 192.168.101.0 255.255.255.0
network-object 192.168.102.0 255.255.255.0
network-object 192.168.103.0 255.255.255.0
object-group network vpn-local
network-object 10.0.10.0 255.255.255.0
ciscoasa# show run nat
nat (inside,outside) source static vpn-local vpn-local destination static vpn-remote vpn-remote-new
ciscoasa# packet-tracer input inside tcp 10.0.10.1 12345 10.0.101.1 80 detailed
Phase: 1
Type: UN-NAT
Subtype: static
Result: ALLOW
Config:
nat (inside,outside) source static vpn-local vpn-local destination static vpn-remote vpn-remote-new
Additional Information:
NAT divert to egress interface outside
Untranslate 10.0.101.1/80 to 192.168.101.1/80
ciscoasa# packet-tracer input inside tcp 10.0.10.1 12345 10.0.103.1 80 det
Phase: 1
Type: UN-NAT
Subtype: static
Result: ALLOW
Config:
nat (inside,outside) source static vpn-local vpn-local destination static vpn-remote vpn-remote-new
Additional Information:
NAT divert to egress interface outside
Untranslate 10.0.103.1/80 to 192.168.103.1/80
ciscoasa# packet-tracer input inside tcp 10.0.10.1 12345 10.0.101.1 80 det
Phase: 1
Type: UN-NAT
Subtype: static
Result: ALLOW
Config:
nat (inside,outside) source static vpn-local vpn-local destination static vpn-remote vpn-remote-new
Additional Information:
NAT divert to egress interface outside
Untranslate 10.0.101.1/80 to 192.168.101.1/80
What this demonstrates is that the static NAT translates the object-group to the corresponding position in the groups! Cool!
03-06-2016 12:50 AM
Wonderful Darren,
Appreciate your efforts on a quick lab-repro to confirm the behavior.
Way to
Regards,
Dinesh Moudgil
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