4-14
Cisco ASA Series Firewall CLI Configuration Guide
Chapter4 Configuring Network Object NAT
Configuring Network Object NAT
Examples
The following example configures static NAT for the real host 10.1.1.1 on the inside to 10.2.2.2 on the
outside with DNS rewrite enabled.
ciscoasa(config)# object network my-host-obj1
ciscoasa(config-network-object)# host 10.1.1.1
ciscoasa(config-network-object)# nat (inside,outside) static 10.2.2.2 dns
The following example configures static NAT for the real host 10.1.1.1 on the inside to 2.2.2.2 on the
outside using a mapped object.
ciscoasa(config)# object network my-mapped-obj
ciscoasa(config-network-object)# host 10.2.2.2
ciscoasa(config-network-object)# object network my-host-obj1
ciscoasa(config-network-object)# host 10.1.1.1
ciscoasa(config-network-object)# nat (inside,outside) static my-mapped-obj
The following example configures static NAT-with-port-translation for 10.1.1.1 at TCP port 21 to the
outside interface at port 2121.
ciscoasa(config)# object network my-ftp-server
ciscoasa(config-network-object)# host 10.1.1.1
ciscoasa(config-network-object)# nat (inside,outside) static interface service tcp 21 2121
The following example maps an inside IPv4 network to an outside IPv6 network.
ciscoasa(config)# object network inside_v4_v6
ciscoasa(config-network-object)# subnet 10.1.1.0 255.255.255.0
ciscoasa(config-network-object)# nat (inside,outside) static 2001:DB8::/96
The following example maps an inside IPv6 network to an outside IPv6 network.
ciscoasa(config)# object network inside_v6
ciscoasa(config-network-object)# subnet 2001:DB8:AAAA::/96
ciscoasa(config-network-object)# nat (inside,outside) static 2001:DB8:BBBB::/96
Configuring Identity NAT
This section describes how to configure an identity NAT rule using network object NAT. For more
information, see the “Identity NAT” section on page3-10.
Detailed Steps
Command Purpose
Step1 (Optional) Create a network object for the
mapped addresses.
The object must include the same addresses that you want to
translate. See the “Adding Network Objects for Mapped
Addresses” section on page4-4.
Step2 object network obj_name
Example:
ciscoasa(config)# object network
my-host-obj1
Configures a network object for which you want to perform
identity NAT, or enters object network configuration mode for an
existing network object. This network object has a different name
from the mapped network object (see Step1) even though they
both contain the same IP addresses.