07-13-2010 08:08 AM - edited 03-11-2019 11:11 AM
I ran into an issue after setting up a firewall with 8.3. Hosts on the inside that have static translations to public IPs configured within their object network configuration are being PATd instead of using the static nat translation. It's not until we setup a nat translation separate from the static nat within the object that hosts appeared as their public IPs instead of a PATd IP. This was an issue for smtp relays, for example, needing a reverse DNS entry. Here's is the config we used as a work around.
object network HBG-MARSHAL_172.21.4.67
nat (inside,outside) static 23.23.23.23
nat (inside,outside) source static HBG-MARSHAL_172.21.4.67 HBG-MARSHAL_23.23.23.23
nat (inside,outside) source dynamic obj-All_Networks interface
We put the translation above the PAT line, the last line and it works now, but based on my understanding of the following excerpt from the 8.3 admin guide, and my past experience with nat and the ASA, I shouldn't need that line, but maybe there's a nat precedence order I'm missing between object nat and the explicit nat like nat (inside,outside) source static HBG-MARSHAL_172.21.4.67 HBG-MARSHAL_23.23.23.23
"Static NAT creates a fixed translation of a real address to a mapped address. Because the mapped address
is the same for each consecutive connection, static NAT allows bidirectional connection initiation, both
to and from the host (if an access rule exists that allows it)."
The order of nat rules is explained as
"•Order of NAT Rules.
– Network object NAT—Automatically ordered in the NAT table.
– Twice NAT—Manually ordered in the NAT table (before or after network object NAT rules)."
thank you,
Bill
Solved! Go to Solution.
07-13-2010 09:12 AM
I have not had much experience with the 8.3 version of NAT, but I found this on here:
http://www.cisco.com/en/US/docs/security/asa/asa83/configuration/guide/nat_overview.html#wp1118157
By default Twice Nat is put before Network object NAT. However from the looks of it these are both Network Object rules in which case the the static should have been read first, but again I have not had much experience with 8.3. As far as I can tell you are right, but maybe the a, b, and c rules came into effect in your situation.
07-13-2010 12:49 PM
Hello Bill,
Indeed, Twice NAT rules will be evaluated (first match) before Network Object NAT. This is why the PAT rule from Section 1 was taking precedence over the static NAT rule from Section 2.
Andrew
07-13-2010 09:12 AM
I have not had much experience with the 8.3 version of NAT, but I found this on here:
http://www.cisco.com/en/US/docs/security/asa/asa83/configuration/guide/nat_overview.html#wp1118157
By default Twice Nat is put before Network object NAT. However from the looks of it these are both Network Object rules in which case the the static should have been read first, but again I have not had much experience with 8.3. As far as I can tell you are right, but maybe the a, b, and c rules came into effect in your situation.
07-13-2010 12:49 PM
Hello Bill,
Indeed, Twice NAT rules will be evaluated (first match) before Network Object NAT. This is why the PAT rule from Section 1 was taking precedence over the static NAT rule from Section 2.
Andrew
07-13-2010 12:58 PM
So the only way to overcome this is the way we did it? I'm curious if there are any other options anyone knows of.
07-13-2010 01:02 PM
Hello Bill,
If you're using Network Object NAT, you would typically configure dynamic PAT from there; static NAT takes precedence over dynamic NAT/PAT and the address matching is done from more to less specific within that section. If you would prefer to leverage Manual NAT instead, then you would have to watch the order of the statements. Hopefully, this helps. Thanks!
Andrew
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