Cisco ASA Dynamic NAT with DMZ

In a previous lesson I explained how to configure dynamic NAT from the inside to the outside. In this lesson we add a DMZ and some more NAT translations. Here’s the topology that we will use:

ASA1 Inside Outside DMZ

In this example we have our INSIDE, OUTSIDE and DMZ interfaces. The security levels of these interfaces are:

  • INSIDE: 100
  • OUTSIDE: 0
  • DMZ: 50

We can go from a “high” security level to a “low” security level so this means that hosts from the INSIDE can reach the DMZ and OUTSIDE. Hosts from the DMZ will also be able to reach the OUTSIDE. We will configure NAT for the following traffic patterns:

  • Traffic from hosts on the INSIDE to the OUTSIDE, we’ll use a “public” pool for this.
  • Traffic from hosts on the INSIDE to the DMZ, we’ll use a “DMZ” pool for this.
  • Traffic from hosts on the DMZ to the OUTSIDE, we’ll use the same public pool for this.

Here’s what a visualization of these NAT rules look like:

ASA1 inside outside dmz nat translationsLet’s start by configuring the interfaces:

ASA1(config)# interface e0/0
ASA1(config-if)# nameif INSIDE
ASA1(config-if)# ip address 192.168.1.254 255.255.255.0
ASA1(config-if)# no shutdown
ASA1(config)# interface e0/1
ASA1(config-if)# nameif OUTSIDE
ASA1(config-if)# ip address 192.168.2.254 255.255.255.0
ASA1(config-if)# no shutdown
ASA1(config)# int e0/2
ASA1(config-if)# nameif DMZ
ASA1(config-if)# security-level 50
ASA1(config-if)# ip address 192.168.3.254 255.255.255.0
ASA1(config-if)# no shutdown

The INSIDE and OUTSIDE security levels have a default value, the DMZ I configured to 50 myself. Now let’s look at the dynamic NAT configuration…

Dynamic NAT with three Interfaces

First we will create the pools:

ASA1(config)# object network PUBLIC_POOL
ASA1(config-network-object)# range 192.168.2.100 192.168.2.200
ASA1(config)# object network DMZ_POOL
ASA1(config-network-object)# range 192.168.3.100 192.168.3.200

I will use a range of IP addresses from the subnet that is configured on the OUTSIDE and DMZ interface. Now we can create some network objects for the NAT translations:

We're Sorry, Full Content Access is for Members Only...

If you like to keep on reading, Become a Member Now! Here is why:

  • Learn any CCNA, CCNP and CCIE R&S Topic. Explained As Simple As Possible.
  • Try for Just $1. The Best Dollar You've Ever Spent on Your Cisco Career!
  • Full Access to our 660 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)

507 Sign Ups in the last 30 days

satisfaction-guaranteed
100% Satisfaction Guaranteed!
You may cancel your monthly membership at any time.
No Questions Asked!

Tags:


Forum Replies

  1. Hi Rene,
    What is the difference or when do you use one or the other? on this example I am using PAT with a dynamic ip address on the outside interface.

    nat (INSIDE,OUTSIDE) dynamic interface

    or

    nat (INSIDE,OUTSIDE) after-auto 1 source dynamic any interface.

    Please advise

  2. Hi Alfredo,

    The ASA (since 8.3) has different NAT “sections”:

    • 1:Manual
    • 2: Auto
    • 3: "after auto" Manual
    • The ASA will first process NAT rules in section 1, then 2 and finally 3.

      Here’s an example of manual NAT:

    ASA(config)# object network INTERNAL_SERVER
    ASA(config-network-object)# host 192.168.1.1
    
    ASA(config)# object network PUBLIC_IP
    ASA(config-network-object)# host 1.1.1.1
    
    ASA(config)# nat (INSIDE,OUTSIDE) source static INTERNAL_SERVER PUBLIC_IP
    

    The NAT rule has been configured globally, this section 1 rule is preferred over 2 and 3.

    Here’s an example for A

    ... Continue reading in our forum

  3. Hi

    Can someone help cant figure out why my internal ip address wont get nat’ed

    R1 IOS 
    !
    hostname Router
    !
    boot-start-marker
    boot-end-marker
    !
    !
    !
    no aaa new-model
    ethernet lmi ce
    !
    !
    !
    mmi polling-interval 60
    no mmi auto-configure
    no mmi pvc
    mmi snmp-timeout 180
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    ip cef
    no ipv6 cef
    !
    multilink bundle-name authenticated
    !
    !
    !
    !
    !
    redundancy
    !
    !
    ! 
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    !
    interface GigabitEthernet0/0
     no ip address
     shutdown
     duplex auto
     speed auto
     media-type rj45
    !
    interface GigabitEthernet0/1
     ip address 192.168.1.1 255.255.255.0
     duplex
    ... Continue reading in our forum

  4. Hi Sunil,

    These are the pre < 8.3 commands to configure NAT.

    Let’s break down these commands:

    global (outside) 1 interface
    • global means we configure a global address pool.
    • (outside) means we define the pool on this interface (outside).
    • 1 is the ID of our pool.
    • interface means that we use PAT with the IP address on the interface.
    global (guestwifi) 1 interface

    Same as above but for the guestwifi interface.

    nat (outside) 1 10.10.10.0 255.255.255.0
    • (outside) this is the interface where the NAT network exists. The outside interface in this case.
    • 1
    ... Continue reading in our forum

  5. Hello Harshi

    You can use the clear xlate command to clear all NAT entries in the NAT table.

    In order to have the ASA firewall perform NAT, you will require the use of a Layer 3 inside inter

    ... Continue reading in our forum

39 more replies! Ask a question or join the discussion by visiting our Community Forum