<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic ASA Dynamic NAT with PAT, on static IP in Network Security</title>
    <link>https://community.cisco.com/t5/network-security/asa-dynamic-nat-with-pat-on-static-ip/m-p/4544970#M1087051</link>
    <description>&lt;P&gt;I have what I think is a fairly straightforward configuration, though I cannot quite seem to get it working.&amp;nbsp; I need to have a few different DMZ hosts with PAT on a specific IP (that's not the ASA interface IP), where also if one of these hosts initiates an outbound connection it uses that specific IP, not the default one. All other hosts should just use the default translation.&lt;/P&gt;&lt;P&gt;It seems like if I use Static NAT with PAT, it translates traffic for just those matching ports (8001-8003) but any other traffic falls back to the default translation.&lt;/P&gt;&lt;P&gt;Example of what I'm trying to achieve:&lt;/P&gt;&lt;P&gt;&lt;U&gt;Inbound:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;Server1:&amp;nbsp; 100.1.1.2:8001 -&amp;gt; 192.168.1.1:8001&lt;/P&gt;&lt;P&gt;Server2:&amp;nbsp; 100.1.1.2:8002 -&amp;gt; 192.168.1.2:8002&lt;/P&gt;&lt;P&gt;Server3:&amp;nbsp; 100.1.1.2:8003 -&amp;gt; 192.168.1.3:8003&lt;/P&gt;&lt;P&gt;&lt;U&gt;Outbound:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;Server1 initiates any outbound connection, it should come from (translate to) 100.1.1.2 not 100.1.1.1.&lt;/P&gt;&lt;P&gt;&lt;U&gt;What's actually happening:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;An outbound connection not matching those ports XLATs to 10.1.1.1 instead of 10.1.1.2:&lt;/P&gt;&lt;PRE&gt;UDP PAT from dmz:192.168.1.1/123 to outside:100.1.1.1/123 flags ri idle 0:01:00 timeout 0:00:30&lt;/PRE&gt;&lt;P&gt;If I add the follow (see below for detail):&lt;/P&gt;&lt;PRE&gt;nat (dmz,outside) source dynamic SERVER_GROUP SERVER_IP_OUTSIDE&lt;/PRE&gt;&lt;P&gt;It does correctly translate to the correct external IP address, however the inbound PAT rules no longer work, like it's simply overriding/disabling the static PAT rules.&lt;/P&gt;&lt;PRE&gt;UDP PAT from dmz:192.168.1.1/123 to outside:100.1.1.2/123 flags ri idle 0:01:00 timeout 0:00:30&lt;/PRE&gt;&lt;P&gt;I've read through this &lt;A href="https://www.cisco.com/c/en/us/td/docs/security/asa/asa96/configuration/firewall/asa-96-firewall-config/nat-reference.html" target="_self"&gt;reference document&lt;/A&gt; but it doesn't look like one of these examples is exactly my situation.&lt;/P&gt;&lt;P&gt;Relevant config:&lt;/P&gt;&lt;PRE&gt;ASA Version 9.9(2)36&lt;BR /&gt;&lt;BR /&gt;interface GigabitEthernet1/1&lt;BR /&gt; nameif outside&lt;BR /&gt; ip address 100.1.1.1 255.255.255.0&lt;BR /&gt;&lt;BR /&gt;interface GigabitEthernet1/2&lt;BR /&gt; nameif dmz&lt;BR /&gt; ip address 192.168.1.254 255.255.255.0&lt;BR /&gt;&lt;BR /&gt;object network SERVER_IP_OUTSIDE&lt;BR /&gt; host 100.1.1.2&lt;BR /&gt;&lt;BR /&gt;object network SERVER1_INSIDE&lt;BR /&gt; host 192.168.1.1&lt;BR /&gt; nat (dmz,outside) static SERVER_IP_OUTSIDE service tcp 8001 8001&lt;BR /&gt;&lt;BR /&gt;object network SERVER2_INSIDE&lt;BR /&gt; host 192.168.1.2&lt;BR /&gt; nat (dmz,outside) static SERVER_IP_OUTSIDE service tcp 8002 8002&lt;BR /&gt;&lt;BR /&gt;object network SERVER3_INSIDE&lt;BR /&gt; host 192.168.1.3&lt;BR /&gt; nat (dmz,outside) static SERVER_IP_OUTSIDE service tcp 8003 8003&lt;BR /&gt;&lt;BR /&gt;object-group service SERVER_SERVICE&lt;BR /&gt; service-object tcp destination range 8001 8003&lt;BR /&gt;&lt;BR /&gt;access-list acl_outside extended permit object-group SERVER_SERVICE any host 192.168.1.1&lt;BR /&gt;access-list acl_outside extended permit object-group SERVER_SERVICE any host 192.168.1.2&lt;BR /&gt;access-list acl_outside extended permit object-group SERVER_SERVICE any host 192.168.1.3&lt;BR /&gt;&lt;BR /&gt;object network NETWORK_OUTSIDE&lt;BR /&gt; subnet 0.0.0.0 0.0.0.0&lt;BR /&gt; nat (dmz,outside) dynamic interface&lt;BR /&gt;&lt;BR /&gt;! Tried adding this:&lt;BR /&gt;object-group network SERVER_GROUP&lt;BR /&gt; network-object object SERVER1_INSIDE&lt;BR /&gt; network-object object SERVER2_INSIDE&lt;BR /&gt; network-object object SERVER3_INSIDE&lt;BR /&gt;&lt;BR /&gt;nat (dmz,outside) source dynamic SERVER_GROUP SERVER_IP_OUTSIDE&lt;/PRE&gt;&lt;P&gt;This feels pretty rudimentary, but for some reason I'm just not able to make it work.&amp;nbsp; Thanks!&lt;/P&gt;</description>
    <pubDate>Thu, 03 Feb 2022 18:02:45 GMT</pubDate>
    <dc:creator>640KB</dc:creator>
    <dc:date>2022-02-03T18:02:45Z</dc:date>
    <item>
      <title>ASA Dynamic NAT with PAT, on static IP</title>
      <link>https://community.cisco.com/t5/network-security/asa-dynamic-nat-with-pat-on-static-ip/m-p/4544970#M1087051</link>
      <description>&lt;P&gt;I have what I think is a fairly straightforward configuration, though I cannot quite seem to get it working.&amp;nbsp; I need to have a few different DMZ hosts with PAT on a specific IP (that's not the ASA interface IP), where also if one of these hosts initiates an outbound connection it uses that specific IP, not the default one. All other hosts should just use the default translation.&lt;/P&gt;&lt;P&gt;It seems like if I use Static NAT with PAT, it translates traffic for just those matching ports (8001-8003) but any other traffic falls back to the default translation.&lt;/P&gt;&lt;P&gt;Example of what I'm trying to achieve:&lt;/P&gt;&lt;P&gt;&lt;U&gt;Inbound:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;Server1:&amp;nbsp; 100.1.1.2:8001 -&amp;gt; 192.168.1.1:8001&lt;/P&gt;&lt;P&gt;Server2:&amp;nbsp; 100.1.1.2:8002 -&amp;gt; 192.168.1.2:8002&lt;/P&gt;&lt;P&gt;Server3:&amp;nbsp; 100.1.1.2:8003 -&amp;gt; 192.168.1.3:8003&lt;/P&gt;&lt;P&gt;&lt;U&gt;Outbound:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;Server1 initiates any outbound connection, it should come from (translate to) 100.1.1.2 not 100.1.1.1.&lt;/P&gt;&lt;P&gt;&lt;U&gt;What's actually happening:&lt;/U&gt;&lt;/P&gt;&lt;P&gt;An outbound connection not matching those ports XLATs to 10.1.1.1 instead of 10.1.1.2:&lt;/P&gt;&lt;PRE&gt;UDP PAT from dmz:192.168.1.1/123 to outside:100.1.1.1/123 flags ri idle 0:01:00 timeout 0:00:30&lt;/PRE&gt;&lt;P&gt;If I add the follow (see below for detail):&lt;/P&gt;&lt;PRE&gt;nat (dmz,outside) source dynamic SERVER_GROUP SERVER_IP_OUTSIDE&lt;/PRE&gt;&lt;P&gt;It does correctly translate to the correct external IP address, however the inbound PAT rules no longer work, like it's simply overriding/disabling the static PAT rules.&lt;/P&gt;&lt;PRE&gt;UDP PAT from dmz:192.168.1.1/123 to outside:100.1.1.2/123 flags ri idle 0:01:00 timeout 0:00:30&lt;/PRE&gt;&lt;P&gt;I've read through this &lt;A href="https://www.cisco.com/c/en/us/td/docs/security/asa/asa96/configuration/firewall/asa-96-firewall-config/nat-reference.html" target="_self"&gt;reference document&lt;/A&gt; but it doesn't look like one of these examples is exactly my situation.&lt;/P&gt;&lt;P&gt;Relevant config:&lt;/P&gt;&lt;PRE&gt;ASA Version 9.9(2)36&lt;BR /&gt;&lt;BR /&gt;interface GigabitEthernet1/1&lt;BR /&gt; nameif outside&lt;BR /&gt; ip address 100.1.1.1 255.255.255.0&lt;BR /&gt;&lt;BR /&gt;interface GigabitEthernet1/2&lt;BR /&gt; nameif dmz&lt;BR /&gt; ip address 192.168.1.254 255.255.255.0&lt;BR /&gt;&lt;BR /&gt;object network SERVER_IP_OUTSIDE&lt;BR /&gt; host 100.1.1.2&lt;BR /&gt;&lt;BR /&gt;object network SERVER1_INSIDE&lt;BR /&gt; host 192.168.1.1&lt;BR /&gt; nat (dmz,outside) static SERVER_IP_OUTSIDE service tcp 8001 8001&lt;BR /&gt;&lt;BR /&gt;object network SERVER2_INSIDE&lt;BR /&gt; host 192.168.1.2&lt;BR /&gt; nat (dmz,outside) static SERVER_IP_OUTSIDE service tcp 8002 8002&lt;BR /&gt;&lt;BR /&gt;object network SERVER3_INSIDE&lt;BR /&gt; host 192.168.1.3&lt;BR /&gt; nat (dmz,outside) static SERVER_IP_OUTSIDE service tcp 8003 8003&lt;BR /&gt;&lt;BR /&gt;object-group service SERVER_SERVICE&lt;BR /&gt; service-object tcp destination range 8001 8003&lt;BR /&gt;&lt;BR /&gt;access-list acl_outside extended permit object-group SERVER_SERVICE any host 192.168.1.1&lt;BR /&gt;access-list acl_outside extended permit object-group SERVER_SERVICE any host 192.168.1.2&lt;BR /&gt;access-list acl_outside extended permit object-group SERVER_SERVICE any host 192.168.1.3&lt;BR /&gt;&lt;BR /&gt;object network NETWORK_OUTSIDE&lt;BR /&gt; subnet 0.0.0.0 0.0.0.0&lt;BR /&gt; nat (dmz,outside) dynamic interface&lt;BR /&gt;&lt;BR /&gt;! Tried adding this:&lt;BR /&gt;object-group network SERVER_GROUP&lt;BR /&gt; network-object object SERVER1_INSIDE&lt;BR /&gt; network-object object SERVER2_INSIDE&lt;BR /&gt; network-object object SERVER3_INSIDE&lt;BR /&gt;&lt;BR /&gt;nat (dmz,outside) source dynamic SERVER_GROUP SERVER_IP_OUTSIDE&lt;/PRE&gt;&lt;P&gt;This feels pretty rudimentary, but for some reason I'm just not able to make it work.&amp;nbsp; Thanks!&lt;/P&gt;</description>
      <pubDate>Thu, 03 Feb 2022 18:02:45 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/asa-dynamic-nat-with-pat-on-static-ip/m-p/4544970#M1087051</guid>
      <dc:creator>640KB</dc:creator>
      <dc:date>2022-02-03T18:02:45Z</dc:date>
    </item>
    <item>
      <title>Re: ASA Dynamic NAT with PAT, on static IP</title>
      <link>https://community.cisco.com/t5/network-security/asa-dynamic-nat-with-pat-on-static-ip/m-p/4545419#M1087073</link>
      <description>&lt;P&gt;This has to do with ordering of your NAT statements.&amp;nbsp; Your PAT statements are placed into the "auto-NAT" section while the dynamic NAT for 100.1.1.2 is in "manual NAT".&lt;/P&gt;
&lt;P&gt;I would suggest placing both dynamic NAT statements into after-auto with the NAT statement for 100.1.1.2 being above the statement for 100.1.1.1.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Feb 2022 10:01:44 GMT</pubDate>
      <guid>https://community.cisco.com/t5/network-security/asa-dynamic-nat-with-pat-on-static-ip/m-p/4545419#M1087073</guid>
      <dc:creator>Marius Gunnerud</dc:creator>
      <dc:date>2022-02-04T10:01:44Z</dc:date>
    </item>
  </channel>
</rss>

