FW Basic Training - 1 - ASA Firewall
FW Basic Training - 1 - ASA Firewall
TAC Training
Tariq Bader
CCIE# 35627
Technical Team Leader – AMM TAC
July 2015
Agenda
• Introduction to Firewalls
o Cisco Firewalls
• ASA Firewall
o ASA Hardware
o ASA Modules
o ASA Software
• Introduction to ASA Features
• ASA Stateful Packet Filtering & Security Levels
• ASA Basic Configuration
• ASA Interface Types
Agenda (cont.)
• IP Routing
• Objects & Object Groups
• Access Control Lists (ACLs)
• ICMP Access Rules
• Connections & Translations
• Network Address Translation (NAT)
o NAT in ASA 8.2 & earlier
o NAT in ASA 8.3 & later
o Proxy ARP on ASA
Internet
Outside Inside
Network Network
Host A
Internet
Outside Inside:
Network Server C
AB Yes
AC No
Internet
Inside:
HTTP request A B Server C
Host A
Internet
• NGFW is an integrated network platform that combines a traditional firewall with other
network device filtering functionalities such as:
o Application firewall using in-line deep packet inspection (DPI)
o An intrusion prevention system (IPS)
o Other techniques such as SSL and SSH interception
o Website filtering
o QoS/bandwidth management
o Antivirus inspection
o Third-party integration
Firewall in the Attack Continuum
Attack Continuum
Advanced Malware
Firewall/VPN NGIPS Protection
IoCs/Incident
Modern Threat Control Web Security Response
• First generation appliances based on Intel x86 architecture like the PIX (single
processor)
• Next generation-X series based on SMP (multi processors)
• Comes as integrated service module (ASA-SM) and virtual appliance (ASAv)
• Also have both CLI and GUI for administration and control.
• Supports expansion modules (HW & SW)
Cisco IOS Firewall
• It is a security feature set for Cisco IOS router
software.
• It integrates robust firewall functionality and intrusion
detection for every perimeter of the network and
enriches existing Cisco IOS security capabilities.
• Makes the router a real stateful firewall.
• CBAC & Zone Based Firewall.
ASA Firewall
ASA Overview
• ASA = Adaptive Security Appliance that runs Adaptive Security Algorithm
• Stateful architecture is about flows or connections, not packets
o Most effective with TCP, UDP, and ICMP
o TCP is the main reason for deploying a stateful firewall
• Acts as a segregation gateway between networks, enforcing selective connectivity
policies
• Tracks all packets as part of a stateful connection; blocks packets not part of a
connection, and performs atomic security checks
• Performs network address translation (NAT); applies NAT to embedded application
protocol data
• Inspects some application traffic flows for higher level protocol conformance and
deep-packet inspection
• Integrates with other solutions (Unified Communications technologies, scansafe, etc.)
ASA Benefits & Features
• Proprietary operating system
• Stateful packet filtering
• High-speed NAT
• Identity-based Access Control (IDFW)
• Protocol and application inspection
• Modular policy framework (MPF)
• Virtual private networking (VPN)
• Security contexts (virtual firewalls)
• High Availability and Clustering
• Stateful failover capabilities
ASA Benefits & Features (cont.)
• Dynamic Routing
• Transparent firewalls
• Quality of Service (QoS)
• Web-based management solutions (ASDM & CSM)
• NetFlow v9 for security monitoring
• Botnet traffic filtering (Ironport integration)
• ASA Phone Proxy and other UC integration features
• Integration with IPS, CSC, CX & FirePOWER modules
ASA Features (9.0 & later)
• Clustering
• Scansafe integration
• TrustSec integration
• Dynamic routing in multi-context mode
• L2L VPN in multi-context mode
• Mixed multi-context mode
ASA Products
• Adaptive Security Appliance (ASA) – hardened firewall appliance,
proprietary OS, Ethernet and fiber ports on box. (1G/10G)
o Does not run IOS but CLI has a similar look and feel
o All management can also be completed with GUI (on-box or multi-manager)
• ASA SM – Next Gen line card for Catalyst 6500, no physical interfaces,
runs ASA code image
• Adaptive Security Virtual Appliance Firewall (ASAv) – Virtualization-
based ASA that runs with a full ASA code base, not dependent upon
Nexus1000v
• ASA with FirePOWER Services – ASA firewall appliance which
integrates a full installation of FirePOWER NGFW, NGIPS, AMP and
Contextual Services
ASA Family
ASA Hardware
ASA 5505
Front and Back images of ASA-5505
Status Flash
Power Active VPN
ASA 5510/5520/5540
Back Panel Connections
Compact Flash
Security Service Module
(SSM) Monitoring Port 10/100 Out of Band Console
Management Port Port
• Inline or Promiscuous
• Threat Protection/NG-IPS
• URL Category/Reputation
• HTTP Inspection
• TLS Proxy
• Granular Application Visibility and Control to support over 3000 application-layer and
risk-based controls
• Cisco FirePOWER Next-Generation IPS, which provide threat prevention and
contextual awareness
• URL Filtering
Application
Netw ork Firew all Visibility and Built-in Netw ork Identity-Policy
Routing | Sw itching Control Profiling Control and VPN
Cisco ASA
ASA FirePOWER (SFR SSP)
• ASA FirePOWER software module:
o Requires Cisco solid state drive (SSD)
o FirePOWER SW: 5.3.1+
o Supported ASA models: 5506-X, 5508-X 5512-X, 5515-X, 5516-X 5525-X, 5545-X, 5555-X
o Supported ASA SW: 9.2(2)4 & later
8.3 – Broadview
• New trains introduce new features 8.4 – AC Milan Train
9.0 – Arsenal
• Maintenance images undergo the most testing
o Concentrate on bug fixes, avoid new features
• Interim images are usually internal (available via TAC)
x.y.z.a
Maintenance
Minor
Interim
Major
o Limited testing, so only provided for specific problems
o Some are posted on cisco.com (CCO) after more testing
o Interims are cumulative
o Last interim becomes next Maintenance release
o Engineering images
ASA Software Builds
ASA Models Supported SW
• Legacy ASA Models supports ASA code up to 9.1 5510,5520,5540,5550,5580
o Except 5505 that supports up to 9.2
o 8.1(x) is platform specific for ASA 5580 only
• ASA 5500-X (Saleen) series started with 8.6(1) (platform specific) then 9.0 & later
• ASA 5585-X (Spyker) started with 8.2(3) 8.2(5) then 8.4(1( 8.4(7) then 9.0 & later
• ASA-SM started with 8.5(1) (platform specific) then 9.0 & later
http://www.cisco.com/c/en/us/td/docs/security/asa/compatibility/asamatrx.html#pgfId-111774
ASA Images
Internet
Internet
Active Data Control Control Data
FTP Port Port Port Port
20 21 2008 2010
Data - Port 2010
Port 2010 OK
Data
• Protocols such as FTP, HTTP, H.323, and SQL*Net need to negotiate connections to
dynamically assigned source or destination ports through the firewall.
• The security appliance inspects packets above the network layer.
• The security appliance securely opens and closes negotiated ports for legitimate client-
server connections through the firewall.
Virtual Private Network (VPN)
Branch 1 Site to Site
Headquarter
Branch 2
Internet
IPSec VPN
SSL VPN
Remote Access
Users
Security Context (Virtual Firewall)
10.1.5.0/24 10.1.5.0/24
10.1.5.1 10.1.5.2
10.1.5.254
#4 172.30.0.50 172.30.0.50 #3
10.0.0.11 The firewall appliance follows the 192.168.0.20
Adaptive Security Algorithm:
23 23
• (source IP, source port,
IP header 1026 destination IP, destination 1026
TCP header 92513 port) check conn check 92513
49092 • Sequence number check 49770
Syn-Ack • Translation check xlate Syn-Ack
TCP Initialization: Inside to Outside (cont.)
#5 #6
Data flows
• Connectionless protocol.
• Efficient protocol for some services.
• Resourceful but difficult to secure.
UDP (cont.) The firewall appliance checks
for a connection slot. If one is
not found, it creates one after
verifying NAT, ACL, and other
Private network rules, if any. If OK, a Public network
Source address 10.0.0.11 connection is created. 192.168.0.20
Destination address 172.30.0.50 172.30.0.50
All UDP responses arrive
Source port 1028 1028
from outside and within UDP
Destination port 45000 user-configurable timeout 45000
10.0.0.11 (default=2 minutes). 172.30.0.50
#1 #2
#4 #3
172.30.0.50 The firewall appliance 172.30.0.50
10.0.0.11 follows the Adaptive Security 192.168.0.20
IP header Algorithm:
45000 45000
TCP header
1028 • (source IP, source port, 1028
destination IP, destination
Port ) check conn check
• Translation check xlate
State Table – conn & xlate Tables
Security Level 30
GE0 GE2 Interface Name = DMZ1
ASA Firewall Perimeter Networks
Internet
Outside
www.yahoo.com Security 0 Inside PC
Dynamic NAT/PAT
Outside to Inside (Inbound) Connections
•The static NAT and access-list are needed to allow connections from a
lower security interface to a higher security interface
•The static NAT is used to create a permanent mapping between an local
IP address and a global IP address
•The access-list command is an exception in the firewall’s inbound security
policy for a given host
ASA
Inside
Security 100
Internet
Outside
Outside PC Security 0 Inside Server
ASA>
ASA> enable
ASA#
ASA# conf t
ASA(config)#
Set Device Identification
• hostname command
hostname newname
• Use the show version command to verify the software version of your ASA.
show version
Create Host Name Table
•Configures a list of name-to-IP address mappings on the ASA
Firewall
Outside Network
GE0
GE2
GE3
GE1
Inside Network
Assign IP Addresses
ASA# show ip
System IP Addresses:
Interface Name IP address Subnet mask
Ethernet0/0 outside 192.0.2.2 255.255.255.0
Ethernet0/1 inside 10.1.1.2 255.255.255.0
Ethernet0/2 dmz 192.168.1.2 255.255.255.0
Management0/0 management 10.48.67.231 255.255.254.0
Configuring the DNS Server
• Enable the ASA to send DNS requests to a DNS server to perform a name lookup for
supported commands.
dns domain-lookup interface_name
• Specify the DNS server group that the ASA uses for outgoing requests.
dns server-group DefaultDNS
• Specify one or more DNS servers.
name-server ip_address [ip_address2] [...] [ip_address6]
interface GigabitEthernet0/0
nameif outside
security-level 0
speed 100
duplex full
ip address 192.168.2.2 255.255.255.0
Management Interfaces
• Management interfaces do not forward traffic by default
interface Management0/0
nameif management
security-level 0
ip address 10.48.67.231 255.255.254.0
management-only
Outside – VLAN 10
Inside – VLAN 15
Trunk Eng – VLAN 20 Trunk
Gi0/0 MFG – VLAN 25
Redundant Interfaces – ASA 8.0(2)
• Redundant Interfaces provide nearly
instantaneous, physical layer interface Redundant1
redundancy member-interface Ethernet0/2
• Can be used with or without failover member-interface Ethernet0/3
nameif outside
• Can be used with Sub-Interfaces
(VLANs) security-level 0
ip address 10.10.10.2 255.255.255.0
• Up to 8 redundant interfaces, 2
members per interface
ASA# show int redundant 1
• Uses the MAC address of the first …
member interface (first configured in
order) Redundancy Information:
Member Ethernet0/2(Active), Ethernet0/3
• If active fails, members swap MACs Last switchover at 02:41:21 UTC Jun 24 2012
• Alternatively, you can assign a MAC
address to the redundant interface ASA# redundant-interface Redundant 1 active-member
• Use “show int redundant <num>” to ethernet 0/3
verify
EtherChannel – ASA 8.4(1)
• LACP or ON, PAgP not supported
interface GigabitEthernet0/0
channel-group <num> mode {active | passive | on}
lacp port-priority <1-65535>
!
interface port-channel <num>
lacp max-bundle <1-8>
port-channel min-bundle <1-8>
port-channel load-balance …
nameif outside
security-level 0
ip address 10.10.10.2 255.255.255.0
IP Routing
ASA Routing Internet
Static or IGP
inside
100
• ASA routing types:
o Static Routing
o Dynamic Routing
o Multicast Routing
ASA Routing
• Configuration is similar to IOS
• null0 and loopback interfaces are not implemented null0 introduced in 9.4(1)
ASA5555(config)# router ?
access-list acl_name [deny | permit] protocol src_addr src_mask operator port dest_addr
dest_mask operator port
access-list acl_name [deny | permit] icmp src_addr src_mask dest_addr dest_mask
icmp_type [ icmp_code ]
1. Interface ACLs
2. NAT (8.2 & earlier only)
3. VPN
4. Matching traffic for inspection, QoS & connection settings
5. Sending traffic to modules
Permitting Inbound Access
•Denies web traffic on port 80 from the inside network to the Internet
•Permits all other IP traffic from the inside network to the Internet
WWW
IP Internet
ICMP Access Rules
ICMP (to/from the ASA)
• By default:
o User can only ping the local interface of the firewall (the facing interface)
o User cannot ping remote (far) interface of the firewall (by design).
o The ASA does not respond to ICMP echo requests directed to a broadcast address.
inside outside
Internet
echo request
dmz
ICMP Access Rules
• To protect the device from attacks, you can use ICMP rules to limit ICMP access to ASA interfaces
to particular hosts, networks, or ICMP types.
• ICMP rules function like access rules, where the rules are ordered, and the first rule that matches a
packet defines the action.
• If you configure any ICMP rule for an interface, an implicit deny ICMP rule is added to the end of
the ICMP rule list, changing the default behavior.
• You must include a permit any rule at the end of the ICMP rule list to allow the remaining message
types.
Configure ICMP Rules
icmp {permit | deny} {host ip_address | ip_address mask | any} [icmp_type] interface_name
• The clear xlate command clears the contents of the translation slots
clear xlate [global_ip [local_ip]]
• The show conn command displays the contents of the connection table
show conn
• The clear xlate command clears the contents of the translation slots
clear conn
Network Address
Translation (NAT)
IPv4 Addressing Problem
NAT
1.1.1.1 10.0.0.11
Internet
10.0.0.11
10.0.0.4
• NAT was created to overcome several addressing problems that occurred with the
expansion of the Internet:
o To mitigate global address depletion
o To use RFC 1918 addresses internally
o To conserve internal address plan
• NAT also increases security by hiding the internal topology.
NAT Evolution within ASA Software
• Pre 7.0 (PIX Family): nat-control was the only model. You always have to provide an
explicit answer regarding NAT (even “no NAT”)
• From 7.0 to 8.2.X: no nat-control is the default operation mode. NAT is optional but can be
made mandatory if you configure nat-control explicitly.
• Starting on 8.3: New NAT Model
o No concept of nat-control anymore
o Brand new syntax
o NAT Table divided in 3 Sections
o Easier to define Dual NAT rules
o When NAT is in place, permissions on ACLs refer to the Real Address (as opposed to previous
models which considered the Translated Address)
NAT in ASA 8.2 & earlier
Access Through the ASA Firewall
ASA Firewall
10.0.0.11
Outside global Inside local
Static
IP Address IP Address Web
Translation 1.1.1.10 10.0.0.11 Server
• The nat command is used to specify which networks (or hosts) and source interface
which are allowed to be translated to access networks (or hosts) on another interface.
• The global command is used to define which destination interface you want users to
access from the source interface defined by the nat command.
• One or more global statements are coupled to one or more nat statements
depending on the nat_ID.
• The nat_ID can be any number greater than 0, and it corresponds to the
complementary global statement
Network Address Translation (NAT)
• Network Address Translation (NAT) creates a one-to-one mapping between a local IP
and another global IP (i.e. changing the source IP)
• For outbound traffic, the source IP address of the packet on the higher level security
interface is translated to an IP address that is available in the a global pool of IP’s.
The source port remains the same, it’s just IP translation.
• The return packet’s destination IP address is translated again as the packet traverses
from the lower security level interface to the higher security level interface, the firewall
does that by checking the xlate table to match translated IP’s
nat (inside) 1 0 0
global (outside) 1 192.150.50.9 – 192.150.50.254 netmask 255.255.255.0
NAT Illustration Example
Global IP Pool
• ASA checks security rules 192.150.50.9 -
• Source IP address replaced from global pool 192.150.50.254
10.0.0.3
Internet
Inside Outside
DMZ
10.0.0.4
NAT Configuration Example
nat (inside) 1 0.0.0.0 0.0.0.0
global (outside) 1 172.16.1.128-172.16.1.254 netmask 255.255.255.0
Perimeter
Router
• Creates a global pool of IP addresses for
172.16.1.3 connections to the outside
172.16.1.2 172.16.1.1 • All inside addresses will be address
ASA translated to global addresses
10.1.1.2 10.1.1.1 10.1.1.3 • ASA assigns addresses from global pool
Engineering Sales
starting at the low end to the high end of
the range specified in global command
10.1.3.0 10.1.2.0
Information
Systems
NAT Configuration Example
nat (inside) 3 10.1.0.0 255.255.255.0
Perimeter nat (inside) 3 10.1.1.0 255.255.255.0
Router nat (inside) 3 10.1.2.0 255.255.255.0
172.16.1.3
nat (inside) 3 10.1.3.0 255.255.255.0
172.16.1.2
global (outside) 3 172.16.1.10-172.16.1.115
172.16.1.1
ASA or
10.1.1.2 10.1.1.1 10.1.1.3 nat (inside) 3 10.1.0.0 255.255.252.0
Engineering Sales global (outside) 3 172.16.1.10-172.16.1.115
10.1.0.0/24
• All hosts on the inside networks can start outbound connections.
• A separate global pool is used for each internal network.
ASAfirewall(config)# nat (inside) 1 10.0.0.0 255.255.255.0
ASAfirewall(config)# nat (inside) 2 10.1.0.0 255.255.255.0
ASAfirewall(config)# global(outside) 1 192.168.0.1-192.168.0.14 netmask 255.255.255.240
ASAfirewall(config)# global(outside) 2 192.168.0.17-192.168.0.30 netmask 255.255.255.240
Three Interfaces with NAT (Multiple
Internal Networks)
Internet .1 172.16.0.0/24
192.168.0.0/24 ge0 outside .2
security level 0
ASA .2 DMZ Web Server
ge2 dmz .1
172.26.26.50 ge1 inside .1 security level 50
security level 100
Outside Server 10.0.0.0 /24
Inside Host
.3
ASAfirewall(config)# nat(inside) 1 10.0.0.0 255.255.255.0
ASAfirewall(config)# nat (dmz) 1 172.16.0.0 255.255.255.0
ASAfirewall(config)# global (outside) 1 192.168.0.20-192.168.0.254 netmask 255.255.255.0
ASAfirewall(config)# global(dmz) 1 172.16.0.20-172.16.0.254 netmask 255.255.255.0
• Inside users can start outbound connections to both the DMZ and the Internet.
• The nat (dmz) command gives DMZ services access to the Internet.
• The global (dmz) command gives inside users access to the web server on the DMZ.
Identity NAT (nat 0)
• Identity NAT using nat 0 is used to translate the IP address to itself (self translation)
• This is still considered as a translation
• Creates a dynamic translation in the xlate table.
• nat 0 still maintains firewall security for all connections
• Does not need a global command nat (inside) 0 0.0.0.0 0.0.0.0
• Identity NAT is unidirectional in nature and is not suited for “publishing” a server
address DMZ Inside
50 100
192.168.1.0/24 192.168.1.0/24
Port Address Translation (PAT)
• The translation entry is a combination of the IP address and the
source port number.
• Same IP address is used for all the packets but with different source
port for each session.
• The IP used for PAT can be either the interface IP or a dedicated IP
used to translate outgoing packets.
nat (inside) 1 0 0
global (outside) 1 interface
Inside Outside
Internet
10.0.0.3 10.0.0.4 192.150.50.10
Source Addr Source Addr
Destination Addr 200.200.200.10 Destination Addr 200.200.200.10
• Use the interface option to enable use of the outside interface as the PAT address
• Source addresses of hosts in network 10.0.0.0 are translated to outside interface
address for outgoing access
Using a Global NAT Pool with PAT
• PAT and NAT can be used together.
• PAT is used only when NAT is not available.
• First NAT will take place, after the exhaustion of the global pool, PAT will take place.
• PAT statements will take place respectively.
• When hosts on the 10.0.0.0 network access the outside network through the firewall, they are
assigned public addresses from the 192.168.0.20-192.168.0.254 range
• When the addresses from the global pool are exhausted, PAT begins
Static NAT
static (real_if_name,mapped_if_name) mapped_ip real_ip [netmask network_mask]
[max_conns [em_limit]] [norandomseq]
.
• The static statement is usually used to permanently associate a host address (or
network address) on a higher security level interface with a host address (or network
address) on a lower security level interface.
• Static NAT is a bi-directional NAT
• Static NAT creates a permanent xlate entry in the xlate table never expires
• The following statically NATs host 10.10.10.1 on the inside to 5.5.5.5 on the outside.
Internet
10.10.10.10 5.5.5.5
Static NAT
Internet
10.0.1.3 2.2.2.2
• The maximum number of simultaneous tcp connections the host allows is 100
172.16.1.0/24 10.1.1.0/24
• Mapping will happen as one-to-one, i.e. 10.1.1.1 will take 172.16.1.1, so on and so forth.
Static NAT
• Static NAT is bi-directional
• Source translation is when the host (real IP) is the source and the access is from the host’s
interface to the mapped interface (the one we published the host to)
o e.g. The server itself is accessing the internet Outbound access
• Destination translation is when the host is being the destination and someone on the
mapped interface is trying to access that host by its published (translated) address
o e.g. Accessing the internal server from the internet Inbound access
Dest. NAT
DMZ
Server Reply Web Server
#5 #4 External: 172.11.0.2
Client DNS
10.1.1.4 Internal: 192.168.1.2 Server
DMZ
• We can use it when we need to provide access to some
hosts/networks using the same real IP address(es)
Web Server
• In this example we published the DMZ web server to the Client 10.10.10.100
inside LAN by its real IP address. 10.1.1.4
Static PAT
static (inside,outside) tcp 172.11.0.9 telnet 10.1.1.6 telnet netmask 255.255.255.255
static (inside,outside) tcp 172.11.0.9 ftp 10.1.1.5 ftp netmask 255.255.255.255
Changing Ports
static (inside,outside) tcp 172.11.0.8 8080 10.1.1.7 www netmask 255.255.255.255
• You still need to permit the traffic inbound on the outside interface inbound ACL
• Note: For the above examples, if the internal servers also needed outbound access, a nat
statement would need to include their address with a corresponding global.
NAT Example
access-list 101 extended permit tcp host 10.10.10.100 eq www 5.5.5.0 255.255.255.0
static (inside,outside) tcp 1.1.1.100 www access-list 101
• Its used mostly in VPN, as in VPN we usually don’t want to get the VPN traffic to be
translated, however all other traffic should be translated to pass the firewall.
• Unlike policy NAT, NAT exemption does not consider the ports in the access list,
we only specify the real and destination IP addresses.
access-list nonat permit ip 10.10.10.0 255.255.255.0 10.10.20.0 255.255.255.0
nat (inside) 0 access-list nonat
nat (inside) 1 0 0
global (outside) 1 interface
NAT Exemption vs. Identity NAT
• NAT Exemption
o nat 0 with ACL
nat (real_interface_name) 0 access-list acl_name
o This works exactly the same way
as static identity, except it bypasses nat (inside) 0 access-list nonat
NAT.
o Does not create xlate entries.
o It is bi-directional.
• Static Identity
static (dmz,out) 10.10.10.130 10.10.10.130
o Self translation
o Creates a static xlate entry ASA1# show xlate debug
o Its bi-directional 1 in use, 1 most used
o commonly used for address Flags: D - DNS, d - dump, I - identity, i - dynamic, n - no random, r - portmap, s - static
Publishing NAT from dmz:10.10.10.130 to out:10.10.10.130 flags s idle 0:00:13 timeout 0:00:00
Outside NAT
• Using NAT to translate outside address to inside using a NAT and Global
• Goal: Users coming from the 209.165.201.0 network should be PATed to 172.18.124.5
when they access the web server: www.myco.com
One would think the following commands would suffice:
nat (outside) 1 209.165.201.0 255.255.255.0 outside
global (inside) 1 172.18.124.5
static (inside,outside) 210.10.10.10 192.168.101.100
access-list 101 permit tcp any host 210.10.10.10
access-group 101 in interface outside
www.cisco.com
.253 .254
Internet 209.165.201.1
172.18.124.0
210.10.10.1
209.165.201.2
Web Server = www.myco.com
192.168.101.100 210.10.10.10
Outside NAT
• However, the previous commands are not enough! Once you apply a
nat command to the Outside interface, you need to define all IPs out
that interface in a nat command. Otherwise, when the Internal host
attempts to make an Outbound connection, they will get:
305005: No translation group found…
• Because by applying a single nat statement to the Outside interface,
you have effectively hidden everything on the Outside interface from
the Inside. The only way to resolve this is to Un-hide the rest of the
IPs out the Outside interface.
Outside NAT
• Here is the full configuration needed to resolve this:
! Deny the traffic we want to use Outside NAT on and permit all else
access-list nonat deny ip 209.165.201.0 255.255.255.0 any
access-list nonat permit ip any any
nat (outside) 0 access-list nonat
! Don’t forget, we still need the static for inbound, plus an ACL
static (inside,outside) 210.10.10.10 192.168.101.100
access-list 101 permit tcp any host 210.10.10.10
access-group 101 in interface outside
www.cisco.com
.253 .254
Internet 209.165.201.1
172.18.124.0
210.10.10.1
209.165.201.2
Web Server = www.myco.com
192.168.101.100 210.10.10.10
Overlapping Address Problem
• Problem: We are using the same internal network as another company, and we need to access
that other company.
• Solution: Use outside static NAT to translate the other company’s Address Range into another
network:
static (inside,outside) 200.10.10.0 209.165.201.0
static (outside,inside) 200.10.10.0 209.165.201.0
route outside 209.165.201.0 255.255.255.128 210.10.11.111
route outside 209.165.201.128 255.255.255.128 210.10.11.111 1
• P.S: This can be done in just translating the other company’s addresses using static and use nat &
global for the internal network.
209.165.201.0 200.10.10.0
www.a_site.com
.100
Host A .1 .1 .111
Internet 209.165.201.100
NAT Order of Operations (Priority)
1. nat 0 access-list (nat-exempt)
2. Match against existing xlates
3. Static statements
Note: Static identity NAT is included in this category.
a) static NAT with and without access-list (first match)
b) static PAT with and without access-list (first match)
4. Regular dynamic NAT
a) nat with access-list/policy nat (first match)
Note: nat 0 with access-list command is not part of this category.
b) nat (without access-list) (best match)
Note: nat 0 without access-list is part of this category
Note: When choosing a global address from multiple pools with the same NAT ID, this
order is attempted:
1) If the ID is 0 (Regular identity NAT), create an identity xlate.
2) Use the global pool for the dynamic NAT.
3) Use the global pool for the dynamic PAT.
NAT in ASA 8.3 & later
NAT 8.3 (Broadview) Enhancements &
Advantages
• Ease of configuration (single command to configure NAT rule)
• Object-oriented configuration
• All NAT rules in a single table, applied on first match basis
• Ability to insert the rule in any arbitrary order
• NAT configuration is independent of security-levels
• Removal of ACL support
• Use of objects instead of inline IPs
• Auto NAT
• Manual NAT (Twice NAT)
• Per-session NAT
• Many-to-few static mapping
Auto NAT
Network NAT
object network Servers
subnet 10.0.54.0 255.255.255.0
nat (inside,outside) static 203.0.113.0
• Global and static commands from pre-version 8.3 are now gone! Only the ‘nat’ command is
used.
Auto NAT
• “real-ip” feature
o Starting in 8.3, traffic permitted by an ACL must refer to the LOCAL (Real) address for the host, instead
of the GLOBAL (Mapped) address (like pre-8.3)
object network inside-server
host 192.168.1.99
object network inside-server-global
host 14.36.103.222
!
object network inside-server
nat (inside,outside) static inside-server-global
“When the subnet in object ‘inside-net’ behind the inside interface accesses any ip in the ‘VPNhosts’
subnet behind the outside interface, PAT them to the outside interface. Do not change the
destination IP in the packet.”
Manual NAT Command Breakdown
Change the source Translate the
For a packet moving from destination of
of the IP packet
the inside to the outside from ‘inLocal’ to the packet
interface statically (one
‘inGlobal’
to one)
nat (in,out) source static inLocal inGlobal destination static outGlobal outLocal
Change the
Also, for the packet destination of the IP
to match this packet from outGlobal
Translate the to outLocal
translation it
source statically
requires a match on
(one to one)
the destination of
the packet
Manual NAT
• Key differences between version 8.2 and 8.3
o Interface security levels no longer matter when making NAT decisions
o Previous to version 8.3, NAT commands were only effective when applied to the higher security-
level interface (or have to use outside keyword)
So if a user wanted to not translate traffic initiated from the dmz to the inside interface, the NAT 0 statement
(exemption) was applied to the inside interface, instead of the DMZ interface
o These two commands are equivalent (notice inside and outside interfaces are flipped):
nat (outside,inside) source static any any destination static insideMapped insideReal
Manual NAT Example – NAT Exemption
8.2 configuration
access-list vpnacl permit ip 192.168.1.0 255.255.255.0 10.1.2.0 255.255.255.0
!
nat (in) 0 access-list vpnacl
8.3 configuration
object network inside-hosts
subnet 192.168.1.0 255.255.255.0
Object network vpn-hosts
subnet 10.1.2.0 255.255.255.0
!
nat (in,out) source static inside-hosts inside-hosts destination static vpn-hosts vpn-hosts
Manual NAT Example – Policy NAT
8.2 configuration
access-list policynat permit ip 192.168.1.0 255.255.255.0 10.1.2.0 255.255.255.0
!
nat (in) 44 access-list vpnacl
global (out) 44 33.33.33.33
8.3 configuration
object network inside-hosts
subnet 192.168.1.0 255.255.255.0
Object network PATGlobal2
host 33.33.33.33
Object network vpn-hosts
subnet 10.1.2.0 255.255.255.0
!
nat (in,out) source dynamic inside-hosts PATGlobal2 destination static vpn-hosts vpn-hosts
Manual NAT Example – Dynamic NAT with
PAT overload
8.2 configuration
nat (inside) 1 10.10.0.0 255.255.0.0
global (outside) 1 209.165.201.1-209.165.201.30
global (outside) 1 209.165.201.31
global (outside) 1 209.165.201.32
8.3 configuration
object network MAPPEDip1
host 209.165.201.31
object network MAPPEDip2
host 209.165.201.32
object network MAPPEDrange
range 209.165.201.1 209.165.201.30
object-group network MappedObjectGrp
network-object object MAPPEDrange
network-object object MAPPEDip1
network-object object MAPPEDip2
!
nat (inside,outside) source dynamic obj-10.10.0.0 MappedObjectGrp
Unified NAT Table
• Revising the NAT order-of-operations that is applied pre-8.3:
1. Nat 0 w/access-list
2. Match existing xlate
3. Static NAT with and without ACL
4. Static PAT with and without ACL…….
• That “order-of-operations” concept is gone. Now packets starting a new connection (TCP SYN, first UDP packet) are
run through a unified NAT table to find a match, to determine how to translate a packet.
• All NAT rules reside in a single table and are applied on a first match basis. The global NAT rule table is comprised of
three sections:
o Section 1 : Manual NAT
Rules can be inserted by the user in any order.
To be used when source & destination need to be specified together.
o Section 2 : Auto NAT
Rules are inserted automatically when NAT in enabled on an object.
ASA orders these rules implicitly.
o Section 3 : After-auto
Manual NAT entries can go here only if specified with ‘after-auto’ keyword
Unified NAT Table
Default section for Section 1: Manual NAT
source + destination Allows Manual Ordering
(Twice NAT) of Translation Rules
translation rules
• Translate TCP port 9999 from the outside interface to TCP port 23 to the dmz host “dmzServer”
• Inbound connections to the outside interface destined to port 9999 will be forwarded to the dmzServer with destination port of 23
• Note that since the translation was from dmz to outside (outbound) the service defined the source port.
• Translate TCP port 9999 from the outside interface to TCP port 23 to the dmz host “dmzServer”
• Inbound connections to the outside interface destined to port 9999 will be forwarded to the dmzServer with destination port of 23
webServer
webServerGlobal2
• Translate one inside host to two different global IPs on an interface
• External users can connect to either global IP address, and access the same internal resource. This is useful if
global DNS entries are being changed, and some clients still connect to the old global IP address for the server.
webServer
webServerGlobal2
• Translate the traffic (connection) differently depending on the direction the connection was initiated
• For example, all connections initiated OUTBOUND from the webServer should be translated to webServerGlobal1,
but inbound connections initiated to that IP will not be translated.
• Has been added in 8.3(2)
object network webServer
host 192.168.1.99
object network webServerGlobal1
host 209.165.200.225
object network webServerGlobal2
host 209.165.200.226
!
nat (inside,outside) source static webServer webServerGlobal1 unidirectional
nat (inside,outside) source static webServer webServerGlobal2
NAT New Features
Static mapping for service port-range
• Maps a range of ports from one global IP to another
!
object service UDP-ports
service udp source range 16384 32768
!
nat (inside,outside) source static obj-192.168.100.100-03 interface service UDP-ports UDP-ports
!
• New NAT arguments (keywords) are being added to modify the behavior of the ASA regarding PAT IP
pools added first in 8.4(1)11 & 8.4(2)
1. round-robin will use the next global IP in the pool for each new PAT translation. Ensures that connection
PAT translations are spread out evenly across the full range of global PAT IPs, instead of consecutive
ports on the same IP.
By default, all ports for a PAT address will be allocated before the next PAT address is used.
2. pat-pool will cause the ASA to treat a network object as a range of global PAT IP addresses
• For static NAT, disables proxy ARP for incoming packets to the mapped IP addresses.
RFC1918 RFC1918
Addresses Addresses
DMZ
route-lookup 172.16.12.0/24
• Has been added in 8.4(2)
172.16.12.4
• NAT commands override the routing table by default
• Use route-lookup to only apply NAT rules that match the routing table entries
With route-lookup:
nat (inside,outside) source static 172.16.0.0-net 172.16.0.0-net route-lookup
nat (dmz,outside) source static 172.16.12.0-net 172.16.12.0-net match
Other NAT Arguments
• dns Translates DNS replies. Be sure DNS inspection is enabled (inspect dns) (it is
enabled by default). You cannot configure the dns keyword if you configure a
destination address also exists in ASA 8.2 & earlier with the static command
• inactive To make this rule inactive without having to remove the command, use the
inactive keyword. To reactivate it, reenter the whole command without the inactive
keyword.
• after-auto Inserts the rule at the end of section 3 of the NAT table, after the network
object NAT rules. By default, twice NAT rules are added to section 1. You can insert a
rule anywhere in section 3 using the line argument.
Proxy ARP on ASA
Proxy ARP on ASA
• The Network Address Translation (NAT) configuration on the ASA might cause it to respond
to ARP requests for IP addresses other than the ASA's interface IP address.
• So the directly connected L3 devices will know where to forward the traffic destined to these
mapped (translated) addresses.
• That mapped IP address could be from the same ASA mapped interface subnet or a different
one.
• This is happening with Dynamic NAT/PAT and Static NAT translations when the mapped IP
address is not the ASA mapped interface IP address.
Proxy ARP Behavior for NAT
• In ASA 8.2 & earlier:
o Simply the ASA does proxy-arp when ARP request for the mapped address
is received on the mapped interface.
The mapped address can be from the same mapped interface subnet or a different
one.
For Static Identity NAT or regular NAT.
Would not proxy-arp for static identity only in transparent mode
• Proxy ARP is enabled by default on a per interface basis. This can be confirmed via
running the command.
ciscoasa# sh run all sysopt | i proxy
no sysopt noproxyarp outside
no sysopt noproxyarp inside
no sysopt noproxyarp dmz
DMZ2
(50); by default, these two interfaces cannot talk.
50
• To enable the access between same security interfaces:
inside outside
same-security-traffic permit inter-interface
100 0
• It will let the traffic flow freely between all same security
interfaces without access lists.
• By default NAT is not required between same security level
DMZ
50
interfaces (even if you enable NAT control in old ASA versions).
• You can optionally configure NAT if desired.
U-Turn Traffic/Hairpinning Traffic
• Modular Policy Framework provides a consistent and flexible way to configure security
appliance features.
• Efficiently apply advanced firewall policies to select traffic:
o Connection limit and timeout settings, TCP policy overrides (TCP normaliztion)
o Policing and traffic prioritization (QoS)
o Application Inspection
MPF Usage
• Modular Policy Framework supports the following features (functions):
1. Connection Settings TCP normalization, TCP and UDP connection limits and timeouts,
TCP state bypass & TCP sequence number randomization
2. Application Inspection
3. QoS
1)QoS input & output policing
2)QoS standard priority queue
3)QoS traffic shaping, hierarchical priority queue
policy-map global-policy
class http-server
set connection conn-max 256
Applying Actions
• Only one action of each type can apply to a connection
First configured action applies policy-map global_policy
for overlapping feature type in class ALL_TCP
overlapping traffic classes
set connection conn-max 10000
class HTTP
Different action types under
one class are allowed set connection conn-max 5000
inspect http
• The exact options available for an inspection policy map depends on the application.
• By default, the configuration includes a global policy that matches all default application
inspection traffic and applies inspection to the traffic globally
• For most actions, global service policy applied inbound to the interfaces, while interface
policies applied bi-directional.
Default Service Policy Configuration
class-map inspection_default
match default-inspection-traffic
policy-map type inspect dns preset_dns_map
parameters
message-length maximum client auto
message-length maximum 512
dns-guard
protocol-enforcement
nat-rewrite
policy-map global_policy
class inspection_default
inspect dns preset_dns_map
inspect ftp
inspect h323 h225 _default_h323_map
inspect h323 ras _default_h323_map
inspect ip-options _default_ip_options_map
inspect netbios
inspect rsh
inspect rtsp
inspect skinny
inspect esmtp _default_esmtp_map
inspect sqlnet
inspect sunrpc
inspect tftp
inspect sip
inspect xdmcp
service-policy global_policy global
Layer 3/4 Class Maps vs. Layer 7 Class Maps
Layer 3/4 Class Maps Layer 7 Class Maps
• Match traffic based on protocols, ports, IP
addresses, and other layer 3 or 4 attributes: • Work with layer 7 policy maps to implement
advanced protocol inspection
o ACL
o Any packet • Match criteria is specific to one of the following
o Default inspection traffic applications:
o IP differentiated services code point o IM, RTSP, SIP, DNS, FTP, H.323 , HTTP,
o TCP and UDP ports Scansafe
o IP precedence
• Enable you to specify a not operator for a
o RTP port numbers
match condition
o VPN tunnel group
• Typically contain only one match condition • Can contain one or more match conditions
• Are mandatory MPF components • Can use regular expressions as match criteria
• Very heavy performance impact on ASA due to extra work happens in Control Path
policy-map global_policy
class inspection_default
inspect ftp FTP_BLOCK_PUT_COMMAND
Configuring Default Inspection (L3/L4 Maps)
1) Create a Layer 3/4 class 2) Create a Layer 3/4 policy 3) Use a service policy to
map to identify traffic by map to inspect the traffic activate the Layer 3/4 policy
matching: defined in a Layer 3/4 class and apply it on an interface
• An ACL map, we can inspect the or globally
following: • We can also modify the
• Any packet
• The default inspection traffic ctiqbe – dcerpc – dns – esmtp - ftp default global policy to
add/remove protocols
• A DSCP value gtp - h323 – http – icmp – ils - im inspection.
• A destination IP address
ip-options - ipsec-pass-thru - ipv6
• TCP or UDP ports
mgcp – netbios – pptp – rsh - rtsp
• IP precedence
• RTP ports scansafe – sip – skinny - snmp
• A tunnel-group sqlnet – sunrpc – tftp – vxlan - waas
xdmcp
Configuring Layer 7 Inspection
1) Create a Layer 7 class map to identify traffic 2) Create a Layer 7 policy map to defend
by matching criteria specific to applications: against Application Layer attacks by
• IM referencing a Layer 7 class-map and
applying an action
• RTSP
• SIP 3) Create a Layer 3/4 policy map to associate
• DNS traffic defined in a Layer 3/4 class map and
reference the Layer 7 policy map
• FTP
• H.323 4) Use a service policy to activate the Layer 3/4
• HTTP policy on an interface or globally
• Scansafe
Default Service Policy Configuration
class-map inspection_default • This as it is in ASA 9.3
match default-inspection-traffic
policy-map type inspect dns preset_dns_map
parameters • By default, the configuration includes a
message-length maximum client auto policy that matches all default application
message-length maximum 512
dns-guard inspection traffic and applies certain
protocol-enforcement inspections to the traffic on all interfaces
nat-rewrite
policy-map global_policy
(a global policy).
class inspection_default
inspect dns preset_dns_map • Default application inspection traffic
inspect ftp includes traffic to the default ports for each
inspect h323 h225 _default_h323_map
inspect h323 ras _default_h323_map protocol
inspect ip-options _default_ip_options_map
inspect netbios • DNS advanced inspection is enabled by
inspect rsh default, using the preset_dns_map
inspect rtsp
inspect skinny inspection policy map.
inspect esmtp _default_esmtp_map
inspect sqlnet • There are other default inspection policy
inspect sunrpc
inspect tftp maps such as show running-config
inspect sip all policy-map
inspect xdmcp
service-policy global_policy global
Advanced Protocol Inspection
• Advanced protocol inspection gives you options such as the following for defending against
application layer attacks:
o Blocking *.exe attachments
o Prohibiting use of Kazaa or other peer-to-peer file-sharing programs
o Setting limits on URL lengths
o Prohibiting file transfer or whiteboard as part of IM sessions
o Protecting your web services by ensuring that XML schema is valid
o Resetting a TCP session if it contains a string you know is malicious
o Dropping sessions with packets that are out of order
DNS Doctoring
• ASA can rewrite the embedded IP in transit DNS responses per NAT rules
o DNS inspection is needed to achieve this
o Modifies A (IPv4) or AAAA (IPv6) record when crossing the mapped interface
o Should be used with Static NAT
o DNS doctoring is enabled per the static NAT rules using the keyword dns
o DNS inspection is enabled by default on the ASA
object network HTTP_SERVER
host 192.168.1.57
Web Server nat (inside,outside) static 198.51.100.170 dns
192.168.1.57
inside outside
DNS Server
policy-map type inspect dns preset_dns_map
DNS Doctoring parameters
message-length maximum client auto
message-length maximum 512
dns-guard
protocol-enforcement
nat-rewrite
policy-map global_policy
class inspection_default
inspect dns preset_dns_map
ASA 8.2 & earlier
static (inside,outside) 198.51.100.170 192.168.1.57 dns
3. Rewrite
2. www.abcd.com
Local Client 198.51.100.170→
is 198.51.100.170
192.168.1.57
1. Who is
www.abcd.com ?
DNS Doctoring object network HTTP_SERVER
host 192.168.1.57
nat (inside,outside) static 198.51.100.170 dns
DNS Server on the Inside of the ASA
4. Access
Web Server 198.51.100.170
www.abcd.com Remote Client
192.168.1.57
inside outside
Internet
DNS Server
3. Rewrite
2. www.abcd.com
192.168.1.57 →
is 192.168.1.57
198.51.100.170
object network INSIDE_NETWORK
subnet 10.1.200.0 255.255.255.0
1. FTP Control conn over TCP 2. Dynamic PAT and Inspect FTP on TCP/21
10.1.200.3/12345→192.0.2.1/21 10.1.200.3/12345→198.51.100.1/54321
3. Client requests Data conn 4. FTP Inspect allocates xlate and rewrites
from Server to 10.1.200.3/11111 10.1.200.3/11111→198.51.100.1/22222
[PORT 10,1,200,3 43,103] [PORT 198,51,100,1 86206]
Blocking URL Patterns with Regex
• Enhanced HTTP Inspection can match URL and reset connection
o Consider performance implications, especially on single-core platforms
o Use ASA CX or Cloud Web Security (ScanSafe) instead
regex BAD_URI ".*verybadscript.*"
regex BAD_HOST "verybadsite\.com"
policy-map global_policy
class inspection_default
inspect http URL_POLICY
service-policy global_policy global
ASA Packet Flow
Understanding the Packet Flow
• To effectively troubleshoot a problem, one must first understand the packet path through the
network.
• Attempt to isolate the problem down to a single device.
• Then perform a systematic walk of the packet path through the device to determine where
the problem could be.
• For problems relating to the firewall always:
o Determine the flow: SRC IP, DST IP, SRC port, DST port, and protocol
o Determine the interfaces through which the flow passes
• All firewall issues can be simplified to two Interfaces (Ingress & Egress) and the rules tied to
both
Understanding the Packet Flow
• Once the device and flow have been identified, walk the path of the packet through the
device.
• The packet path through the firewall is illustrated in the next several slides.
• For troubleshooting, pay careful attention to where the packet can be dropped in the
decision-making process.
Client
Flow Example 10.1.1.9
Flow: inside
• SRC IP: 10.1.1.9
• SRC Port: 11030
• DST IP: 198.133.219.25
• DST Port: 80
• Protocol: TCP
Interfaces: outside
• SRC Interface: Inside
• DST Interface: Outside
Server
198.133.219.25
Packet Flow Diagram
CSC/CX/SFR
Module
IPS
Module
Yes
Recv Existing
No ACL
Yes Match
Yes Egress L3 L2 Xmit
Ingress Inspection NAT IP
Pkt Interface Conn Permit xlate Sec Checks Header Interface Route Addr Pkt
No No No No No
Drop Drop Drop Drop Drop
Yes
Recv Existing
No ACL
Yes Match
Yes Egress L3 L2 Xmit
Ingress Inspection NAT IP
Pkt Interface Conn Permit xlate Sec Checks Header Interface Route Addr Pkt
No No No No No
Drop Drop Drop Drop Drop
Recv Existing
No ACL
Yes Match
Yes Egress L3 L2 Xmit
Ingress Inspection NAT IP
Pkt Interface Conn Permit xlate Sec Checks Header Interface Route Addr Pkt
No No No No No
Drop Drop Drop Drop Drop
Recv Existing
No ACL
Yes Match
Yes Egress L3 L2 Xmit
Ingress Inspection NAT IP
Pkt Interface Conn Permit xlate Sec Checks Header Interface Route Addr Pkt
No No No No No
Drop Drop Drop Drop Drop
Recv Existing
No ACL
Yes Match
Yes Egress L3 L2 Xmit
Ingress Inspection NAT IP
Pkt Interface Conn Permit xlate Sec Checks Header Interface Route Addr Pkt
No No No No No
Drop Drop Drop Drop Drop
Recv Existing
No ACL
Yes Match
Yes Egress L3 L2 Xmit
Ingress Inspection NAT IP
Pkt Interface Conn Permit xlate Sec Checks Header Interface Route Addr Pkt
No No No No No
Drop Drop Drop Drop Drop
• The packet is subjected to an Inspection Check.
• This inspection verifies whether or not this specific packet
flow is in compliance with the protocol.
• Cisco ASA has a built-in inspection engine that inspects Syslog messages when a packet is denied by Security Inspection:
each connection as per its pre-defined set of application-
level functionalities. %ASA-4-405104: H225 message received from
o Inspection rules are applied to NAT embedded IPs in payload outside_address/outside_port to
(e.g. DNS Doctoring). inside_address/inside_port before SETUP
o Commands in control channels are inspected for
compliance/secondary data channels (e.g. FTP). %ASA-4-406002: FTP port command different address:
• If it passed the inspection, it is moved forward. Otherwise, 10.2.252.21(192.168.1.21) to 209.165.202.130 on
the packet is dropped and the information is logged. interface inside
Recv Existing
No ACL
Yes Match
Yes Egress L3 L2 Xmit
Ingress Inspection NAT IP
Pkt Interface Conn Permit xlate Sec Checks Header Interface Route Addr Pkt
No No No No No
Drop Drop Drop Drop Drop
Recv Existing
No ACL
Yes Match
Yes Egress L3 L2 Xmit
Ingress Inspection NAT IP
Pkt Interface Conn Permit xlate Sec Checks Header Interface Route Addr Pkt
No No No No No
Drop Drop Drop Drop Drop
• Packet is “virtually” forwarded to egress interface (i.e. not forwarded to the driver yet)
• Egress interface is determined first by translation rules
• If no egress interface is specified in the translation rule, the results of a global route
lookup are used to determine egress interface
L3 Route Lookup
Yes
Recv Existing
No ACL
Yes Match
Yes Egress L3 L2 Xmit
Ingress Inspection NAT IP
Pkt Interface Conn Permit xlate Sec Checks Header Interface Route Addr Pkt
No No No No No
Drop Drop Drop Drop Drop
Recv Existing
No ACL
Yes Match
Yes Egress L3 L2 Xmit
Ingress Inspection NAT IP
Pkt Interface Conn Permit xlate Sec Checks Header Interface Route Addr Pkt
No No No No No
Drop Drop Drop Drop Drop
• Once a layer 3 route has been found, and next hop identified, layer 2 resolution is
performed
• Layer 2 re-write of MAC header
• If layer 2 resolution fails—no syslog
Transmit Packet
Yes
Recv Existing
No ACL
Yes Match
Yes Egress L3 L2 Xmit
Ingress Inspection NAT IP
Pkt Interface Conn Permit xlate Sec Checks Header Interface Route Addr Pkt
No No No No No
Drop Drop Drop Drop Drop
General Rules:
1. If a destination IP translating XLATE already exists, the egress interface for the packet is
determined from the XLATE table, but not from the routing table.
2. If a destination IP translating XLATE does not exist, but a matching static translation exists
(for the destination), then the egress interface is determined from the static NAT rule and an
XLATE is created, and the routing table is not used.
3. If a destination IP translating XLATE does not exist and no matching static translation exists,
the packet is not destination IP translated. The ASA processes this packet by looking up
the route (route-lookup) to select the egress interface, then source IP translation is performed
(if necessary).
Egress Interface Selection Process
In Summary:
• Destination translation Egress interface is selected using existing XLATE or static
translation rules (NAT diversion)
o Network Object NAT diverts packets to real interface only for actual translation (object identity NAT
uses route-lookup)
o Manual NAT rules divert packets to respective interfaces by default
o Best to disable NAT divert for identity manual NAT rules using route-lookup keyword
• Outbound initial connection (source translation only) Egress interface is selected based on
route lookup, NAT rule is selected (if no existing xlate) and then xlate entry is created.
o The incoming return packets are forwarded to egress interface using existing XLATE only.
NAT Diversion
object network DMZ_FTP Identity translation, so inbound packets from
host 198.51.100.200 outside to 198.51.100.200 use routing table
nat (dmz,outside) static 198.51.100.200
object network DMZ_MAIL Actual translation happens, so inbound
host 172.16.171.125 packets from inside to 192.168.1.201 will
always divert to 172.16.171.125 on DMZ
nat (dmz,inside) static 192.168.1.201
nat (inside,outside) source static 192_168_1_0 192_168_1_0 destination static 192_168_2_0 192_168_2_0
Inbound Destination NAT NAT Divert
Phase: 1
Type: UN-NAT
Subtype: static
Result: ALLOW
Config:
nat (inside,outside) source static obj-192.168.10.250 obj-192.168.10.250
Additional Information:
NAT divert to egress interface inside
Untranslate 192.168.10.250/0 to 192.168.10.250/0
Inbound Destination NAT Route Lookup
nat (inside,outside) source static obj-192.168.10.250 obj-192.168.10.250 route-lookup
Phase: 1
Type: ROUTE-LOOKUP
Subtype: input
Result: ALLOW
Config:
Additional Information:
in 192.168.10.0 255.255.255.0 inside
Phase: 2
Type: UN-NAT
Subtype: static
Result: ALLOW
Config:
nat (inside,outside) source static obj-192.168.10.250 obj-192.168.10.250 route-lookup
Additional Information:
NAT divert to egress interface inside
Untranslate 192.168.10.250/0 to 192.168.10.250/0
Authentication, Authorization
& Accounting (AAA)
AAA Overview
• AAA is a set of services for controlling access to computer resources, enforcing policies,
assessing usage, and providing the information necessary to bill for services. These
processes are considered important for effective network management and security.
o Authentication identifies a user
o Authorization determines what that user can do
o Accounting monitors the network usage time
Authentication
• Provides a way to identify a user
• Valid username and valid password must be provided to grant access
• The AAA server compares a user's authentication credentials against its database
• If the credentials match, the user is permitted access to the network. If the credentials do not match,
authentication fails and network access is denied.
• You can configure the Cisco ASA to authenticate the following items:
o All administrative (management) connections to the ASA, including the following sessions:
Telnet aaa authentication telnet console
SSH aaa authentication ssh console
Serial console aaa authentication serial console
ASDM using HTTPS aaa authentication http console
o The enable command aaa authentication enable console
o Network access Cut-through proxy & IDFW
o VPN access
Authorization
• After a user is authenticated, that user may be authorized for different types of access or
activity.
• You can configure the ASA to authorize the following items:
o Exec authorization (privilege level) aaa authorization exec
o Management commands aaa authorization command
o Network access Cut-through proxy
o VPN access
Accounting
• Accounting measures the resources a user consumes during access
o The amount of system time or the amount of data that a user has sent or received during a
session.
• Accounting is carried out through the logging of session statistics and usage information,
which is used for authorization control, billing, trend analysis, resource utilization, and
capacity planning activities.
• I can do accounting for the following:
o Serial aaa accounting serial console
o SSH aaa accounting ssh console
o Telnet aaa accounting telnet console
o Enable aaa accounting enable console
o Network Access Cut-through proxy
o Commands Accounting aaa accounting command
AAA Servers
AAA Servers
• The AAA server is a network server that is used for access control.
AAA Server Groups
• If you want to use an external AAA server for authentication, authorization, or accounting:
1. You must first create at least one AAA server group per AAA protocol and add one or more servers to each
group.
2. You identify AAA server groups by name.
3. Each server group is specific to one type of server or service.
RADIUS combines authentication and authorization TACACS+ uses the AAA architecture, which separates
authentication, authorization, and accounting.
RADIUS does not support ARA access, Net BIOS Frame TACACS+ offers multiprotocol support.
Protocol Control protocol,
NASI, and X.25 PAD connections.
RADIUS does not support command authorization TACACS+ supports command authorization, on a per-
user or per-group basis.
TACACS+ Server Configuration
aaa-server <Server_Group_Name> protocol tacacs+
aaa-server <Server_Group_Name> (Int_Name) host <Server_IP> <pre-shared_key> timeout <1-300>
• Cisco ASA supports the following RFC-compliant RADIUS servers for AAA:
o Cisco Secure ACS 3.2, 4.0, 4.1, 4.2, and 5.x
o Cisco Identity Services Engine (ISE) ACS
o RSA RADIUS in RSA Authentication Manager 5.2, 6.1, and 7.x
o Microsoft
ISE
LDAP Server Configuration
• The Cisco ASA is compatible with the most LDAPv3 directory servers, including:
o Sun Microsystems JAVA System Directory Server
o Microsoft Active Directory
o Novell
o OpenLDAP
LOCAL ASA Database
username <username> password <passwd> privilege <0-15>
• You can use the local database for the following functions:
o ASDM per-user access
o Console authentication
o Telnet and SSH authentication
o enable command authentication
o Command authorization
o Network access authentication
o VPN client authentication
ASA5555# show run username
username cisco password 3USUcOPFUiMCO4Jk encrypted privilege 15
LOCAL Database Fallback
• The local database can act as a fallback method for several functions. This behavior is
designed to help you prevent accidental lockout from the ASA.
• Fallback means if the servers in the AAA server group failed (dead), the AAA request
will be forwarded to the next AAA group or the LOCAL DB, NOT if the authentication
fails.
Testing AAA
test aaa-server authentication <Server_Group_Name> host <Server_IP> username <username> password <Paswd>
ASA Management
ASA Management Access
• You cannot use Telnet to the lowest security interface unless you use Telnet inside a VPN
tunnel.
• The login password (passwd) is only used for Telnet if you do not configure Telnet user
authentication (the aaa authentication telnet console command).
• Starting 9.0(2)/9.1(2) The default Telnet login password was removed; you must manually
set the password before using Telnet passwd command
SSH crypto key generate rsa modulus modulus_size
• 5 concurrent sessions
• The ASA supports the SSH remote shell functionality provided in SSH Versions 1 and 2 and
supports DES and 3DES ciphers.
• Starting 8.4 The SSH default username is no longer supported. You can no longer connect to the
ASA using SSH with the pix or asa username and the login password. To use SSH, you must
configure AAA authentication using the aaa authentication ssh console
Adaptive Security Device Manager (ASDM)
asdm image {disk0:/ | disk1:/}[path/]asdm_image_name
http source_IP_address mask source_interface
http server enable [port]
• By default, you can log into ASDM with a blank username and the enable password set by
the enable password command. Note that if you enter a username and password at the
login screen (instead of leaving the username blank), ASDM checks the local database for a
match.
• If you configure HTTP authentication, you can no longer use ASDM with a blank username
and the enable password.
ASDM
ASDM
• Download and upload files directly to the ASA from local computer or cisco.com
ASDM Monitoring Tab
• Graphing Watching changes over time
Automatic conversion
• You need to enter to the ROMMON mode by pressing the Break button when you get
prompted to.
monitor>INTERFACE= <num>
monitor>ADDRESS= <ASA_ip_address>
monitor>SERVER= <TFTP_server_ip_address>
monitor>GATEWAY= <gateway_ip_address>
monitor>FILE=<filename>
monitor>ping <tftp_server_ip_address>
monitor>tftp
• The Firewall will boot from the RAM, not the FLASH, so after finishing you’ll need to copy it
again to the Flash memory
ASAfirewall>enable
ASAfirewall#copy tftp flash
Backup Configuration
• You can copy the startup configuration or running configuration to an external server or to the
local flash memory.
• By default, the ASA boots from a startup configuration that is a hidden file.
• Sets the startup configuration to be a known file instead of the default hidden file .
• For ASA 8.2 & earlier permanent licenses had to match exactly on both ASAs
Primary/Active Secondary/Standby
Time-Based Licenses
• ASA 8.3 & later allows multiple time-based licenses to be active at a time
• Time-based licenses are aggregated for failover
Install the License
activation-key key [activate | deactivate]
• You can install one permanent key, and multiple time-based keys.
• If you enter a new permanent key, it overwrites the already installed one.
• The activate and deactivate keywords are available for time-based keys only
• ASA reload might be required, some permanent licenses require you to reload the ASA
after entering the new activation key. If you need to reload, you will see the following
message:
o WARNING: The running activation key was not updated with the requested
key. The flash activation key was updated with the requested key, and
will become active after the next reload.
Licensing Considerations