DGTL Tscsec 507
DGTL Tscsec 507
DGTL Tscsec 507
#CiscoLive
Agenda
• General NAT Overview
• NAT Types
• NAT Order
• PAT Advanced options
• Dynamic NAT on Clustered FTD
• Common Failure Scenarios and
Troubleshooting
#CiscoLive DGTL-TSCSEC-507 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 3
General NAT Overview
Network Address Translation (NAT)
Why use NAT?
• Each host within an IP network is assigned a unique IP
address that identifies it
• RFC 1918 defines the private ranges that can be used
internally
• NAT allows private IP networks to connect to the internet
ISP
Inside Outside
192.168.1.100
Source IP Cisco
192.168.1.100 198.133.219.25
#CiscoLive DGTL-TSCSEC-507 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 5
Terminology on FTD
NAT
Phase: 3
Type: NAT
Subtype:
Result: ALLOW
Config:
object network PC-Real
nat (inside,outside) static PC-Mapped
Inside Outside Additional Information:
Static translate 192.168.1.100/1234 to 158.12.1.3/1234
158.12.1.3
UN-NAT
Phase: 1
Type: UN-NAT
Subtype: static
Result: ALLOW
Config:
Inside
Outside object network PC-Real
nat (inside,outside) static PC-Mapped
158.12.1.3 Additional Information:
NAT divert to egress interface inside
192.168.1.100 ß 198.133.219.25 158.12.1.3 ß 198.133.219.25 Untranslate 158.12.1.3/0 to 192.168.1.100/0
#CiscoLive DGTL-TSCSEC-507 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 6
NAT Types
Static NAT
• Translates a real address to a mapped address
• Allows bidirectional connection initiation
• Some other uses of static NAT
• Port Translation à Allows translating a well-known port to an ephemeral
port
• Identity port translation à A single mapped IP translated to different well-
known ports
ASA# show run nat
!
object network PC-Real Outside
nat (inside,outside) static PC-Mapped Inside 158.12.1.3
#CiscoLive DGTL-TSCSEC-507 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 8
Identity NAT
• Allows to translate an IP to itself
• Bidirectional
192.168.1.100 10.10.1.10
#CiscoLive DGTL-TSCSEC-507 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 9
Dynamic NAT
• The translation is created only when the real host initiates the connection
• Translates a group of real addresses to a pool of mapped addresses
• The mapped pool typically has fewer IPs than the real group
D 209.100.200.2
B
#CiscoLive DGTL-TSCSEC-507 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 10
Dynamic PAT
• Translates multiple real IPs to a single IP
• Real IP and source port are translated to the mapped IP and a unique port
Inside Outside
A
ASA# show run nat
object network Inside-subnet 198.133.219.25
nat (inside,outside) dynamic Mapped-IP
192.168.1.100:1025 209.165.201.1:3030
B 209.165.201.1:4482
209.165.201.1:1538
ASA# show run object id Inside-subnet 192.168.1.101:2041 198.133.219.40
object network Inside-subnet
subnet 192.168.1.0 255.255.255.0 C
ASA# show run object id Mapped-IP
object network Mapped-IP
host 209.165.201.1
192.168.1.102:3572
198.133.219.40
#CiscoLive DGTL-TSCSEC-507 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 11
Per-Session Port Address Translation
• Dynamic PAT xlates have a 30 second idle timeout by default
• Single global IP allows about 2000 conns/sec for TCP and UDP
firepower# show run timeout
timeout pat-xlate 0:00:30
#CiscoLive DGTL-TSCSEC-507 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 12
PAT Advanced Options
Round-Robin
• The Round-Robin method assigns one address/port from each PAT address in the pool
A
inside
outside
object network Pool
range 172.16.1.4 172.16.1.5 10.4.1.33
object network users
range 10.4.1.33 10.4.1.34 172.16.1.4
nat (inside,outside) dynamic pat-pool Pool round-robin 172.16.1.5
B Server
10.4.1.34
#CiscoLive DGTL-TSCSEC-507 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 14
Flat
• Flat translates source ports by using only the ephemeral port range 1024-65535
inside outside
172.16.1.254
Phase: 5
Type: NAT
Subtype:
Result: ALLOW
Config:
object network A
• Include-reserve
nat (inside,outside) dynamic pat-pool Pool flat
Additional Information: • To use the port range from 1 to 65535
Dynamic translate 10.4.1.33/123 to 172.16.1.2/17463
#CiscoLive DGTL-TSCSEC-507 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 15
Extended
• Extends PAT uniqueness to per destination instead of per interface
A
10.4.1.33:10000 > 172.16.1.254:23 172.16.1.4:10000 > 172.16.1.254:23
B
10.4.1.34:10000 > 172.16.1.254:80 172.16.1.4:13831 > 172.16.1.254:80
#CiscoLive DGTL-TSCSEC-507 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 16
NAT Order
NAT Sections
• NAT rules are used to build the NAT policy table
ASA# show run nat
nat (outside,outside) source static VPN-Users VPN-Users destination static VPN-Users VPN-Users
!
NAT rules
object network PC-Real
nat (inside,outside) static PC-Mapped
!
object network VM
nat (internal,outside) dynamic interface
!
nat (inside,outside) after-auto source dynamic Users interface
#CiscoLive DGTL-TSCSEC-507 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 18
Dynamic NAT on
Clustered FTD
Dynamic NAT on Clustered FTDs
Inside Outside
• FTD only supports spanned mode
interface
SYN unit-1
• Data interfaces are grouped into a
single EtherChannel
• Load balancing algorithm is performed unit-2
on the switches
• NAT can impact the throughput of the unit-3
cluster
SYN-ACK
unit-4
#CiscoLive DGTL-TSCSEC-507 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 20
NAT pool address distribution
• The Master FTD pre-distributes addresses across the cluster
• PAT pools should have at least as many IPs available as number of units in the cluster
#CiscoLive DGTL-TSCSEC-507 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 21
When a unit leaves the cluster
• The PAT IP assigned to that unit will be rebalanced to another unit in the cluster
inside
Master
unit-1-1 Slave
unit-1-1 owning both IP of the cluster unit-2-1
#CiscoLive DGTL-TSCSEC-507 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 22
When a unit joins the cluster
• The Master FTD attempts to find one or more unused PAT IPs from the PAT pool
and assign it to the newly joined unit
Master Slave
unit-1-1 unit-2-1
#CiscoLive DGTL-TSCSEC-507 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 23
Common Failure Scenarios
and Best Practices
Scenario 1: PAT configured with a single IP
Master
#CiscoLive DGTL-TSCSEC-507 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 25
Xlate Replication
inside Master outside
SYN reaching the Master FTD
172.16.1.2
SYN SYN
firepower# show nat pool cluster
IP outside 172.16.1.2, owner unit-1-1, backup unit-2-1 unit-1-1
A Slave
10.4.1.33 172.16.1.1
telnet 172.16.1.1 80
Buffer logs on Master and captures unit-1-2
1 packets captured
1: 02:28:56.865799 802.1Q vlan#2847 P0 10.4.1.33.40492 > 172.16.1.1.80: S 2121437953:2121437953(0)
1 packet captured
1: 02:28:56.866547 802.1Q vlan#2809 P0 172.16.1.2.40492 > 172.16.1.1.80: S 2341746117:2341746117(0)
#CiscoLive DGTL-TSCSEC-507 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 26
Xlate Replication
inside Master outside
SYN reaching the Slave FTD
172.16.1.2
#CiscoLive DGTL-TSCSEC-507 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 27
Scenario 2: PAT IP owned by Slave after Cluster
Event
object network POOL-OUT-1
host 172.16.1.3
object network Subnet-inside
Single IP à Bad practice
nat (inside,outside) dynamic pat-pool POOL-OUT-1
#CiscoLive DGTL-TSCSEC-507 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 28
Scenario 3: Distributed PAT Xlates in Cluster for
Multisession connections
TCP 172.16.1.3:51234
A inside outside
#CiscoLive DGTL-TSCSEC-507 © 2020 Cisco and/or its affiliates. All rights reserved. Cisco Public 29
Thank you
#CiscoLive
#CiscoLive