Home > Articles > Cisco Network Technology > General Networking > Cisco Firewall Configuration Fundamentals

Cisco Firewall Configuration Fundamentals

  • Sample Chapter is provided courtesy of Cisco Press.
  • Date: Jul 8, 2011.

Chapter Description

This chapter describes the configuration fundamentals for IOS and ASA-based firewalls, highlighting the similarities between the product families.

From the Book

Cisco Firewalls

Cisco Firewalls

$69.99

Basic ASA Configuration

Before dealing with any specific configuration procedure for the Adaptive Security Appliance (ASA), you need to understand a set of basic concepts. Example 3-1 shows a summary of the boot process for an ASA 5505 appliance whose factory settings have not been changed yet. Following a successful load of the OS image, a prompt offering an interactive preconfiguration of the device using menus is presented. You do not need to analyze this option because it provides little flexibility.

The initial prompt after boot completion is ciscoasa>, in which ciscoasa is the default hostname for the equipment. The symbol > characterizes that the EXEC or nonprivileged mode is in place, meaning that a limited set of tasks can be accomplished.

The use of the question mark (?), as illustrated in Example 3-2, shows the available commands in a given CLI mode. Typing ? after a command, such as show ?, displays the supported parameters for this command. This CLI help is useful, quickly becoming part of everyday life for anyone who works with Cisco equipment.

Example 3-1. Summary Boot Sequence for ASA

Evaluating BIOS Options ...
Launch BIOS Extension to setup ROMMON
Cisco Systems ROMMON Version (1.0(12)6) #0: Mon Aug 21 19:34:06  PDT 2006
Platform ASA5505
Use BREAK or ESC to interrupt boot.
Use SPACE to begin boot immediately.
Launching BootLoader...
Boot configuration file contains 1 entry.
Loading disk0:/asa821-k8.bin... Booting...
Platform ASA5505
Loading...
[output suppressed]
This platform has an ASA 5505Security Plus license.
Encryption hardware device : Cisco ASA-5505 on-board accelerator (revision 0x0)
                               Boot microcode   : CN1000-MC-BOOT-2.00
                               SSL/IKE microcode: CNLite-MC-SSLm-PLUS-2.03
                               IPSec microcode  : CNlite-MC-IPSECm-MAIN-2.04
Cisco Adaptive Security Appliance Software Version 8.2(1)
[output suppressed]
Cryptochecksum (changed): d41d8cd9 8f00b204 e9800998 ecf8427e
Pre-configure Firewall now through interactive prompts [yes]? No

Type help or '?' for a list of available commands.
ciscoasa>

Example 3-2. Commands Available on ASA exec (Nonprivileged) Mode

! Displaying all the commands available on the EXEC mode with a "?"
ciscoasa> ?
  clear       Reset functions
  enable      Turn on privileged commands
  exit        Exit from the EXEC
  help        Interactive help for commands
  login       Log in as a particular user
  logout      Exit from the EXEC
  no          Negate a command or set its defaults
  ping        Send echo messages
  quit        Exit from the EXEC
  show        Show running system information
  traceroute  Trace route to destination
!
! Viewing available options for the show command (while on EXEC mode)
ciscoasa> show ?
  checksum   Display configuration information cryptochecksum
  curpriv    Display current privilege level
  disk0:     Display information about disk0: file system
  flash:     Display information about flash: file system
  history    Display the session command history
  inventory  Show all inventory information for all slots
  power      Power attributes
  version    Display system software version

Example 3-3 displays summary information obtained with the show version command. The data returned after its execution includes OS version and hardware components, licensed features, the serial number, and even the uptime since the last reboot.

The enable command with a BLANK password (for a device with no initial configuration) provides access to the privileged mode, recognized by the symbol # after the device hostname. This is illustrated in Example 3-4, which also shows the access to config mode through the configure terminal command. Some of the specific config modes (aaa, interface, ip, router, and so on) are included in the example.

Example 3-3. Sample show version Command for ASA

! Displaying basic information about device hardware and software
ciscoasa>show version
Cisco Adaptive Security Appliance Software Version 8.2(1)
Device Manager Version 6.2(1)
Compiled on Tue 05-May-09 22:45 by builders
System image file is "disk0:/asa821-k8.bin"
Config file at boot was "startup-config"
ciscoasa up 17 mins 10 secs
Hardware:   ASA5505, 256 MB RAM, CPU Geode 500 MHz
Internal ATA Compact Flash, 128MB
BIOS Flash M50FW080 @ 0xffe00000, 1024KB
[output suppressed]
Licensed features for this platform:
Maximum Physical Interfaces: 8
VLANs                        : 20, DMZ Unrestricted
Inside Hosts                 : Unlimited
Failover                     : Active/Standby
VPN-DES                      : Enabled
VPN-3DES-AES                 : Enabled
SSL VPN Peers                : 10
Total VPN Peers              : 25
Dual ISPs                    : Enabled
VLAN Trunk Ports             : 8
[output suppressed]
Total UC Proxy Sessions      : 2
Botnet Traffic Filter        : Disabled
This platform has an ASA 5505 Security Plus license.
Serial Number: JMX1144Z1AK
Running Activation Key: 0x62306449 0x981618fd 0x2cf05948 0xaf78e074 0x481dedb7
Configuration register is 0x1
Configuration has not been modified since last system restart.

Example 3-4. Moving to Privileged Mode and Viewing Configuration Options

! Moving from EXEC mode to privileged mode (ENABLE)
ciscoasa> enable
Password:
ciscoasa#
!
! Entering configuration (config) mode and displaying available options
ciscoasa# configure terminal
ciscoasa(config)# ?
     aaa                                  Enable, disable, or view user authentication,
authorization and accounting
     aaa-server                          Configure a AAA server group or a AAA server
     access-group                        Bind an access-list to an interface to filter
traffic
     access-list                         Configure an access control element
[output suppressed]
     interface                           Select an interface to configure
     ip                                   Configure IP addresses, address pools, IDS, etc
     ipsec                                Configure transform-set and IPSec SA lifetime
     ipv6                                 Global IPv6 configuration commands
[output suppressed]
     route                                Configure a static route for an interface
     route-map                           Create route-map or enter route-map configuration mode
     router                               Enable a routing process
     routing                              Configure interface specific unicast routing
parameters
     same-security-traffic              Enable same security level interfaces to communicate
[output suppressed]
     wccp                                 Web-Cache Coordination Protocol Commands
     webvpn                               Configure the WebVPN service
     zonelabs-integrity                 ZoneLabs integrity Firewall Server Configuration
ciscoasa(config)#

Example 3-5 illustrates the usage of some CLI output filters (all of them are case-sensitive), which constitutes a useful resource. The first sample uses the | begin filter and instructs the OS to start displaying the line of configuration (or show command) where the keyword being searched (snmp in this case) first appears.

The second exemplified filter uses the | include option, which determines that all lines of the command output that include a match for the searched string should be displayed.

The show running-configuration command displays the active configuration of the device and typically results in a large amount of data. More recent versions of ASA OS enable the output of this command to be broken in configuration blocks related to a specific topic. Example 3-5 illustrates how to employ this resource to restrict the output only to the commands related to timeout information.

Example 3-5. Using CLI Output Filters

! Establishing the point where the display should begin
ciscoasa# show running-config | begin snmp
no snmp-server location
no snmp-server contact
snmp-server enable traps snmp authentication linkup linkdown coldstart
crypto ipsec security-association lifetime seconds 28800
crypto ipsec security-association lifetime kilobytes 4608000
telnet timeout 5
!
! Searching for all matches of a certain string (case sensitive)
ciscoasa# show running-config | include icmp
icmp unreachable rate-limit 1 burst-size 1
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02
!
! Delimiting the section of the running configuration to be displayed
ciscoasa# show running-config timeout
timeout xlate 3:00:00
timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 icmp 0:00:02
timeout sunrpc 0:10:00 h323 0:05:00 h225 1:00:00 mgcp 0:05:00 mgcp-pat 0:05:00
timeout sip 0:30:00 sip_media 0:02:00 sip-invite 0:03:00 sip-disconnect 0:02:00
timeout sip-provisional-media 0:02:00 uauth 0:05:00 absolute
timeout tcp-proxy-reassembly 0:01:00

Basic Configuration for ASA Appliances Other Than 5505

Having powered up an ASA appliance and knowing the basics about command execution modes, it is time to examine some of the fundamental interface configuration tasks:

  • Enter interface configuration mode and enable the interface for transmitting and receiving traffic: This mode is indicated by the prompt (config-if)#. At this phase the no shutdown command needs to be issued to remove the interface from the administratively down state. If logical subinterfaces have been configured, the pertinent VLAN information (to match that of the switch to which the firewall connects to) should be added. You can also change the speed and duplex.
  • Assign a logical name to the interface: This is accomplished with the nameif command, and the configured name is used in any future reference to the interface. (It is typically easier to remember the logical meaning of an interface than the physical.)
  • Assign a security-level to the interface: To reflect the degree of trustworthiness of a given firewall interface, Cisco introduced in the early days of the PIX Firewalls the concept of Security Level. The value of the Security Level (or simply sec-lvl) ranges from 0 to 100, in which the highest possible value, 100, is used for the most trusted network under the firewall control, which is, by default, called inside. Conversely, the name outside is reserved for the less trusted network (frequently the connection to the Internet) and, by default, the value 0 is assigned to its sec-lvl.
  • Assign an IP Address to the interface: You can do this either through static or dynamic means using the ip address command.

Figure 3-1 shows the physical and logical reference topologies for the analysis of an ASA 5510 basic setup. Example 3-6 assembles the typical configuration commands, and Example 3-7 displays some commands to obtain information about the ASA interfaces.

Figure 3-1

Figure 3-1 Sample Topology Using an ASA 5510 Appliance

Example 3-6. Baseline ASA5510 Configuration

! Dedicated Management Interface
interface Management0/0
 nameif mgmt
 security-level 100
 ip address 192.168.1.11 255.255.255.0
 no management-only
 no shutdown
!
! Physical Interface
interface Ethernet0/1
 no nameif
 no security-level
 no ip address
 no shutdown
!
! Creating Subinterfaces on interface E0/1 (two logical networks)

   interface Ethernet0/1.1201
 
   vlan 1201
 nameif fw1
 security-level 50
 ip address 172.16.61.1 255.255.255.0
!
interface Ethernet0/1.1212
 
   vlan 1212
 description *** Direct Access to Services Segment ***
 nameif svcs
 security-level 99
 ip address 172.16.62.171 255.255.255.240

Example 3-7. Viewing Information About ASA Interfaces

! Viewing logical interfaces and correspondent security levels
ASA1# show nameif
Interface                Name                     Security
Ethernet0/1.1201         fw1                       50
Ethernet0/1.1212         svcs                      99
Management0/0            mgmt                     100
!
! Summary IP Addressing information for the interfaces in use
ASA1# show interface ip brief
Interface                  IP-Address      OK? Method Status                Protocol
Ethernet0/1                unassigned      YES unset  up                    up
Ethernet0/1.1201           172.16.61.1     YES CONFIG up                    up
Ethernet0/1.1212           172.16.62.171   YES CONFIG up                    up
Management0/0              192.168.1.11    YES CONFIG up                    up
!
! Displaying information about a physical interface
ASA1# show interface e0/1
Interface Ethernet0/1 "", is up, line protocol is up
  Hardware is i82546GB rev03, BW 1000 Mbps, DLY 10 usec
        Auto-Duplex(Full-duplex), Auto-Speed(1000 Mbps)
        Available but not configured via nameif
        MAC address 0014.6a21.b4ef, MTU not set
        IP address unassigned
        0 packets input, 0 bytes, 0 no buffer
        Received 0 broadcasts, 0 runts, 0 giants
        0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
        0 L2 decode drops
        2 packets output, 128 bytes, 0 underruns
        0 output errors, 0 collisions, 0 interface resets
        0 late collisions, 0 deferred
        0 input reset drops, 0 output reset drops, 0 tx hangs
        input queue (blocks free curr/low): hardware (255/255)
        output queue (blocks free curr/low): hardware (255/253)
!
! Displaying information about a subinterface
ASA1# show interface e0/1.1212
Interface Ethernet0/1.1212 "svcs", is up, line protocol is up
  Hardware is i82546GB rev03, BW 1000 Mbps, DLY 10 usec
        VLAN identifier 1212
        
   Description: *** Direct Access to Services Segment ***
        MAC address 0014.6a21.b4ef, MTU 1500
        IP address 172.16.62.171, subnet mask 255.255.255.240
  Traffic Statistics for "svcs":
        0 packets input, 0 bytes
        1 packets output, 28 bytes
        0 packets dropped
!
! Testing the reachability of local hosts with the ping command
ASA1# ping 172.16.61.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.61.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/1 ms

Basic Configuration for the ASA 5505 Appliance

The ASA 5505, the smallest available model at the time this book was written, comes with an embedded Ethernet switch and has some particularities regarding the initial setup. The other ASA models have only routed interfaces. The operational aspects that deserve special attention are discussed in this section.

Figure 3-2 shows a sample topology that serves as the base for exploring the ASA 5505 platform. Physical interfaces can be configured in either access or trunk mode, as registered in Example 3-8. (This is much like any Cisco Catalyst switch configuration.) Each VLAN allowed on the IEEE 802.1Q trunk must be explicitly defined at the physical interface level (switchport trunk allowed vlan command), and the correspondent logical attributes (nameif, sec-lvl, and so on) are configured under the associated Interface VLAN.

Figure 3-2

Figure 3-2 Sample Topology Using an ASA 5505 Appliance

Example 3-9 relates to Figure 3-2 and documents the commands employed to verify the existent VLANs and their assigned ports. The typical outputs of the show interface options (physical interface and interface vlan) are registered in this example, which also displays a changed hostname for the appliance (ASA 5505 instead of the default ciscoasa).

Example 3-8. Baseline ASA 5505 Configuration

! Physical Interface operating as an Access Port

   interface Ethernet0/5
 switchport access vlan 100
 no shutdown
!
! Physical Interface operating as a 802.1Q (Dot1Q) Trunk Port

   interface Ethernet0/3
 switchport trunk allowed vlan 100,201
 switchport mode trunk
 no shutdown
!
! Logical Interface associated with VLAN 100
interface Vlan100
 description *** Management Interface
 nameif mgmt
 security-level 100
 ip address 192.168.1.2 255.255.255.0
 no shutdown
!
! Logical Interface associated with VLAN 201
interface Vlan201
 description *** DMZ Network
 nameif dmz
 security-level 50
 ip address 172.16.201.2 255.255.255.0
 no shutdown

Example 3-9. Viewing Information About ASA 5505 Interfaces

! VLAN Assignment on ASA5505 internal switch (L2 information)
ASA5505# show switch vlan
VLAN Name                             Status    Ports
---- -------------------------------- --------- -----------------------------
1    -                                down      Et0/0, Et0/1, Et0/2, Et0/4
                                                Et0/6, Et0/7
100  mgmt                             up        Et0/3, Et0/5
201  dmz                              up        Et0/3
!
! Displaying information about a physical interface on ASA5505
ASA5505# show interface e0/5
Interface Ethernet0/5 "", is up, line protocol is up
  Hardware is 88E6095, BW 100 Mbps, DLY 100 usec
        Auto-Duplex(Full-duplex), Auto-Speed(100 Mbps)
        Available but not configured via nameif
        MAC address 001e.4a05.2005, MTU not set
        IP address unassigned
        30 packets input, 1920 bytes, 0 no buffer
        Received 30 broadcasts, 0 runts, 0 giants
        0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
        0 L2 decode drops
        0 switch ingress policy drops
        4 packets output, 256 bytes, 0 underruns
        0 output errors, 0 collisions, 0 interface resets
        0 late collisions, 0 deferred
        0 input reset drops, 0 output reset drops
        0 rate limit drops
        0 switch egress policy drops
!
! Displaying information about a VLAN interface on ASA5505
ASA5505# show interface vlan 201
Interface Vlan201 "dmz", is up, line protocol is up
  Hardware is EtherSVI, BW 100 Mbps, DLY 100 usec
        MAC address 001e.4a05.2008, MTU 1500
        IP address 172.16.201.2, subnet mask 255.255.255.0
  Traffic Statistics for "dmz":
        0 packets input, 0 bytes
        0 packets output, 0 bytes
        0 packets dropped
      1 minute input rate 0 pkts/sec,  0 bytes/sec
      1 minute output rate 0 pkts/sec,  0 bytes/sec
      1 minute drop rate, 0 pkts/sec
      5 minute input rate 0 pkts/sec,  0 bytes/sec
      5 minute output rate 0 pkts/sec,  0 bytes/sec
      5 minute drop rate, 0 pkts/sec
3. Basic FWSM Configuration | Next Section Previous Section

Cisco Press Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from Cisco Press and its family of brands. I can unsubscribe at any time.

Overview

Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about Cisco Press products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information

To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.

Surveys

Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites; develop new products and services; conduct educational research; and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.

Newsletters

If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@ciscopress.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information

Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.

Security

Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.

Children

This site is not directed to children under the age of 13.

Marketing

Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information

If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.

Choice/Opt-out

Users can always make an informed choice as to whether they should proceed with certain services offered by Cisco Press. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.ciscopress.com/u.aspx.

Sale of Personal Information

Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents

California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure

Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.

Links

This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact

Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice

We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020