Security - Cisco Firewall Training
Security - Cisco Firewall Training
TRAINING
Course Flow
Trainer Introduction
1. Name:
2. Position :
3. Experiences:
Trainee Introduction
1. Name
2. Position :
3. Security Network knowledges and experiences…
Lession 1
Cisco Security Appliances Overview
What Is a Firewall?
DMZ
Network
Internet
Outside Inside
Network Network
DMZ:
Server B
Inside:
Host A Data A B
Server C
Internet
Data A C
AB-Yes
AC-No
Proxy
Server
Internet
Outside Inside
Network Network
DMZ:
Server B
Inside:
Host A Data HTTP A B
Server C
Internet
State Table
Limits information that is allowed Source address 192.168.0.20 10.0.0.11
but also on the packets state table Initial sequence no. 49769 49091
Ack
content Flag Syn Syn
Security Appliances: What Are They?
FTP
Server Client
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.
Modular Policy
S2S S2S
Site C Site B
B
A NK
BA
NK
Site to Site
Internet
IPsec VPN
SSL VPN
Headquarters
Remote Access
Security Context (Virtual Firewall)
Internet Internet
Contexts
1 2 1 2
Primary: Secondary:
Failed Firewall Active Firewall
Primary: Secondary:
Failed/Standby Active/Active
Internet Internet
Failover protects the network if the primary security appliance goes offline..
– Active/standby: Only one unit can be actively processing traffic; the other is hot standby.
– Active/Active: Both units can process traffic and serve as backup units.
Stateful failover maintains the operating state during failover.
Transparent Firewall
192.168.1.5
192.168.1.2
Internet
Adaptive
Security
Device
Manager
Models and Features of
Cisco Security Appliances
ASA 5500 Series
ASA 5550
ASA 5540
Price
ASA 5520
ASA 5510
ASA 5505
Gigabit Ethernet
PIX 525
Price
PIX 515E
PIX 506E
PIX 501
Gigabit Ethernet
Functionality
Cisco ASA 5510 Adaptive Security
Appliance
Delivers advanced security services, including high-performance VPN services, for medium-
sized enterprise networks
Provides up to 280,000 concurrent connections
Provides up to 450-Mbps firewall throughput
Provides Interface support
• 4 10/100/1000 Gigabit Ethernet interfaces
• 1 10/100 Fast Ethernet interface
• Up to 100 VLANs
• Up to 20 contexts
Supports failover
• Active/standby
• Active/active
Supports VPNs
• Site to site (750 peers)
• Remote access
• WebVPN
Supports optional SSMs (Cisco ASA AIP SSM, Cisco ASA CSC SSM, and four-port
Gigabit Ethernet SSM)
Cisco ASA 5540 Adaptive Security
Appliance
Status Flash
Power Active VPN
ASA 5510, 5520, and 5540 Adaptive
Security Appliances Back Panel
CompactFlash
Fixed interfaces
Security services
module
ASA 5510, 5520, and 5540 Adaptive
Security Appliances Connectors
CompactFlash
*ASA 5510 Adaptive Security Appliance supports 10/100 Fast Ethernet ports.
Cisco ASA Security Services Module
High-performance module
designed to provide additional
security services
Diskless (Flash-based)
design for improved reliability
Gigabit Ethernet port for
out-of-band management
•SSM Models
SSM-10
2.0-GHz processor
Speed
1.0 GB RAM
SSM-20
2.4-GHz processor
2.0 GB RAM Link and
activity
Power Status
Four-Port Gigabit Ethernet SSM
RJ-45 link SFP link
LED LED
RJ-45 SFP
speed speed
LED LED
Status
LED SFP
RJ-45 Power
ports LED ports
Summary
Monitor ciscoasa(config)#
monitor>
Access Privileged Mode
Internet
ciscoasa>
enable [priv_level]
Used to control access to the privileged mode
Enables you to enter other access modes
ciscoasa> enable
password:
ciscoasa#
Access Configuration Mode: configure
terminal Command
ciscoasa#
configure terminal
Used to start configuration mode to enter configuration commands from a terminal
ciscoasa#
exit
Used to exit from an access mode
ciscoasa> enable
password:
ciscoasa# configure terminal
ciscoasa(config)# exit
ciscoasa# exit
ciscoasa>
help Command
USAGE:
enable [<priv_level>]
File Management
Viewing and Saving Your Configuration
startup- running-
config config
(default)
ciscoasa(config)#
clear configure all
Clears the running configuration
startup- running-
config config
(default)
ciscoasa#
write erase
Clears the startup configuration
ciscoasa#
reload [at hh:mm [month day | day month]]
[cancel] [in [hh:]mm] [max-hold-time [hh:]mm]
[noconfirm] [quick] [reason text] [save-config]
Reboots the security appliance and reloads the configuration
Allows scheduled reboots
ciscoasa# reload
Proceed with reload?[confirm] y
Rebooting...
File System
Release 7.0
and later
Software image
Configuration file
Private data
ASDM image
Backup image*
Backup
configuration file*
Displaying Stored Files: System and
Configuration
Internet
DMZ Network
GigabitEthernet0/2
Security level 50
Interface name = DMZ
g0/2
Internet
g0/0 g0/1
ciscoasa#
show memory
Internet
10.0.1.11
10.0.1.4
ciscoasa#
172.16.1.0
.1
Current IP Addresses:
Interface Name IP address Subnet mask Method
GigabitEthernet0/0 outside 192.168.1.2 255.255.255.0 CONFIG
GigabitEthernet0/1 inside 10.0.1.1 255.255.255.0 CONFIG
GigabitEthernet0/2 dmz 172.16.1.1 255.255.255.0 CONFIG
show interface Command
GigabitEthernet0/2
Interface name = dmz
Security level = 50
g0/2
Internet
g0/0 g0/1
GigabitEthernet0/0 GigabitEthernet0/1
Interface name = outside Interface name = inside
Security level = 0 Security level = 100
Internet
10.0.1.11
X.X.X.X 10.0.1.X
NAT
10.0.1.4
ciscoasa#
show run nat
Displays a single host or range of hosts to be translated
Internet
10.0.1.11
10.0.1.X
Mapped Pool
192.168.1.20-192.168.1.254 10.0.1.4
ciscoasa#
show run global
Displays the pool of mapped addresses
Internet
10.0.1.11
192.168.1.20 10.0.1.11
Outside Inside
mapped pool local 10.0.1.4
Xlate Table
192.168.1.20 10.0.1.11
ciscoasa#
show xlate
Displays the contents of the translation slots
172.16.1.0
g0/2
192.168.1.0 10.0.1.0
Internet
.1 g0/0 g0/1
ciscoasa#
Internet
10.0.1.11
10.0.1.4
ciscoasa#
Internet
example.com
ciscoasa#
asa1#traceroute 172.26.26.20
Basic Security
Appliance Configuration
Basic CLI Commands for Security
Appliances
hostname
interface
• nameif
• ip address
• security-level
• speed g0/2
• duplex Internet
• no shutdown g0/0 g0/1
nat-control
nat
global
route
Assigning a Hostname to Security
Appliance: Changing the CLI Prompt
New York
( asa1)
Server
Boston
(asa2)
Server
Internet
Dallas
(asa3)
Server
ciscoasa(config)#
hostname newname
Changes the hostname in the security appliance CLI prompt
ciscoasa(config)# hostname asa1
asa1(config)#
interface Command and
Subcommands
GigabitEthernet0/2
g0/2
Internet
g0/0 g0/1
GigabitEthernet0/0 GigabitEthernet0/1
ciscoasa(config)#
GigabitEthernet0/2
Interface name = dmz
g0/2
Internet
g0/0 g0/1
GigabitEthernet0/0 GigabitEthernet0/1
Interface name = outside Interface name = inside
ciscoasa(config-if)#
nameif if_name
Assigns a name to an interface on the security appliance.
asa1(config)# interface GigabitEthernet0/0
asa1(config-if)# nameif outside
Assign Interface IP Address:
ip address Subcommand
g0/2
Internet
g0/0 g0/1
GigabitEthernet0/0
Interface name = outside
IP address = 192.168.1.2
ciscoasa(config-if)#
Internet
g0/0
GigabitEthernet0/0
Interface name = outside
IP address = dhcp
ciscoasa(config-if)#
g0/2
Internet
g0/0 g0/1
GigabitEthernet0/0
Interface name = outside
IP address = 192.168.1.2
Security level = 0
ciscoasa(config-if)#
security-level number
g0/2
Internet
g0/0 g0/1
Inside Network
GigabitEthernet0/1
Security level 100
Interface name = inside
ciscoasa(config)#
same-security-traffic permit {inter-interface | intra-interface}
Enables communication between interfaces with the same security level or allows traffic to enter and exit the same interface
ciscoasa(config-if)#
g0/2
m0/0
Internet
g0/0 g0/1
ciscoasa(config-if)#
management-only
Configures an interface to accept management traffic only
no management-only
Disables management-only mode
Disables management-only
asa1(config)# mode (for ASA 5520, 5540 and 5550)
interface management0/0
asa1(config-if)# no management-only
Enabling and Disabling Interfaces:
shutdown Subcommand
g0/2
Internet
g0/0 g0/1
GigabitEthernet0/0
Enabled
ciscoasa(config-if)#
shutdown
Disables an interface
no shutdown = enabled
Disables management-only
asa1(config)# interfacemodeGigabitEthernet0/0
(for ASA 5520, 5540 and 5550)
asa1(config-if)# no shutdown
Network Address Translation
NAT
192.168.0.20 10.0.0.11
Internet
10.0.0.11
192.168.10 .11
Outside Inside
Mapped Pool Local 10.0.0.4
Translation Table
192.168.0.20 10.0.0.11
Enable NAT Control
NAT
192.168.0.20 10.0.0.11
Internet
10.0.0.11
200.200.200.11
Outside Inside
Mapped Pool Local 10.0.0.4
Translation Table
192.168.0.20 10.0.0.11
Internet
10.0.1.11
X.X.X.X 10.0.1.11
NAT
10.0.1.4
ciscoasa(config)#
nat (if_name) nat_id address [netmask] [dns]
Internet
10.0.1.11
192.168.1.20 10.0.1.11
NAT
ciscoasa(config)# 10.0.1.4
Internet
10.1.1.11
192.168.1.1 10.0.1.102
ciscoasa(config)#
10.1.1.4
route if_name ip_address netmask gateway_ip
[metric]
Defines a static or default route for an interface
ciscoasa(config)#
asa1(config)# names
asa1(config)# name 172.16.1.2 bastionhost
asa1(config)# name 10.0.1.11 insidehost
Configuration Example
172.16.1.
0 .1
192.168.1.0 10.0.1.0 10.1.1.0
Internet .1
.2 .1
GigabitEthernet0/0 GigabitEthernet0/1
Interface name = outside Interface name = inside
Security level = 0 Security level = 100
IP address = 192.168.1.2 IP address = 10.0.1.1
GigabitEthernet0/2
“bastionhost”
Interface name = dmz
172.16.1.2
Security level = 50 “insidehost”
172.16.1.0 IP address = 172.16.1.1 10.1.1.11
.1
192.168.1.0 10.0.1.0 10.1.1.0
Internet
.2 .1 .1
interface GigabitEthernet0/2
nameif dmz
security-level 50
speed 1000
duplex full
ip address 172.16.1.1 255.255.255.0
passwd 2KFQnbNIdI.2KYOU encrypted
hostname asa1
names
name 172.16.1.2 bastionhost
name 10.1.1.11 insidehost
Configuration Example (Cont.)
“bastionhost”
172.16.1.2
Default Route 172.16.1.0 .2 “insidehost”
Static Route
.1 10.1.1.11
192.168.1.0 10.0.1.0 10.1.1.0
Internet
.1 .2 .1 .102 .1
192.168.1.20 - 254
nat-control
nat (inside) 1 0.0.0.0 0.0.0.0 0 0
global (outside) 1 192.168.1.20-192.168.1.254
route outside 0.0.0.0 0.0.0.0 192.168.1.1 1
route inside 10.1.1.0 255.255.255.0 10.0.1.102 1
Summary
Cisco security appliances have four main administrative access modes:
unprivileged, privileged, configuration, and monitor.
There are two configuration memories in the Cisco security appliances:
running configuration and startup configuration.
The show running-config command displays the current configuration in
the security appliance RAM on the terminal.
You can use the copy run start or the write memory command to save the
current running configuration to flash memory, startup configuration.
Interfaces with a higher security level can access interfaces with a lower
security level, but interfaces with a lower security level cannot access
interfaces with a higher security level unless given permission.
The security appliance show commands help you manage the security
appliance.
The basic commands that are necessary to configure Cisco security
appliances are the following: interface, nat, global, and route.
The nat and global commands work together to translate IP addresses.
Lession 3
Managing the
Security Appliance
Managing System Access
Configuring Telnet Access to the
Security Appliance Console
Telnet 10.0.0.11
Internet
ciscoasa(config)#
telnet {{hostname | IP_address mask interface_name} |
{IPv6_address interface_name} | {timeout number}}
Enables you to specify which hosts can access the security appliance console
with Telnet and set the maximum time a console Telnet session can be idle
before being logged off by the security appliance
ciscoasa(config)#
passwd password [encrypted]
Sets the password for Telnet access to set the security appliance
ciscoasa#
show running-config telnet [timeout]
Displays IP addresses permitted to access the security appliance via Telnet
ciscoasa(config)#
clear configure telnet
Removes the Telnet connection and the idle timeout from the configuration
ciscoasa#
who [local_ip]
Enables you to view which IP addresses are currently accessing the security appliance
console via Telnet
ciscoasa#
kill telnet_id
Terminates a Telnet session
SSH Connections to the Security
Appliance
ciscoasa(config)# ciscoasa(config)#
crypto key zeroize {rsa | dsa} crypto key generate rsa [usage-
[label key-pair-label] [default] keys | general-keys] [label
[noconfirm] key-pair-label] [modulus size]
[noconfirm]
Removes any previously generated RSA keys Generates an RSA key pair
ciscoasa(config)# ciscoasa(config)#
write memory ssh {ip_address mask |
Saves the CA state ipv6_address/prefix} interface
Specifies the host or network authorized to
initiate an SSH connection
ciscoasa(config)# ciscoasa(config)#
username: pix
password: telnetpassword
SSH
Internet
172.26.26.50
10.0.0.11
dir
Internet
192.168.0.0 10.0.0.3
ciscoasa#
dir [/all] [/recursive] [all-filesystems | [disk0: |
disk1: | flash: | system:] path]
Displays the directory contents
asa1# dir
Directory of disk0:/
4346 -rw- 8202240 15:01:10 Oct 19 2006 asa721-k8.bin
6349 -rw- 5539756 15:30:39 Oct 19 2006 asdm521.bin
7705 -rw- 3334 07:03:57 Oct 22 2006 old_running.cfg
62947328 bytes total (29495296 bytes free)
You can use the pwd command to display the current working directory.
Copying Files
10.0.0.11
copy
Internet
192.168.0.0
10.0.0.3
ciscoasa#
copy [/noconfirm | /pcap] {url | running-config |
startup-config} {running-config | startup-config | url}
Copies a file from one location to another
10.0.0.11
Internet
192.168.0.0 config
10.0.0.3
FTP server
ciscoasa#
copy ftp: startup-config
Copies the configuration file from an FTP server
ciscoasa
#
copy running-config ftp:
Copies the configuration file to an FTP server
Image Upgrade
Viewing Version Information
version?
10.0.0.11
Internet
10.0.0.3
ciscoasa#
show version
Displays the software version, hardware configuration, license key, and related uptime data
asa1# show version
10.0.0.11
Internet
TFTP
10.0.0.3
ciscoasa#
copy tftp://server[/path]/filename flash:/filename
Enables you to change software images without accessing the TFTP
monitor mode.
Outside Inside
Internet
ACL for ACL for
Inbound Access Outbound Access
No ACL
- Outbound permitted by default
- Inbound denied by default
Security appliance configuration philosophy is interface-based.
Interface ACL permits and denies the initial incoming and outgoing packets on that
interface.
An ACL must describe only the initial packet of the application; return traffic does not
need to be described.
If no ACL is attached to an interface:
The outbound packet is permitted by default.
The inbound packet is denied by default.
Inbound Traffic to DMZ Web Server
DMZ
Public Web
Server
Inbound
X Inside
192.168.1.0
Internet
.1 .2 10.0.1.0
Outside
DMZ
172.16.1.2 Public Web
Server
192.168.1.9 Inside
192.168.1.0
Internet
.1 .2 10.0.1.0
Outside
HTTP
192.168.1.9 Inside
192.168.1.0
Internet
.1 .2 10.0.1.0
ciscoasa(config)# Outside
access-list id [line line-number] [extended] {deny | permit} {protocol
| object-group protocol_obj_grp_id}{host sip | sip smask | interface
ifc_name | object-group network_obj_grp_id | any} [operator port
[port] | object-group service_obj_grp_id] {host dip | dip dmask |
interface ifc_name | object-group network_obj_grp_id | any}
[operator port [port] | object-group service_obj_grp_id | object-
group icmp_type_obj_group_id] [log [[level] [interval secs] |
disable | default]] [inactive | time-range time_range_name]
Inside
192.168.1.0
Internet
.1 .2 10.0.1.0
Outside
ciscoasa(config)#
access-group access-list {in | out} interface
interface_name [per-user-override]
Applies an ACL to an interface
ICMPDMZ
ACLOUT ACLIN
Internet
192.168.1.0
192.168.6.10
asa1(config)# show access-list
access-list cached ACL log flows: total 0, denied 0 (deny-flow-max 4096)
alert-interval 300
access-list ACLOUT; 4 elements
access-list ACLOUT line 1 extended permit tcp 192.168.6.0 255.255.255.0 host
192.168.1.11 eq www (hitcnt=4)0x984ebd70
access-list ACLOUT line 2 extended permit tcp host 192.168.6.10 host 192.168.1.11 eq
ftp (hitcnt=1) 0x53490ecd
access-list ACLOUT line 3 extended permit tcp any host 192.168.1.9 eq www (hitcnt=8)
0x83af39ca
access-list ACLOUT line 4 extended deny ip any any (hitcnt=4) 0x2ca30385
access-list ICMPDMZ; 1 elements
access-list ICMPDMZ line 1 extended permit icmp host bastionhost any echo-reply
clear access-list counters Command
Web Server
172.16.1.2
192.168.6.10
192.168.1.9
ACLIN
Internet ACLOUT
Internet
DMZ
172.16.1.2 Public Web
Server
Inbound
192.168.1.9 Inside
192.168.1.0
Internet
.1 .2 10.0.1.0
Outside
Outside Inside
Internet
ICMP Echo X
ICMP Unreachable
ciscoasa(config)#
icmp {permit | deny} {host sip | sip smask | any}
[icmp-type] if_name
Enables or disables pinging to an interface
Cisco Adaptive
Security Device
Manager
ASDM Overview and
Operating Requirements
What Is ASDM?
Internet
SSL Secure Tunnel
* ASDM Version 5.2 is not supported on the PIX 501 or 506 Security Appliance.
ASDM Security Appliance
Requirements
Windows
Sun Solaris
Linux
Running ASDM
Run ASDM as a:
Local
application
Java applet
Launch
Startup
Wizard
Configure the Security Appliance to
Use ASDM
Before you can use ASDM, you need to enter the following
information on the security appliance via a console terminal:
Time
Inside IP address
Inside network mask
Host name
Domain name
Enable the HTTP server on the security appliance
IP addresses of hosts authorized to access
HTTP server
If more than one ASDM image is stored in the flash memory of your security
appliance, also specify the ASDM image to be used.
Setup Dialog
Menu bar
Main toolbar
Device
Information Interface
General Status
License
VPN Status
Traffic
System
Status
Resources
Syslog
Messages
ASDM Home Window (Cont.)
License tab
Startup Wizard
Startup Wizard
Interfaces
NAT and PAT
Hostname
Domain name
Enable
password
VPN Wizard
VPN Wizard
Site-to-Site
Remote
Access
High Availability
and Scalability
Wizard
Active/Active
Failover
Active/Standby
Failover
VPN Cluster Load
Balancing
Configuration Window
Configuration
Interface
Security
Policy
NAT
VPN
IPS or
CSD
Manager
Routing
Global
Objects
Properties
Interfaces
IP address
– Static
– DHCP
Same security
level
Security Policy
Access
Rules
AAA
Rules
Filter
Rules
Service
Policy
Rules
NAT
Translation Rules
• NAT
• Policy NAT
• NAT
exemption
• Maximum
connections
• Embryonic
connections
NAT0
VPN
Edit VPN
General
IKE
IPsec
IP Address
Management
Load Balancing
NAC
WebVPN
E-Mail Proxy
Note: Use the Remote Access or Site-to-Site VPN Wizard for new VPN connections.
Routing
Static Routes
Dynamic Routing
– OSPF
– RIP
Multicast
– IGMP
– MRoute
– PIM
Proxy ARPs
Global Objects
Network Object
Groups
IP Names
Service Groups
Class Maps
Inspect Maps
Regular
Expressions
TCP Maps
Time Ranges
Monitoring Button
Interfaces
VPN
IPS or Trend
Micro
Content
Security
Routing
Properties
Logging
Interface Graphs Panel
Interface
Source IP
Destination IP
Source port
Destination port
Flow lookup
Route lookup
Access list
Options > Preferences
Options
Tools
Tools
Command Line
Interface
Packet Tracer
Ping
Traceroute
File
Management
Ugrade
Software
Upload ASDM
Assistant Guide
System Reload
ASDM Java
Console
Help
Help
Help Topics
Help for
Current
Screen
Release
Notes
Getting
Started
VPN 3000
Migration
Guide
Glossary
….
Online Help
Summary
<#>
FWSM Key Features
<#>
FWSM and PIX Firewall Feature
Comparison
<#>
Network Model
<#>
MSFC placement
<#>
Getting Started with the FWSM
<#>
Verify FWSM Installation
<#>
Configure the Switch VLANs
Create Vlan
<#>
Firewall VLAN-Group
Attaches the VLAN and firewall group to the slot where the FWSM is located
Configure the FWSM Interfaces
<#>
Configure a Default Route
• Default route
• Static routes are required in multiple context mode.
Configure the FWSM Access-List