10-8
Cisco ASA Series Firewall CLI Configuration Guide
Chapter 10 NAT Examples and Reference
Examples for Twice NAT
Figure 10-6
Twice NAT with Different Destination Ports
Procedure
Step 1
Add a network object for the inside network:
hostname(config)#
object network myInsideNetwork
hostname(config-network-object)#
subnet 10.1.2.0 255.255.255.0
Step 2
Add a network object for the Telnet/Web server:
hostname(config)#
object network TelnetWebServer
hostname(config-network-object)#
host 209.165.201.11
Step 3
Add a network object for the PAT address when using Telnet:
hostname(config)#
object network PATaddress1
hostname(config-network-object)#
host 209.165.202.129
Step 4
Add a service object for Telnet:
hostname(config)#
object service TelnetObj
hostname(config-network-object)#
service
tcp
destination eq telnet
Step 5
Configure the first twice NAT rule:
hostname(config)#
nat (inside,outside) source dynamic myInsideNetwork PATaddress1
destination static TelnetWebServer TelnetWebServer service TelnetObj TelnetObj
Because you do not want to translate the destination address or port, you need to configure identity NAT
for them by specifying the same address for the real and mapped destination addresses, and the same
port for the real and mapped service.
Step 6
Add a network object for the PAT address when using HTTP:
hostname(config)#
object network PATaddress2
hostname(config-network-object)#
host 209.165.202.130
We
b
a
nd Telnet
s
erver:
209.165.201.11
Internet
In
s
ide
Tr
a
n
s
l
a
tion
209.165.202.129
10.1.2.27:80
10.1.2.27
10.1.2.0/24
Tr
a
n
s
l
a
tion
209.165.202.130
10.1.2.27:23
We
b
P
a
cket
De
s
t. Addre
ss
:
209.165.201.11:80
Telnet P
a
cket
De
s
t. Addre
ss
:
209.165.201.11:23
130040
Summary of Contents for ASA 5508-X
Page 11: ...P A R T 1 Access Control ...
Page 12: ......
Page 157: ...P A R T 2 Network Address Translation ...
Page 158: ......
Page 233: ...P A R T 3 Service Policies and Application Inspection ...
Page 234: ......
Page 379: ...P A R T 4 Connection Management and Threat Detection ...
Page 380: ......