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

Cisco Firewall Configuration Fundamentals

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


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
[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.

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
! 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
     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
     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

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
 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
interface Ethernet0/1.1212
   vlan 1212
 description *** Direct Access to Services Segment ***
 nameif svcs
 security-level 99
 ip address

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      YES CONFIG up                    up
Ethernet0/1.1212    YES CONFIG up                    up
Management0/0        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, subnet mask
  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
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to, 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
 no shutdown
! Logical Interface associated with VLAN 201
interface Vlan201
 description *** DMZ Network
 nameif dmz
 security-level 50
 ip address
 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, subnet mask
  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