01-07-2013 12:46 PM - edited 03-11-2019 05:44 PM
Hi all. I have a nat question for everyone to help me understand some syntax. I have the following example and then my question:
Example: nat (outside,outside) source dynamic obj-10.10.10.0 interface destination static obj-2.2.2.0 obj-2.2.2.0
Im trying to understand this statement. I cant seem to find an explanation in laymans terms that I fully understand, and Im not loving the new command for a NAT translation. In this example, I have a vpn client that needs access to a public IP address. I used 2.2.2.0 as an example network. I used 10.10.10.0 as the remote-access clients. Can someone explain to me this syntax? It used to be two objects and now its four. I get the 'nat' and '(outside,outside)' commands, but if someone could explain the rest of the commands I would appreciate it very much. Thank you in advance for your help.
Solved! Go to Solution.
01-07-2013 12:51 PM
Hi,
The above NAT configuration would achieve the following
This would seem like a NAT for VPN Client users to be able to access the Internet through the Firewall/VPN device they are connected to. Which would probably also mean that the VPN Client type is Full Tunnel instead of Split tunnel. (EDIT: Now that I think of it this wouldnt necesarily be the case )
Please rate if the information was helpfull and/or ask more questions
- Jouni
01-07-2013 12:46 PM
By the way, as Im sure you all know, this is the ASA 8.3 code oand later.
01-07-2013 12:51 PM
Hi,
The above NAT configuration would achieve the following
This would seem like a NAT for VPN Client users to be able to access the Internet through the Firewall/VPN device they are connected to. Which would probably also mean that the VPN Client type is Full Tunnel instead of Split tunnel. (EDIT: Now that I think of it this wouldnt necesarily be the case )
Please rate if the information was helpfull and/or ask more questions
- Jouni
01-07-2013 01:38 PM
Awesome answer, and I fully understand it now. Thank you. So, I have another two questions concerning this.
1. Is this called "twice NAT" or "network object NAT"?
2. If the destinationA is different than destinationB, is that what "twice NAT" is?
3. If its destinationA is the same as destinationB, is that what "network object NAT" is?
Thanks again for your help.
01-07-2013 01:44 PM
And to further clarify the meaning of the syntax refer to the below configuration
nat (inside,outside) source static LAN-LOCAL LAN-NATTED destination static REMOTE-NATTED REMOTE-LOCAL
Where
Now as you can see the above has a "source static" start instead of your above "source dynamic". In the case of "source static" the host/network address contained in LAN-LOCAL would be NATed to a another NAT host/network address 1:1.
While in the case of "source dynamic" your source object LAN-LOCAL addresses would probably be NATed to either interface IP address using the "interface" parameter or you might aswell use an object to define the IP address or even IP address pool/range to which the source addresses are PATed / NATed to.
- Jouni
01-07-2013 01:53 PM
And the actual answer to your second question.
Yes, the above NAT is Twice NAT. Is belongs to the NAT rules that are gone through first by the ASA
And Example of Object NAT could be
object network DEFAULT-PAT
subnet 10.10.10.0 255.255.255.0
nat (inside,outside) dynamic interface
Where
objec network STATIC
host 10.10.10.100
nat (inside,outside) static 1.2.3.4 dns
Notice that "object network" can only contain ONE host/subnet/range
I would therefore suggest using "object-group" while configuring Default PAT for your LAN networks
object-group network DEFAULT-PAT-SOURCE
description Source Networks for PAT
network-object 10.10.10.0 255.255.255.0
network-object 10.10.20.0 255.255.255.0
nat (inside,outside) after-auto source dynamic DEFAULT-PAT-SOURCE interface
Where
Hopefully the above clarified the situation a bit. The new NAT format can be pain in the start. I got to admit while its easier now for me personally I still miss the simplicity of the old NAT in certain cases/enviroments.
Don't be afraid to rate if the information was helpfull
I must have consumed too much coffee again when I look how much I wrote again
- Jouni
01-07-2013 02:08 PM
Oh and forgot to copy/past this
It describes the order of NAT rules in the new software 8.3 and above
NAT Rule Order
Network object NAT rules and twice NAT rules are stored in a single table that is divided into three sections. Section 1 rules are applied first, then section 2, and finally section 3. Table 27-1 shows the order of rules within each section.
For section 2 rules for example, you have the following IP addresses defined within network objects:
192.168.1.0/24 (static)
192.168.1.0/24 (dynamic)
10.1.1.0/24 (static)
192.168.1.1/32 (static)
172.16.1.0/24 (dynamic) (object def)
172.16.1.0/24 (dynamic) (object abc)
The resultant ordering would be:
192.168.1.1/32 (static)
10.1.1.0/24 (static)
192.168.1.0/24 (static)
172.16.1.0/24 (dynamic) (object abc)
172.16.1.0/24 (dynamic) (object def)
192.168.1.0/24 (dynamic)
Link to ths ource document (Configuration Guide for software 8.3)
http://www.cisco.com/en/US/docs/security/asa/asa83/configuration/guide/nat_overview.html#wp1118157
- Jouni
01-07-2013 02:11 PM
Ok, quick question on that. I like this example:
nat (inside,outside) source static LAN-LOCAL LAN-NATTED destination static REMOTE-NATTED REMOTE-LOCAL
But one last question here. On the REMOTE-NATTED REMOTE-LOCAL, Im guessing that is not backwards but really the syntax. I just notice that on the LAN-LOCAL LAN-NATTED, its vice versa. Is that correct? Thats a little confusing.
01-07-2013 02:21 PM
Hi,
Yes that is the order always
You can check this by simply starting to write the command on your ASA command line interface and using "?" after each parameter and the ASA will give a little description of the available configurations possibilities
For example if I try to enter that NAT configuration to my own ASA in and check the "?" help in between the parameters
First Object/Object-group
ASA(config)# nat (LAN,WAN) source static ?
configure mode commands/options:
WORD Specify object or object-group name for real source
Second Object/Object-group
ASA(config)# nat (LAN,WAN) source static LAN-LOCAL ?
configure mode commands/options:
WORD Specify object or object-group name for mapped source
Third Object/Object-group
ASA(config)# nat (LAN,WAN) source static LAN-LOCAL LAN-NATTED destination static ?
configure mode commands/options:
WORD Specify object or object-group name for mapped destination
Fourth Object/Object-group
ASA(config)# nat (LAN,WAN) source static LAN-LOCAL LAN-NATTED destination static REMOTE-NATTED ?
configure mode commands/options:
WORD Specify object or object-group name for real destination
I got to admit that I VERY RARELY use NAT for the destination networks. Usually there is only need to define NAT for the source address/addresses in the first object/object-group and in that case the identical objects/object-groups in the destination just tell for what destination networks the NAT should be performed. In that case it behaves pretty much like the 8.2 and below softwares Policy NAT (defines source and destination network pairs for which the NAT/PAT in question needs to be performed)
- Jouni
01-07-2013 09:38 PM
Thank you Jouni. Excellent info you have given. I have certainly learned something today.
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