Cisco PIX Firewall Basic Command Configuration and explanation

Source: Internet
Author: User
Tags failover snmp connection reset domain name server ftp access ftp protocol

A major part of enterprise security policy is to implement and maintain firewalls, so firewalls play an important role in the implementation of network security. Firewalls are typically located on the edge of the corporate network, which isolates the internal network from the Internet, or with other external networks, and restricts network visits to protect the internal network of the enterprise. The purpose of setting up a firewall is to establish a unique channel between the intranet and the extranet, simplifying the security management of the network.

The Cisco PIX Firewall is one of the best performance for all of the same products in many enterprise-class mainstream firewalls. CISCO PIX Series Firewalls currently have 5 models of pix506,515,520,525,535. PIX535 is the newest and most powerful feature in the PIX 500 series. It provides operator-level processing power for large ISPs, etc.

Service providers. But the PIX-specific OS operating system makes most of the management through the command line, not like other firewalls through the Web management interface for network management, which will cause inconvenience to beginners.

This article will show you how to configure the Cisco PIX Firewall through an example.

Before configuring the PIX firewall, let's introduce the physical characteristics of the firewall. Firewalls typically have at least 3 interfaces, but many of the earlier firewalls have only 2 interfaces; when using a

With a 3-interface firewall, at least 3 networks are generated, as described below:

Internal area (intranet). An internal area is usually an internal network or part of an enterprise's internal network. It is the trusted area of the interconnected network, which is a firewall

of protection.

External area (outside network). An external area usually refers to an Internet or a non-enterprise internal network. It is an untrusted zone in an interconnected network when the external zone wants to access the inner zone

The domain hosts and services, through the firewall, can achieve limited access.

Ceasefire zone (DMZ). The ceasefire zone is an isolated network, or several networks. Hosts or servers located in the ceasefire zone are known as bastion hosts. It can be placed in a ceasefire zone normally.

Web servers, mail servers, and so on. The ceasefire zone is usually accessible to external users, which allows external users to access publicly available information about the enterprise, but does not allow them to access the enterprise

Internal network. Note: The 2-interface firewall is not a ceasefire zone.

Since PIX535 is not universal at the enterprise level, the following is a description of the PIX525 application in the Enterprise network.

The PIX Firewall provides 4 administrative access modes:

2 non-privileged mode. The PIX firewall is in this mode after it has been post. The system is displayed as Pixfirewall>

2 privileged mode. Enter enable to enter privileged mode to change the current configuration. Display as pixfirewall#

2 configuration mode. Input configure terminal into this mode, most of the system configuration is done here. Display as Pixfirewall (config) #

2 monitoring mode. The PIX firewall enters monitoring mode by holding the escape key or sending a "break" character during power-on or restart. Here you can update the operating system image and

Password recovery. Display as Monitor>

The configuration of the PIX firewall has 6 basic commands: Nameif,interface,ip Address,nat,global,route.

These commands are required to configure the PIX. Here are the basic steps to configure:

1. Configure the name of the firewall interface and specify the security level (Nameif).

Pix525 (config) #nameif ethernet0 outside Security0

Pix525 (config) #nameif ethernet1 inside security100

Pix525 (config) #nameif DMZ security50

Tip: In the default configuration, Ethernet 0 is named external interface (outside), security level is 0, Ethernet 1 is named internal interface (inside), and security level is 100. Security level

Do not take a value range of 1~99, the higher the number, the higher the security level. If you add a new interface, the statement can be written like this:

Pix525 (config) #nameif pix/intf3 security40 (Security level)

2. Configuring the Ethernet port parameters (interface)

Pix525 (config) #interface ethernet0 auto (auto option indicates system adaptive NIC type)

Pix525 (config) #interface ethernet1 100full (100full option represents 100mbit/s Ethernet full-duplex communication)

Pix525 (config) #interface ethernet1 100full shutdown (shutdown option indicates that the interface is turned off, if the interface is removed shutdown)

3. Configure the IP address of the internal and external network adapter

Pix525 (config) #ip address outside

Pix525 (config) #ip address inside

It is obvious that the IP address of the Pix525 firewall in the external network is, the intranet IP address is

4. Specify the internal address (NAT) to be converted

The function of network address translation (NAT) is to convert the private IP of the intranet into the public IP of the extranet. The NAT command is always used with the global command because the NAT command can specify a host or a range of hosts to access the extranet, and access to the extranet requires external access using the address pool specified by global.

NAT command Configuration Syntax: Nat (if_name) nat_id local_ip

Where (If_name) represents the intranet interface name, such as inside. The nat_id is used to identify the global address pool so that it matches its corresponding global command, and LOCAL_IP represents the IP address assigned to the intranet. For example, indicates that all hosts in the intranet can be accessed externally. Represents the subnet mask for the intranet IP address.

Example 1. Pix525 (config) #nat (inside) 1 0 0

means that NAT is enabled, and all hosts in the intranet can access the extranet, with 0 representing

Example 2. Pix525 (config) #nat (inside) 1

Indicates that only in this network segment can access the extranet.

5. Specify an external address range (global)

The global command translates the IP address of the intranet into an external IP address or a range of addresses. Configuration syntax for the global command: Global (if_name) nat_id ip_address-ip_address

Where (If_name) represents the name of an extranet interface, such as outside. The nat_id is used to identify the global address pool so that it matches its corresponding NAT command, and Ip_address-ip_address represents a single translated IP address or a range of IP addresses. Represents the network mask for the global IP address.

Example 1. Pix525 (config) #global (outside) 1

Indicates that the PIX firewall will use the IP address pool To assign a global IP address to the host that will access the extranet when the host on the intranet is going to access the extranet through the PIX firewall.

Example 2. Pix525 (config) #global (outside) 1

Indicates that when the intranet is going to access the extranet, the PIX firewall will use the single IP address for all hosts accessing the extranet.

Example 3. Pix525 (config) #no Global (outside) 1

Represents the deletion of this global table entry.

6. Set up static routes (route) to intranet and extranet

Defines a static route. Route command configuration Syntax: Route (if_name) 0 0 gateway_ip

Where (If_name) represents the interface name, such as Inside,outside. The GATEWAY_IP represents the IP address of the gateway router. Represents the number of hops to gateway_ip. Usually the default is 1.

Example 1. Pix525 (config) #route outside 0 0 1

Represents a default route that points to a border router (IP address

Example 2. Pix525 (config) #route inside 1

Pix525 (config) #route inside 1

If the internal network has only one network segment, set a default route as in Example 1, and if multiple networks exist internally, you need to configure more than one static route. The above command indicates

A static route to the network is created, and the next router IP address for the static route is

These 6 basic commands, if understood, can go into some advanced configurations of the PIX firewall.

A. Configuring static IP address Translation (static)

If a session is initiated from the extranet, the destination address of the session is an intranet IP address, and static translates the internal address into a specified global address, allowing this session to be established.

Static command configuration syntax: Static (internal_if_name,external_if_name) outside_ip_address inside_ ip_address where internal_if_ The name represents an internal network interface with a high security level.

such as inside.

External_if_name is an external network interface with a low security level. such as outside and so on. Outside_ip_address is the IP address on the interface that is accessing the lower security level.

Inside_ IP_Address is the local IP address of the internal network.

Example 1. Pix525 (config) #static (inside, outside)

A host that represents an IP address of, for each session established through the PIX firewall, is translated into the global address of, and can also be understood as a static command to create an internal IP address and an external IP address between State mappings.

Example 2. Pix525 (config) #static (inside, outside)

Example 3. Pix525 (config) #static (DMZ, outside)

Note the same example 1. Using the static command allows us to set a permanent global IP address for a specific internal IP address, as illustrated by the above examples. This allows a portal to be created for the specified interface with a lower security level, allowing them to enter the specified interface with a higher security level.

B. Pipeline command (CONDUIT)

As I said before, using the static command creates a static mapping between a local IP address and a global IP address, but connections from the outside to the internal interface are still blocked by the PIX firewall

Adaptive Security Algorithm (ASA) blocking, the conduit command is used to allow traffic to flow from an interface with a lower security level to an interface with a higher level of security, such as a session that allows incoming directions from outside to the DMZ or internal interface. For connections to internal interfaces, the static and conduit commands are used together to specify the establishment of the session.

Conduit command Configuration syntax:

Conduit Permit | Deny GLOBAL_IP port<-port> protocol Foreign_ip

Permit | Deny Allow | Access Denied

GLOBAL_IP refers to a global IP address that was previously defined by the global or static command, and if GLOBAL_IP is 0, use any instead of 0; if Global_ip is a host, use host

The parameter is made.

Port refers to the ports that the service acts on, such as www using 80,SMTP 25 and so on, and we can specify the port by service name or port number.

Protocol refers to the connection protocol, such as: TCP, UDP, ICMP, and so on.

The FOREIGN_IP represents an external IP that can access the GLOBAL_IP. For any host, it can be represented by any. If Foreign_ip is a host, use the host command parameter.

Example 1. Pix525 (config) #conduit permit tcp host eq www any

This example indicates that any external host is allowed HTTP access to this host for the global address where EQ and a port are used to allow or deny access to this port. Eq

FTP means allowing or denying access to FTP only.

Example 2. Pix525 (config) #conduit deny TCP any EQ FTP host

Indicates that an external host is not allowed to FTP access to any global address.

Example 3. Pix525 (config) #conduit permit ICMP any any

Indicates that ICMP messages are allowed to pass internally and externally.

Example 4. Pix525 (config) #static (inside, outside)

Pix525 (config) #conduit permit tcp host eq www any

This example illustrates the relationship between static and conduit. is a Web server and now hopes that users of the extranet will be able to get web services through the PIX firewall. So do it first.

Static statically mapped:> (Global), and then use the Conduit command to allow any external host HTTP access to the global address

C. Configuring the Fixup protocol

The fixup command function is to enable, disable, change a service or protocol through the PIX firewall, the port specified by the fixup command is the service that the PIX firewall is listening on. See the following example:

Example 1. Pix525 (config) #fixup protocol ftp 21

Enable the FTP protocol and specify that the port number for FTP is 21

Example 2. Pix525 (config) #fixup protocol HTTP 80

Pix525 (config) #fixup protocol HTTP 1080

Specify 80 and 10,802 ports for the HTTP protocol.

Example 3. Pix525 (config) #no fixup protocol SMTP 80

Disables the SMTP protocol.

D. Setting up Telnet

Telnet has a version of the change. Before the PIX OS 5.0 (the version number of the PIX OS), the PIX can only be accessed via Telnet from hosts on the internal network. In PIX OS 5.0 and later versions, Telnet to PIX Access can be enabled on all interfaces. When you want to telnet to the PIX firewall from the external interface, the Telnet traffic needs to be protected with IPSec, which means that the user must configure the PIX to establish an IPSec tunnel to another pix, router, or VPN client. The other is to configure SSH on the pix, then telnet to the PIX firewall with SSH client, the PIX supports SSH1 and SSH2, but SSH1 is freeware, SSH2 is commercial software. In contrast, the Cisco router's Telnet is not doing much good.

Telnet configuration syntax: Telnet local_ip

LOCAL_IP represents the IP address that is authorized to access the PIX via Telnet. If this item is not set, the PIX is configured only by the console.

Here is a configuration example for your reference, configuration examples are described below, the PIX firewall directly placed in the interface with the Internet, where the network environment has more than 10 public IP, may have a friend asked if my public IP is limited what to do? You can add router to the front of the PIX, or global uses a single IP address, and the IP address of the external interface is the same. Another maintenance command is also useful, show interface view port status, show static view static address mapping, show IP View interface IP address, ping outside | Inside

IP_Address determine connectivity.

Welcome to the PIX firewall

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

Pix525> en


Pix525#sh Config

: Saved


PIX version 6.0 (1)------PIX Current Operating system version is 6.0

Nameif Ethernet0 outside Security0

Nameif Ethernet1 inside security100------shows that the PIX currently has only 2 interfaces

Enable Password 7Y051HHCCOIRTSQZ Encrypted

Passed 7Y051HHCCOIRTSQZ encrypted------The PIX firewall password is encrypted by default and is not displayed in clear text in the configuration file, and the Telnet password defaults to


Hostname PIX525------Host name is PIX525

Domain-name local domain name server, typically used as an external access

Fixup protocol FTP 21

Fixup protocol HTTP 80

Fixup protocol h323 1720

Fixup protocol Rsh 514

Fixup protocol SMTP 25

Fixup protocol sqlnet 1521

Fixup protocol SIP 5060------Some services or protocols that are currently enabled, note that the RSH service cannot change the port number

Names------resolve the local hostname to the IP address, in the configuration can use the name in place of the IP address, is not currently set, so the list is empty

Pager lines------per 24 lines of page

Interface Ethernet0 Auto

Interface Ethernet1 Auto------Set the two network card type as adaptive

MTU outside 1500

MTU inside------Ethernet Standard MTU length of 1500 bytes

IP address outside

IP address inside IP addresses of the PIX extranet, the IP address of the intranet

IP Audit Info Action Alarm

IP audit Attack Action alarm------2 commands for PIX intrusion detection. When a packet has an attack or report type signature, the PIX takes an alarm action (the default action),

Generates syslog messages to the specified logging host, as well as actions such as dropping packets and sending a TCP connection reset signal, which need to be configured separately.

PDM history enable------PIX Device Manager to monitor the PIX graphically

ARP Timeout 14400------ARP table time-out

Global (outside) 1 you visit an external forum or chat with QQ, etc., the IP shown above is this

Nat (inside) 1 0 0

Static (inside, outside) netmask 0 0

Conduit permit ICMP any any

Conduit permit TCP host eq www any

Conduit permit UDP host eq domain any

------provide domain-name service with This IP address, and only allow external users to access the UDP port of domain

Route outside 1------External Gateway

Timeout xlate------After an internal device has been translated (global) to an external IP packet, after the default of 3 hours, if the packet is not active, the previously created

The table entry is removed from the translation table, releasing the global address that the device occupies

Timeout conn half-closed 0:100 UDP 0:02:00 RPC 0:10:00 h323 0:05:00 sip 0:30:00 Sip_media 0:02:00

Timeout Uauth 0:05:00 Absolute------AAA authentication Time Out, absolute indicates continuous operation Uauth Timer, after user timeout, will force re-authentication

Aaa-server TACACS + protocol Tacacs +

Aaa-server RADIUS Protocol RADIUS------Two protocols for the AAA server. AAA means certification, authorization, audit. PIX Firewall can increase internal network through AAA server

The security

No snmp-server location

No Snmp-server Contact

Snmp-server Community public------There is no SNMP workstation, there is no location and contact

No snmp-server enable traps------Send SNMP Traps

Floodguard enable------Prevent someone from forging a large number of authentication requests, using up the PIX's AAA resources

No sysopt Route Dnat

Telnet Timeout 5

SSH Timeout 5------Time-out for using SSH to access the PIX

Terminal Width 80



Pix525#write memory------Save the configuration

This article is just a description of the basic configuration of the PIX firewall, some other features of the PIX such as AAA server, VPN, etc. are limited to space, no longer introduced.

If interested readers have access to the following resources:


PIX Firewall Chinese Information


PIX Firewall English official website, detailed technical information


NET130 's PIX Online Experiment section

Configuration of the PIX525:

pixfirewall# Show config

: Saved


PIX Version 5.3 (2)

Nameif Ethernet0 outside Security0

Nameif Ethernet1 inside security100

Nameif Ethernet2 INTF2 Security10

Enable password 2kfqnbnidi.2kyou encrypted

passwd 2kfqnbnidi.2kyou Encrypted

Hostname Pixfirewall

Fixup protocol FTP 21

Fixup protocol HTTP 80

Fixup protocol h323 1720

Fixup protocol Rsh 514

Fixup protocol RTSP 554

Fixup protocol SMTP 25

Fixup protocol sqlnet 1521

Fixup protocol sip 5060


Pager lines 24

Logging on

No logging timestamp

No logging Standby

No logging console

No logging monitor

No logging buffered

No logging trap

No logging history

Logging Facility 20

Logging Queue 512

Interface Ethernet0 Auto

Interface Ethernet1 Auto

Interface Ethernet2 Auto

MTU outside 1500

MTU Inside 1500

MTU INTF2 1500

IP address outside

IP address inside

IP address INTF2

IP Audit Info Action Alarm

IP Audit Attack Action Alarm

No failover

Failover Timeout 0:00:00

Failover Poll 15

Failover IP address outside

Failover IP address inside

Failover IP Address INTF2

ARP Timeout 14400

Global (Outside) 1 netmask

Nat (inside) 1 0 0

Alias (inside)

Alias (inside)

Alias (inside)

Alias (inside)

Static (Inside,outside) netmask 0 0

Static (Inside,outside) netmask 0 0

Static (Inside,outside) netmask 0 0

Static (Inside,outside) netmask 0 0

Conduit permit ICMP any any

Conduit permit TCP host eq www any

Conduit permit TCP host eq SMTP any

Conduit permit TCP host eq POP3 any

Conduit permit TCP host eq FTP any

Conduit permit TCP host eq www any

Conduit permit TCP host eq POP3 any

Conduit permit TCP host eq SMTP any

Conduit permit TCP host eq www any

Conduit permit TCP host eq www any

Conduit permit TCP host any

Conduit permit UDP host any

Route outside 1

Route inside 1

Route inside 1

Route inside 1

Route inside 1

Timeout Xlate 3:00:00

Timeout conn 1:00:00 half-closed 0:10:00 UDP 0:02:00 rpc 0:10:00 h323 0:05:00 si

P 0:30:00 Sip_media 0:02:00

Timeout Uauth 0:05:00 Absolute

Aaa-server TACACS + protocol Tacacs +

Aaa-server RADIUS Protocol Radius

No snmp-server location

No Snmp-server Contact

Snmp-server Community Public

No snmp-server enable traps

Floodguard Enable

No sysopt Route Dnat

ISAKMP identity hostname

Telnet Timeout 5

SSH Timeout 5

Terminal Width 80


return send Short Message


This article is from the "Five Corners" blog, please be sure to keep this source

Cisco PIX Firewall Basic Command Configuration and explanation

Related Article

E-Commerce Solutions

Leverage the same tools powering the Alibaba Ecosystem

Learn more >

Apsara Conference 2019

The Rise of Data Intelligence, September 25th - 27th, Hangzhou, China

Learn more >

Alibaba Cloud Free Trial

Learn and experience the power of Alibaba Cloud with a free trial worth $300-1200 USD

Learn more >

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: and provide relevant evidence. A staff member will contact you within 5 working days.