Tuesday, July 20, 2010

Cisco ASA 5500 Series Adaptive Security Appliance Hardware Installation Guide


 Figure 1-1 Front Panel LEDs


LED

Color

State

Description

1

Power

Green

On

The system has power.

2

Status

Green

Flashing

The power-up diagnostics are running or the system is booting.

Solid

The system has passed power-up diagnostics.

Amber

Solid

The power-up diagnostics have failed.

3

Active

Green

Flashing

There is network activity.

4

VPN

Green

Solid

VPN tunnel is established.

5

Flash

Green

Solid

The CompactFlash is being accessed.



Figure 1-2 shows the rear panel.

Figure 1-2 Rear Panel LEDs and Ports (AC Power Supply Model Shown)


1

Management port1

6

USB 2.0 interfaces2

11

VPN LED

2

External CompactFlash slot

7

Network interfaces3

12

Flash LED

3

Serial Console port

8

Power indicator LED

13

AUX port

4

Power switch

9

Status indicator LED

14

Power connector

5

Power indicator LED

10

Active LED

1 The management 0/0 interface is a Fast Ethernet interface designed for management traffic only.

2 Not supported at this time.

3 GigabitEthernet interfaces, from right to left, GigabitEthernet 0/0, GigabitEthernet 0/1, GigabitEthernet 0/2, and GigabitEthernet 0/3.



For more information about the Management port, see themanagement only command in the Cisco Security Appliance Command Reference.

The Cisco ASA 5550 has a fixed configuration with an embedded 4GE slot as shown in Figure 1-3.

Figure 1-3 Rear Panel LEDs and Ports for the Cisco ASA 5550



1

RJ-45 ports1

9

USB 2.0 interfaces2

17

AUX port

2

RJ-45 Link LED

10

Management port3

18

External CompactFlash slot

3

RJ-45 Speed LED

11

Network interfaces4

19

Serial Console port

4

Power LED

12

Power indicator LED

20

Power switch

5

Status LED

13

Status indicator LED

21

Power indicator LED

6

SFP ports5

14

Active LED

22

Power connector

7

SFP Link LED

15

VPN LED

8

SFP Speed LED

16

Flash LED

1 GigabitEthernet ports, from right to left, GigabitEthernet 0/0, GigabitEthernet 1/0, GigabitEthernet 1/2, and GigabitEthernet 1/3

2 Not supported at this time.

3 The management 0/0 interface is a Fast Ethernet interface designed for management traffic only.

4 GigabitEthernet interfaces, from right to left, GigabitEthernet 0/0, GigabitEthernet 0/1, GigabitEthernet 0/2, and GigabitEthernet 0/3.

5 SFP ports, from right to left, GigabitEthernet 1/0, GigabitEthernet 1/1, GigabitEthernet 1/2, and GigabitEthernet 1/3



Table 1-1 4GE SSM LEDs  for the Cisco ASA 5550

LED

Color

State

Description

2, 7

LINK

Green

Solid

Flashing

There is an Ethernet link.

There is Ethernet activity.

3, 8

SPEED

Off

Green

Amber

10 MB

100 MB

1000 MB (GigE)

There is no network activity.

There is network activity at 100 Mbps.

There is network activity at 1000 Mbps.

4

POWER

Green

On

The system has power.

5

STATUS

Green

Green

Amber

Flashing

Solid

Solid

The system is booting.

The system booted correctly.

The system diagnostics failed.


Table 1-1 describes the 4GE SSM LEDs.

Figure 1-4 shows the adaptive security appliance rear panel LEDs.

Figure 1-4 Rear Panel Link and Speed Indicator LEDs



1

MGMT indicator LEDs

2

Network interface LEDs



Table 1-2 lists the rear MGMT and Network interface LEDs.

Table 1-2 Link and Speed LEDs

Indicator

Color

Description

Left side

Solid green

Green flashing

Physical link

Network activity

Right side

Not lit

Green

Amber

10 Mbps

100 Mbps

1000 Mbps




Note The Cisco ASA 5510 adaptive security appliance supports only 10/100BaseTX. The Cisco ASA 5520 and the Cisco ASA 5540 support 1000BaseT.


Memory Requirements


Table 1-3 lists the CPU and the memory specifications for each model.

Table 1-3 CPU and Memory Specifications

ASA Model

CPU

Default DRAM Memory

Default Internal Flash Memory

Cisco ASA 5510

1.6 GHz Celeron

256 MB

512MB

Cisco ASA 5520

2.0 GHz Celeron

512 MB

512MB

Cisco ASA 5540

2.0 GHz Pentium 4

1024 MB

512MB

Cisco ASA 5550

3.0 GHz Pentium 4

4096 MB

512MB



In a failover configuration, the two units must have the same hardware configuration. They must be the same model, have the same number and types of interfaces, and the same amount of RAM.


Note The two units do not have to have the same size Flash memory. If using units with different Flash memory sizes in your failover configuration, make sure the unit with the smaller Flash memory has enough space to accommodate the software image files and the configuration files. If it does not, configuration synchronization from the unit with the larger Flash memory to the unit with the smaller Flash memory will fail.


Reference:
Cisco ASA 5500 Series Adaptive Security Appliance Hardware Installation Guide
http://www.cisco.com/en/US/docs/security/asa/hw/maintenance/guide/overview.html
http://www-europe.cisco.com/en/US/docs/security/asa/hw/maintenance/guide/overview.html

Install and Upgrade Guides
http://www.cisco.com/en/US/products/ps6120/prod_installation_guides_list.html

PIX/ASA: SSH/Telnet Configuration Example


Network Diagram

This document uses this network setup:
ssh-inside-out-pix7x-1.gif 


SSH Access to the Security Appliance

Complete these steps in order to configure SSH access to the security appliance:

  1. SSH sessions always require a username and password for authentication. There are two ways to meet this requirement.
    Configure a username and password and use AAA:
    Syntax :


    pix(config)#username username password password
    pix(config)#aaa authentication {telnet | ssh | http | serial} console {LOCAL | 
    server_group [LOCAL]}
    Note: If you use a TACACS+ or RADIUS server group for authentication, you can configure the security appliance to use the local database as a fallback method if the AAA server is unavailable. Specify the server group name and then LOCAL (LOCAL is case sensitive). We recommend that you use the same username and password in the local database as the AAA server, because the security appliance prompt does not give any indication which method is used.
    Note: Example :


    pix(config)#aaa authentication ssh console TACACS+ LOCAL
    Note: You can alternatively use the local database as your main method of authentication with no fallback. In order to do this, enter LOCAL alone.
    Example :


    pix(config)#aaa authentication ssh console LOCAL
    OR
    Use the default username of pix and the default Telnet password of cisco. You can change the Telnet password with this command:


    pix(config)#passwd password
    Note: The password command can also be used in this situation. Both commands do the same thing.
  2. Generate an RSA key pair for the PIX Firewall, which is required for SSH:


    pix(config)#crypto key generate rsa modulus modulus_size
    Note: The modulus_size (in bits) can be 512, 768, 1024, or 2048. The larger the key modulus size you specify, the longer it takes to generate the RSA key pair. The value of 1024 is recommended.
    Note: The command used to generate an RSA key pair is different for PIX software versions earlier than 7.x. In earlier versions, a domain name must be set before you can create keys.
    Note: In multiple context mode, you must generate the RSA keys for every contexts. In addition, crypto commands are not supported in system context mode.
  3. Specify the hosts allowed to connect to the security appliance.
    This command specifies the source address, netmask and interface of the host(s) allowed to connect with SSH. It can be entered multiple times for multiple hosts, networks, or interfaces. In this example, one host on the inside and one host on the outside are permitted.


    pix(config)#ssh 172.16.1.1 255.255.255.255 inside
    pix(config)#ssh 10.1.1.2 255.255.255.255 outside
  4. Optional: By default, the security appliance allows both SSH version 1 and version 2. Enter this command in order to restrict connections to a specific version:


    pix(config)# ssh version 
    Note: The version_number can be 1 or 2.
  5. Optional: By default, SSH sessions are closed after five minutes of inactivity. This timeout can be configured to last for between 1 and 60 minutes.


    pix(config)#ssh timeout minutes
Reference:
http://www.cisco.com/en/US/products/hw/vpndevc/ps2030/products_configuration_example09186a008069bf1b.shtml

Monday, July 19, 2010

PIX/ASA as a DHCP Server and Client Configuration Example

pixfirewall#show running-config 
PIX Version 7.1(1)
!
hostname pixfirewall
domain-name default.domain.invalid
enable password 8Ry2YjIyt7RRXU24 encrypted
names
!
interface Ethernet0
 nameif outside
 security-level 0


!--- Configures the Security Appliance interface as a DHCP client.
!--- The setroute keyword causes the Security Appliance to set the default 
!--- route using the default gateway the DHCP server returns. 

 ip address dhcp setroute

!
interface Ethernet1
 nameif inside
 security-level 100
 ip address 10.0.0.14 255.0.0.0


!--- Output is suppressed. 
Reference: 


http://www.cisco.com/en/US/products/hw/vpndevc/ps2030/products_configuration_example09186a00806c1cd5.shtml

Cisco PIX Firewall Basics

Introduction

This month we start a series of articles on security. And where better to start than by taking a look at what the Cisco PIX can do, and how to configure it?
The online reference materials for configuring Cisco PIX Firewall Version 6.1 can be found at:http://www.cisco.com/univercd/cc/td/doc/product/iaabu/pix/pix_61/index.htm . I recommend you look there for the details we had to omit in this article. It is always a good idea to check the Release Notes, especially for open caveats (bugs) that may affect an advanced PIX implementation.
Another good source of information about the Cisco PIX is the Cisco CSPFA course. This is a security-certification track course. See http://www.cisco.com/pcgi-bin/front.x/wwtraining/CELC/index.cgi?action=CourseDesc&COURSE_ID=1628.

What Does a PIX Do?

The PIX is a firewall appliance based on a hardened, specially built operating system, PIX OS, minimizing possible OS-specific security holes. The PIX has received ICSA Firewall and IPsec certification as well as Common Criteria EAL4 evaluation status.
PIX firewalls provide a wide range of security and networking services including:
  • Network Address Translation (NAT) or Port Address Translation (PAT)
  • content filtering (Java/ActiveX)
  • URL filtering
  • IPsec VPN
  • support for leading X.509 PKI solutions
  • DHCP client/server
  • PPPoE support
  • advanced security services for multimedia applications and protocols including Voice over IP (VoIP), H.323, SIP, Skinny and Microsoft NetMeeting
  • AAA (RADIUS/TACACS+) integration
PIX can be graphically managed using the integrated Web-based management interface known as the PIX Device Manager (PDM) or by the Cisco Secure Policy Manager 2.3f and 3.0f (not to be confused with CSPM 2.3.3i which is for intrusion detection system management).  The PDM is a PIX-specific device configuration and management tool whereas CSPM is generally used as part of a larger security management infrastructure and allows one to correlate organizational security policies with a PIX configuration. Management interfaces include command-line interface (CLI), telnet, Secure Shell (SSH 1.5), console port, SNMP, and syslog.

Cisco PIX Models

Cisco PIX
Model
Rated 
Throughput
Concurrent
Connections
Description
PIX 5351 Gbps + 
Up to 95 Mbps 3DES VPN, 2000 IPsec tunnels
500,000Some models include stateful high-availability capabilities, as well as integrated hardware acceleration for VPN. Modular chassis, up to 10 10/100 Fast Ethernet interfaces or 9 Gigabit Ethernet interfaces.
PIX 525360 Mbps + 
Up to 70 Mbps 3DES VPN, 2000 IPsec tunnels
280,000Some models include stateful high-availability capabilities, as well as integrated hardware acceleration for VPN. Modular chassis, up to 8 10/100 Fast Ethernet interfaces or 3 Gigabit Ethernet interfaces. 
PIX 515E188 Mbps +125,000Some models include stateful high-availability capabilities and integrate support for 2,000 IPsec tunnels. Modular chassis, up to six 10/100 Fast Ethernet interfaces. 
PIX 506E20 Mbps +, 
16 Mbps 3DES VPN
Compact desktop chassis, two auto-sensing 10Base-T interfaces.
PIX 50110 Mbps +, 
3 Mbps 3DES VPN
Compact plug-n-play security appliance,  integrated 4-port Fast Ethernet (10/100) switch and one 10Base-T interface. 
See http://www.cisco.com/warp/customer/cc/pd/fw/sqfw500/   for information about the PIX product line in general, or for more details or the latest models added to this product line.

PIX Terminology and Background Information

The following diagram shows a multi-port PIX connected to various networks. We will use this diagram as we build up a PIX configuration in this and any subsequent PIX articles.
PIX terminology: we generally refer to the user segment as the Inside subnet. The interface connected to the Internet router is the outside subnet. As shown, we probably have DMZ (De-Militarized Zone) subnet, the subnet where we quarantine all servers that are accessible from the outside. We might also have a separate management subnet and a subnet tying to a redundant PIX for failover (if supported/licensed).
The PIX Command-Line Interface (CLI) is somewhat like the Cisco IOS interface, but different. Use colon (":") for comments (which, as usual, are not retained).  Newer PIX OS uses ACL's, replacing the former conduits (which were arguably more confusing to experienced Cisco router administrators).
PIX interfaces are normally shutdown until the administrator activates them.
PIX interfaces have an associated security level. Two interfaces at same level can't send packets to each other. We'll shortly see that you set levels with nameif command. Connections and traffic are normally permitted from higher to lower security level interfaces, although you do have to put in some basic configuration to allow traffic to flow. Connections the other way (from low to high security) are disallowed unless the configuration explicitly permits them.
You actually do not have to put any ACL if going from a higher security level to a lower. Everything will be allowed. Best practice is to put an ACL on all interfaces even if the ACL permits everything to flow using "ip any any".  An ACL put inbound (PIX only does inbound ACLs) to the inside interface can control traffic destined going outbound. If an admin wants to only have www and dns traffic outbound he would allow only tcp on 80 and udp on 53 then everything else like real audio would be denied as it goes out.)
To let traffic flow from a high security level to a lower level, use the nat and global commands. For the opposite direction, from lower to higher, use the static and access-list commands. We suggest using nat and global when going from any non-outside interface to the outside interface (Internet usually unless the PIX is used as a border between business units) which is a little different than the first sentence above.  We also suggest using statics from any non-outside interface to any other non-outside interface (like inside to management or ethernet3 to ethernet4, below.)
The PIX normally uses stateful NAT connections and stateful security, referred to as the Adaptive Security Algorithm (ASA). The PIX does not pass multicast traffic. (Can you say "DVMRP tunnel"?)
Cisco and we recommend you do not dynamic routing to or through the PIX. The PIX does support RIP, but the authors both loathe RIP. And static routing is more secure, cannot be as easily fooled.

PIX Configuration

We'll start off with good housekeeping. Enter configuration mode with "config t". You'll want to assign a hostname / prompt name so you can tell which device you're on. You'll also want to set up passwords.
 



Command
Command Explanation
enable passwordmyEnableSecretencrypted
Set the enable password (displays encrypted). Displays in encrypted form, with the word "encrypted" at the end. Note that when entering the command leave off  "encrypted" keyword or the PIX will assume that the string you are putting in is the encryption of the actual password. 
passwdmyLoginSecretencrypted
Set the user mode password, the first password challenge when using Telnet.  Note that when executing the command leave off the "encrypted" keyword or the PIX will assume that the string you are putting in is the encryption of the actual password.
hostname UNIT1
Set the name of the host. It is best to make this name innocuous so that it does not give away the type of device this is. 


The PIX does allow you to set up a hosts table as a management convenience. Because there is no connection to DNS or /etc/hosts on UNIX servers, use of this command is a mixed blessing. It makes configurations much more readable but introduces another level of administration. Not only do you have to add and delete IP addresses to your configuration as you do now. But with this command, you also need to ensure that the host names match existing names.




Command
Command Explanation
name 10.3.3.22 DMZWEBSERVER
Map address to name
name 10.1.1.82 INTERNALDNSHOST

name 10.1.1.79 INTERNALORACLEHOST

name 10.1.1.71 INTERNALNTPHOST

name 1.1.1.5 EXTERNALSMTPHOST

name 1.1.1.22 EXTERNALWWWHOSTNAME


To start adjusting the default PIX configuration, one usually names the interfaces and assigns them security levels. (0 = least trusted; 100 = most trusted). We then specify the speed for each interface, carefully leaving off the default shutdownkeyword at the end to activate (enable) the interface. We do this for each interface we're going to use. We have one extra unused interface which we shutdown.
We also need to assign IP addresses to the interfaces that will be carrying IP traffic. One trick you can use on a shutdown interface is to assign it the loopback address, 127.0.0.1. This prevents accidental forwarding of traffic through that interface.




Command
Command Explanation
nameif ethernet0 outside security0
Define the name of ethernet 0 and security level. 
nameif ethernet1 inside security100
nameif ethernet2 management security90
nameif ethernet3 dmz security30
nameif ethernet4 pix_failover security40
We've connected ethernet4 to another failover-capable PIX. The name reflects this.
nameif ethernet5 not_in_use security20
Not currently in use.
interface ethernet0 100full
Identify network interface speed and duplex. Activate the interface. 
interface ethernet1 100full
interface ethernet2 100full
interface ethernet3 100full
interface ethernet4 100full
Identify network interface speed and duplex. Note that this interface must be set to 100 and full duplex for proper operation of failover, which may be explained in another article.
interface ethernet5 100full shutdown
Note that this interface is shutdown.
ip address outside 1.1.1.1 255.255.255.0
Assign IP address and subnet mask for the interface
ip address inside 10.1.1.1 255.255.255.0
ip address management 10.2.2.1 255.255.255.0
ip address dmz 10.3.3.1 255.255.255.0
ip address pix_failover 10.4.4.1 255.255.255.0


After the PIX has been addressed, we need to think about what it is to do with the addresses of other devices. Do we wish to use Network Address Translation (NAT)? Network Address Translation (NAT) lets your network have any IP addressing scheme and the firewall protects these addresses from visibility on the external network. If we have global Internet addressing and do not wish to re-address our computers, we can assign NAT ID 0 within the PIX to disable NAT. Let's assume for our sample configuration that we do wish to perform NAT. (Looking at the above diagram, we have to do NAT, network 10.0.0.0  /8 is a private address range.
We generally put a global command on each lower security interface we want our internal users to have access to, although statics can be preferable for internal-internal access (see below). The main decision (other than addressing design) is whether to use one or multiple NAT ID's. Using unique NAT ID's limits access to specific interfaces. Using one NAT ID is simpler and assumes the PIX will sort out which nat command (below) pairs up with which global command on which interface.
We put nat commands on the higher security interfaces, allowing users to start connections to lower security level interfaces with global commands on them. The NAT ID ties the inside addresses in the nat command to the pool of addresses in one or more global commands with the same NAT ID.
Port Address Translation is where all inside addresses appear as one outside address, with shifted ports. PAT has some restrictions, for example it cannot support H.323 or caching nameserver use, so you may want to use it to augment a range of global addresses rather than using it as your sole global address.
Let's see what that looks like:




global (outside) 11.1.1.51-1.1.1.100 netmask 255.255.255.0
Defines the routable addresses to be used for outbound connections. This pool defines 1.1.1.51 through .100 as being available on a first come first served basis. As connections are torn down the addresses become available again for use. These addresses are used before the PAT address specified below is used. The number "1" is the NAT ID for this pool.
global (outside) 11.1.1.50 netmask 255.255.255.0
Defines the port address translation (PAT) address to be used by outbound connections after all one-to-one translation address (defined above) are exhausted. This continues NAT ID (pool) 1. 
nat (inside) 0 access-list 101
A "NAT 0" means no NAT-ing is happening. This entry is used for the IPsec connection defined in the configuration. The nat command with access list lets you exempt traffic that is matched by the access-list command statements from the NAT services. Access list 101 (not shown) specifies IPsec traffic. This row may confuse users and if we are not going to touch IPsec now, I would leave it out. We'll cover IPsec on the PIX in a future article.
nat (inside) 1 10.1.1.0 255.255.255.0 0 0
This command connects the global pool 1 to the networks allowed to tap into that pool. Subnet 10.1.1.0 on the inside interface will be allowed to use global pool 1 for its outbound connections.The nat command lets you enable or disable address translation for one or more internal addresses. The nat command will disable nat for an inside network if that net is not explicitly defined to use the pool. Address translation means that when a host starts an outbound connection, the IP addresses in the internal network are translated into global addresses.
nat (management) 1 10.2.2.0 255.255.255.0 0 0
Subnet 10.2.2.0 on the management interface will be allowed to use global pool 1 for its outbound connections.


Note that if acl 101 is undefined, no IPsec traffic will match and no traffic will go through the IPsec tunnel. All traffic would then be subjected to NAT.
If you've used NAT before, you'll recognize that servers on the inside that need to be connected to from the outside will need static mappings. The static command creates a permanent mapping (called a static translation slot or "xlate") between a local IP address and a global IP address. Use the static and access-list commands when you are accessing an interface of a higher security level from an interface of a lower security level. When NAT exists between two interfaces the command takes the form of "static (high,low) low high" . Without address translation, the format of the static command becomes different: "static (high,low) high high".




static (dmz,outside) 1.1.1.22 10.3.3.22 netmask 255.255.255.255 0 0
You need to specify the IP address users on the lower security interface's network will use to access the server on the higher security level interface's network. In this case, we make a DMZ web server at 10.3.3.22 accessible as outside address 1.1.1.22. 
static (inside,management) 10.1.1.13 10.1.1.13 netmask 255.255.255.255 0 0
This static command allows traffic from inside interface (address 10.1.1.13) to management subnet, or vice versa if an appropriate ACL exists for traffic coming from the lower security interface. There is no NAT change to the address. 


We also need some static routing, so the PIX knows which subnets are out which interface. Like Cisco routers, the PIX does know how to route to connected subnets, so you only have to specify subnets or address ranges behind other routers. You can only have one default route for the PIX Firewall.




route outside 0.0.0.0 0.0.0.0 1.1.1.254 1
Specifies a default route out the outside interface to a router at 1.1.1.254 which is 1 hop away.
route management 10.117.220.0 255.255.255.0 10.2.2.254
Specifies a route to the 10.117.220.0 network via the management interface with the next hop address set to 10.2.2.254 (assuming 10.117.220.0 is behind a router on the management subnet). 


TIP: If you use statics you will also be able to go from higher to lower without having to use nat and global.  Example: suppose management station 10.2.2.2 (NMS) needs to talk to serv1 at 10.1.1.15 on the inside. Configure:
static (inside,management) 10.1.1.15 10.1.1.15 netmask 255.255.255.255
access-list from-management-coming-in permit tcp host 10.2.2.2 host 10.1.1.15 eq 8888
access-group from-management-coming-in in interface management
Because the static exists, 10.1.1.15 can also inititate connections to 10.2.2.2 but cannot talk to 10.2.2.50 (NMS2) because no method of translation exists.
Another example:
static (inside,management) 10.1.1.0 10.1.1.0 netmask 255.255.255.0
This allows each network to address the other. The inside can then talk to everything on the management net and reply packets are let back through by virtue of stateful inspection but an ACL must exist for the management net to initiate anything to the inside.
There are some other variations one can do, but statics are more clear and you can predict behaviour because no timeouts for the connections exist and you still retain ultimate control via the ACL.

Related post:

Related Posts with Thumbnails