What Is Cisco ASA Firewall
What Is Cisco ASA Firewall
Know
Written By Harris Andrea
The Cisco ASA was a replacement for the Cisco PIX firewall and is an
advanced firewall which is capable of carrying out more advanced services
than the older PIX firewall was capable of.
A stateful firewall keeps track of all the sessions that have been initiated
from user devices inside the network and allows the responding traffic from
outside the network to pass through to the initiating device.
Stateful packet inspection checks an access control list to see if the source
or destination IP address (and/or ports) of the incoming packet is allowed
access to the network or not.
The Cisco ASA has many physical interfaces which can be further divided
into “sub-interfaces” using VLANs.
This means that all traffic from the specific security zone going out to other
networks (zones) will pass through the ASA which will impose its firewall
controls to the traffic.
A Cisco ASA is able to carry out the following services in addition to the
core Stateful Packet Inspection functionality:
Packet filtering also known as Deep packet inspection goes much further
than simply matching IP addresses to an allowed list.
This enables much more complex rules to be created and instead of only
being able to block traffic based on source or destination IP addresses,
rules can now be created to block traffic based on the protocol being used
or to block a particular application.
NAT / PAT
This has a number of benefits. Firstly, the actual IP address of the sending
device is disguised because all the destination machine ever sees is the
public IP address that has been substituted at the firewall and not the
original private address.
The second benefit is that many devices can access the internet using the
single public IP address which saves on Public IP address use.
Port Address Translation (PAT) allows the firewall to assign each device
with a different port number which are mapped so that when the destination
server responds to the public IP address the firewall knows which internal
IP address originally sent the request and is able to forward on the packet.
The Virtual Private Network (VPN) tunnel protects all the traffic that is
flowing from external devices to the corporate network over the public
internet.
This allows remote users to securely access data from outside of the
corporate network using IPSec or SSL encryption protocols.
This allows for a cheap and secure connectivity solution between two or
more LAN networks without leasing expensive dedicated WAN links
between the two sites.
An ASA with Firepower is able to provide the standard firewall services and
also the enhanced security services of a Firepower device which makes
these ASA’s Next Generation Firewalls.
T Threat
TM Threat + Malware
The software can then be accessed from any device which has a web
browser by navigating to the URL of the SFMC.
Intrusion Prevention
A baseline is the normal amount of traffic that flows in and out of the
network from all the different network sources.
Content Filtering
This web filtering is very CPU intensive so its important to ensure an ASA
model with the correct hardware specifications are chosen for filtering traffic
on a large network.
Application Filtering
Anti-Malware (AMP)
The ASA filters the incoming traffic and checks for a match to known
malware signatures. If a match is found the traffic flow can be blocked
preventing the malware from spreading throughout the network. Anti-
malware filtering can be crucial in preventing the spread of ransomware.
Anti-Virus
Like the anti-malware process the traffic is filtered and matched against
known virus signatures and blocked before the virus is able to spread.
Security Intelligence
The Cisco ASA is able to use the power of the cybersecurity community to
better protect enterprise networks. The ASA is able to prevent outgoing
connections to a blacklist of known malicious domains that is constantly
updated from the intelligence gathered by Cisco Talos.
The standard ASA without Firepower services has now become end of sale
and the ASA is now sold with Firepower installed as standard. The X in the
model’s name denotes that this model has a Firepower Module installed.
Palo Alto
Palo Alto next generation firewalls provide similar features to Cisco ASA
firewalls through their PAN-OS operating system.
The Palo Alto firewalls, and firewall clusters can be managed by their
Firewall management system known as Panorama.
Fortinet
Fortinet has a very large range of firewall models aimed at every size
network from entry level to cloud datacentres. These firewalls run the
Fortigate operating system.
Fortinet is one of the fast-growing security firms worldwide and they
manufacture all kinds of security products, such as firewalls, antivirus,
email security, SIEM, WiFi etc.
Checkpoint
In this Video Tutorial I will show you how to enable initial access to the ASA
device in order to connect with ASDM graphical interface or with SSH.
I know the above task in pretty basic but I hope it will help a few people that
are just starting out with ASA firewalls.
Below is the CLI configuration used in this initial setup (see video
below also for more information):
ciscoasa# sh run
: Saved
:
ASA Version 8.4(2)
!
hostname ciscoasa
! Configure an “enable password” which is the administrator password of
the device
enable password 2KFQnbNIdI.2KYOU encrypted
passwd 2KFQnbNIdI.2KYOU encrypted
names
!
interface GigabitEthernet0
shutdown
no nameif
no security-level
no ip address
!
interface GigabitEthernet1
shutdown
no nameif
no security-level
no ip address
!
interface GigabitEthernet2
shutdown
no nameif
no security-level
no ip address
!
interface GigabitEthernet3
shutdown
no nameif
no security-level
no ip address
!
interface GigabitEthernet4
shutdown
no nameif
no security-level
no ip address
!
! Configure IP address to Interface GigEth5 and put a high security level
(90 is good).
! name also the interface as “management”
interface GigabitEthernet5
nameif management
security-level 90
ip address 10.10.10.1 255.255.255.0
!
ftp mode passive
pager lines 24
mtu management 1500
icmp unreachable rate-limit 1 burst-size 1
NOTE:
The video shows also how to enable SSH access to the device, how to
restrict access to a management network etc.
I know the above task in pretty basic but I hope it will help a few people that
are just starting out with ASA firewalls.
ASA1
ASA2
MORE READING: Cisco ASA 5505 Basic Configuration Tutorial Step by Step
Next, we will configure the ISAKMP policies with IKEv2. We will first use
the crypto ikev2 policy command to enter IKEv2 policy configuration mode,
where we will configure the IKEv2 parameters.
ASA1
ASA2
For this scenario, we will first enter ipsec proposal configuration mode and
there set the parameters.
ASA1
ASA2
Next we need to identify the VPN interesting traffic with an access list.
The name of the tunnel is the IP address of the peer. IKEv2 preshared key
is configured as 32fjsk0392fg.
NOTE: For ikev2 you can have asymmetric pre-shared keys. You can
configure a different local and different remote pre-shared key. If you want
to have a configuration similar with the legacy ikev1 technology, you need
to have the same local and remote pre-shared keys (as we do in our
example below)
ASA1
ASA2
ASA1
ASA2
This requirement (i.e internet access for users in each site) necessitates
the configuration of NAT rules in order to translate the internal private IP
addresses to a public IP. Let’s configure this new requirement below:
IPSEC VPN traffic does not work with NAT. You must not perform NAT on
VPN packets. Therefore, in addition to configuring Internet access (with
using NAT overload in our example here), we must also configure NAT
exclusion for VPN traffic:
ASA1
object network HQ
subnet 192.168.1.0 255.255.255.0
nat (inside,outside) dynamic interface
object network Branch1
subnet 192.168.2.0 255.255.255.0
ASA2
object network HQ
subnet 192.168.1.0 255.255.255.0
ASA1
ASA2
Of course, legacy IKEv1 is still supported and is widely used in almost all
VPN configurations up to now.
In this article I will show the differences between the commands used in
ASA versions prior to 8.4(1) with commands used in versions 8.4(1) and
later.
Let’s start with a basic IPSEC Lan-to-Lan VPN configuration for ASA
versions prior to 8.4(1). Note that the following are just a part of the
commands required for successful Lan-to-Lan VPN.
The following are the commands which have some differences with the
commands used in version 8.4(1) and later.
Now let’s see how the IPSEC Lan-to-Lan VPN commands are changed in
ASA version 8.4(1) and later. In red color you see the commands which are
changed:
Cisco ASA Configuration for ASDM Management Access
Play Video
The Table below shows a site by site comparison of commands for even
older ASA versions. The leftmost column shows commands for ASA
versions lower than 7.2(1). The middle column shows the commands in
versions higher than 7.2(1) and lower than 8.4(1). The right column shows
the commands from 8.4(1) and higher.
Table with Cisco ASA versions and command differences regarding Site-to-
Site IPSEC VPN commands:
ASA version < 7.2(1) 7.2(1)<ASA version<8.4(1) ASA version > 8.4(1)
isakmp policy [policy #] crypto isakmp policy [policy crypto ikev1 policy
#] [policy #]
isakmp enable crypto isakmp enable crypto ikev1 enable
set transform-set
xxxxxxx xxxxxxx
With the new modular policy framework (MPF) introduced in ASA versions
7.x and 8.x, the firewall administrator is now able to apply policing and rate
limiting to traffic passing through the ASA appliance.
I got a few questions from people how this functionality works and decided
to throw in a quick example below which you can easily modify accordingly
to match your needs.
Scenario 1:
Configuration Snippet:
ASA(config)#class-map rate-limit
ASA(config-cmap)#match access-list rate-limit-acl
ASA(config)#policy-map limit-policy
ASA(config-pmap)#class rate-limit
ASA(config-pmap-c)#police output 100000 8000
Scenario 2:
Configuration Snippet:
ASA(config)#class-map rate-limit
ASA(config-cmap)#match access-list rate-limit-host
ASA(config)#policy-map limit-policy
ASA(config-pmap)#class rate-limit
ASA(config-pmap-c)#police output 5000000 8000
ASA(config-pmap-c)#police input 5000000 8000
In this article I will show you how to deny access to specific websites
(domain names) with a normal Cisco ASA firewall.
This works on either the older 5500 models or the new 5500-X series
devices. The only pre-requisite for the firewall is to run software version
8.4.2 and later. Also, you don’t need to have any next generation firewall
features or special licenses installed.
Although the ASA can provide a simple solution for restricting web access
to specific websites, you should know that it is NOT a replacement for a
full-featured URL filtering solution.
The first method (regex with MPF) works well with HTTP websites but it will
not work at all if the website uses HTTPs.
The second method (blocking the IP with ACL) will work only for simple
websites which have a static IP but it will be difficult to work for dynamic
websites (such as Facebook, Twitter etc) which have many different IP
addresses which change all the time.
MORE READING: DNS Doctoring - Access Internal WebSite using its public
URL
The third method (using FQDN in an ACL) is the one which we will describe
here.
From ASA version 8.4(2) and later, Access Control Lists (ACL) can contain
an object which represents a Fully Qualified Domain Name (FQDN).
So, inside an ACL you can allow or deny access to hosts using their FQDN
name instead of their IP address. You can therefore deny access to
website www.facebook.com by denying access to FQDN object
“www.facebook.com” inside the ACL.
The ASA will need to resolve all possible IP addresses of the FQDN and
will dynamically insert several “deny IP” entries for these IP addresses in
the ACL. Therefore you must specify what DNS server the ASA can use in
order to resolve IP addresses for the FQDNs.
The method above does not slow down the firewall since the device will do
the DNS lookup for the website you want to block beforehand and store all
resolved IP addresses of the website in memory.
Depending on the TTL of the DNS lookup, the firewall will keep doing DNS
requests for the specific domain name (every few hours for example) and
update the resolved IPs in memory.
Let’s now see the required configuration on the ASA to achieve the above
scenario:
Cisco ASA Configuration for ASDM Management Access
Play Video
domain-name mycompany.com
interface GigabitEthernet0
nameif outside
security-level 0
ip address 20.20.20.2 255.255.255.0
interface GigabitEthernet1
nameif inside
security-level 100
ip address 192.168.1.1
!Create FQDN objects for website we want to block. Block both the
www and non-www domains
object network obj-www.website.com
fqdn www.website.com
!Add the FQDN objects above to an ACL applied inbound to the inside
interface
access-list INSIDE-IN extended deny ip any object obj-
www.website.com
access-list INSIDE-IN extended deny ip any object obj-website.com
access-list INSIDE-IN extended permit ip any any
In this post we will discuss DNS Doctoring on Cisco ASA firewalls. This is a
useful feature and although it’s very simple to configure, not many people
know about it.
Let’s discuss the scenario above in more detail and explain how DNS
Doctoring can help internal users to access the DMZ website using its
public URL domain.
Therefore, the webserver (and hence the Website) is visible on the Internet
as 50.1.1.10.
This means that the public DNS server (usually the DNS of your ISP) will
have an entry for domain www.mywebsite.com pointing to its public
IP 50.1.1.10
Now, what happens when a user connected to the Internal LAN tries to
access the company’s website using its official domain name URL?
As shown on the diagram above, at Step 1 the client will perform a DNS
Request to the public DNS server in order to resolve the IP address of
domain www.mycompany.com.
At Step 2, the DNS Server will respond with the public IP of the website
(50.1.1.10).
At Step 3, the client will send an HTTP GET request to IP 50.1.1.10 trying
to access the website. However, the ASA will block this network connection
because the client is connected to the Internal LAN and can only access
the private IP of the webserver (10.1.1.10) and not the public (the ASA
does not allow packet redirection on the same interface).
At Step 2, the DNS Server will respond with the public IP of the website
(50.1.1.10). However, the ASA will inspect the DNS Response and check
it’s NAT table to see if it has an entry for this specific IP address. If it does,
it will re-write the response with the “real” (private) IP address (10.1.1.10)
before sending to the client.
policy-map global_policy
class inspection_default
inspect dns preset_dns_map
Denial of Service attacks (DoS) are very common these days. Especially
Distributed DoS attacks (called also DDoS) can be executed quite easily by
attackers who own large networks of BotNets.
A DDoS attack can be purely “volumetric”, which means that the attacker
just sends high volume of packets as quickly as possible to flood the
bandwidth of the “pipe” connecting the website to the Internet.
A Cisco ASA Firewall can not help much in a “volumetric” DDoS attack. In
such an attack, a dedicated DDoS device is needed or your ISP must do
some kind of rate limiting to mitigate the attack.
MORE READING: Adding more Interfaces to Cisco ASA Firewalls with 4GE
SSM
With the ASA HTTP inspection feature you can match on this common
pattern in the HTTP packet thus filter-out the attacking packets and drop
them.
The string “xyz123” was the common pattern for all malicious HTTP
requests. Thus with a policy on ASA you can match on the unique string
above and drop the packets that have this string in the HTTP URI.
!Create an ACL to match the HTTP traffic towards the target server
access-list HTTPTRAFFIC extended permit tcp any host 1.1.1.1 eq
www
!The following policy-map will include the L3/L4 class which will include the
HTTP inspection policy
policy-map BLOCKDOS
class attackingtraffic
inspect http HTTPDOS
!Now attach the policy-map to the ASA outside interface to inspect Inbound
traffic.
service-policy BLOCKDOS interface outside
Step2: Power cycle the appliance (power off and then on)
The ASA firewall will display the current configuration register value and
boot parameters and ask you if you want to change them
Configuration Summary:
Step7: Accept the default values for all settings (at the prompt enter Y)
The firewall will reboot and load the default configuration instead of the
startup configuration.
hostname> enable
When prompted for the password, press Enter (the password in blank
now)
Step 10: Access the global configuration mode and change the passwords
as required:
Step 11: Load the default configuration register value (0x1) by entering the
following command:
hostname(config)# no config-register
Step 12: Save the new passwords to the startup configuration by entering
the following command:
The above works for all ASA models such as 5505, 5510, 5520 etc
10 Maximum VPN Sessions (site-to-site and remote 25 Maximum VPN Sessions (site-to-site and remote
access) access)
3 Maximum VLANs (Trunking Disabled)(2 regular zones 20 Maximum VLANs (Trunking enabled)(No restrictions
and 1 restricted zone that can only communicate with 1 of traffic flow between zones)
other zone)
No Security Contexts (Virtual Firewalls) Supports 2 Virtual Firewalls (included) and 5 maximum.
No Support for VPN Clustering and VPN Supports VPN Clustering and VPN Load Balancing
Load Balancing
10 users,
50 users and
UL (unrestricted license).
So, for 10 user license, only 10 concurrent internal hosts (IP addresses)
can access the internet. The same applies for 50 users (only 50 concurrent
IP addresses can access the Internet).
For a 10-user license, the max number of DHCP clients on the internal
network is 32. For 50-user license, the max number of DHCP clients is 128.
The official explanation from Cisco regarding the Cisco ASA5505 user
licensing is as follows:
“In routed mode, hosts on the inside (Business and Home VLANs) count
towards the limit only when they communicate with the outside (Internet
VLAN).
Internet hosts are not counted towards the limit. Hosts that initiate traffic
between Business and Home are also not counted towards the limit.
The terms “Business” and “Home” VLANs above refer to the Internal and
DMZ network zones.
However, if you need to create a DMZ zone (in addition to your Inside and
Outside zones) in order to install a publicly accessible server (e.g WEB
server, MAIL server etc), then the default basic license won’t work for you.
The basic license does not allow more than 2 security zones. You will need
to upgrade to “Security Plus” license which also enhances some other
firewall parameters (more firewall connections, more remote access VPN
sessions, trunking with 20 VLANs).
Includes: 10 users, 8-port Fast Ethernet switch with 2 Power over Ethernet
ports, 10 IPsec VPN peers, 2 SSL VPN peers, Triple Data Encryption
Standard/Advanced Encryption Standard (3DES/AES) license.
Includes: 50 users, 8-port Fast Ethernet switch with 2 Power over Ethernet
ports, 10 IPsec VPN peers, 2 SSL VPN peers, 3DES/AES license.
Includes: Unlimited users, 8-port Fast Ethernet switch with 2 Power over
Ethernet ports, 10 IPsec VPN peers, 2 SSL VPN peers, 3DES/AES license.
Cisco ASA 5505 Security Plus Firewall Edition Bundle
Includes: Unlimited users, 8-port Fast Ethernet switch with 2 Power over
Ethernet ports, 25 IPsec VPN peers, 2 SSL VPN peers, DMZ support,
Stateless Active/Standby high availability, Dual ISP support, 3DES/AES
license.
Each group is a Layer 2 Vlan. Devices in the same group (Vlan) can
communicate directly between them without passing through the security
control of the firewall.
On the other hand, devices between different Vlans can only communicate
with each other by passing the traffic through the adaptive security
appliance where relevant security policies are applied.
By default, there are two Vlans (VLAN1 and VLAN2) preconfigured on the
firewall by default. Port Ethernet0/0 belongs to VLAN2 and ports
Ethernet0/1 to 0/7 belong to VLAN1.
The license installed on the 5505 firewall determines the number of active
VLANs allowed on the appliance as described below:
The basic license allows only 3 active VLANs which you can use as
Inside, Outside and DMZ. However, there is a restriction here that many
people do not know about: The DMZ VLAN can access ONLY the Outside
VLAN but can not access the Inside VLAN. The other two VLANs (Inside
and Outside) can access all the other VLANs with no problems.
To apply this new license key in your security appliance, configure the
following: