安全 : Cisco PIX 500 系列安全设备

配置 PIX 防火墙,以允许外部网络对邮件服务器的访问

2015 年 8 月 28 日 - 机器翻译
其他版本: PDFpdf | 英语 (2015 年 4 月 22 日) | 反馈


目录


简介

此示例配置展示如何设置Cisco PIX防火墙,来访问位于外部网络的邮件服务器。

注意: 在本文中配置的SMTP检查不能与到服务器的ESMTP连接兼容,例如Microsoft替换。请勿配置SMTP检查,如果使用依靠ESMTP的邮件服务器。或者, PIX软件版本7.0及以后支持SMTP和ESMTP检查。

先决条件

要求

本文档没有任何特定的要求。

使用的组件

本文档中的信息适用于以下软件和硬件版本:

  • Cisco Secure PIX 500系列防火墙

  • PIX防火墙软件软件版本6.3(3)

  • Cisco 2522路由器

本文档中的信息都是基于特定实验室环境中的设备编写的。本文档中使用的所有设备最初均采用原始(默认)配置。如果您使用的是真实网络,请确保您已经了解所有命令的潜在影响。

规则

有关文档规则的详细信息,请参阅 Cisco 技术提示规则

配置

本部分提供有关如何配置本文档所述功能的信息。

注意: 使用命令查找工具仅限注册用户)可获取有关本部分所使用命令的详细信息。

网络图

本文档使用此网络设置。

/image/gif/paws/8109/mailserver_out.gif

配置

本文档使用以下配置。

PIX 防火墙
PIX Version 6.3(3)
  
!--- These commands name the Ethernet interfaces and 
  !--- define their security levels.

  nameif ethernet0 outside security0
  nameif ethernet1 inside security100
  enable password 8Ry2YjIyt7RRXU24 encrypted
  passwd 2KFQnbNIdI.2KYOU encrypted
  hostname PIX_1
  domain-name noplace.com
  fixup protocol ftp 21
  fixup protocol http 80
  fixup protocol h323 1720
  fixup protocol rsh 514
  fixup protocol smtp 25
  fixup protocol sqlnet 1521
  no names
  pager lines 24
  logging on
  logging timestamp
  no logging standby
  logging console debugging
  logging monitor debugging
  logging buffered debugging
  logging trap debugging
  no logging history
  logging facility 23
  logging queue 512
  
!--- These commands specify the media type
  !--- for the interfaces...auto = auto-detect.

  interface ethernet0 auto
  interface ethernet1 auto
  mtu outside 1500
  mtu inside 1500
  
!--- These commands define an IP address for each interface.

  ip address inside 192.168.1.1 255.255.255.252
  ip address outside 209.64.3.1 255.255.255.252
  no failover
  arp timeout 14400
  
!--- This command defines the global address for the Network Address Translation 
  !--- (NAT) statement. In this case, the two commands state that any traffic 
  !--- from the 192.168.2.x network that passes from the inside interface (Ethernet0)
  !--- to the outside interface (Ethernet 1) translates into an address 
  !--- in the range of 209.64.3.129 through 209.64.3.253 and contains a subnet
  !--- mask of 255.255.255.128.

  global (outside) 1 209.64.3.129-209.64.3.253 netmask 255.255.255.128
  
!--- This command reserves the last available address (209.64.3.254) for 
  !--- for Port Address Translation (PAT). In the previous statement, 
  !--- each address inside that requests a connection uses one  
  !--- of the addresses specified. If all of these addresses are in use,
  !--- this statement provides a failsafe to allow additional inside stations
  !--- to establish connections.
 
  global (outside) 1 209.64.3.254
  
!--- This command indicates that all addresses in the 192.168.2.x range 
  !--- that pass from the inside (Ethernet0) to a corresponding global 
  !--- designation are done with NAT.
  !--- As outbound traffic is permitted by default on the PIX, no
  !--- static commands are needed.

  nat (inside) 1 192.168.2.0 255.255.255.0
  
!--- Sets the default route for the PIX Firewall at 209.64.3.2.

  route outside 0.0.0.0 0.0.0.0 209.64.3.2 1
  
!--- Creates a static route for the 192.168.2.x network with 192.168.1.2.
  !--- The PIX forwards packets with these addresses to the router 
  !--- at 192.168.1.2.

  route inside 192.168.2.0 255.255.255.0 192.168.1.2 1
  timeout xlate 1:30:00 conn 1:00:00 half-closed 0:10:00 udp 0:00:00
  timeout rpc 0:10:00 h323 0:05:00
  timeout uauth 0:00:00 absolute
  aaa-server TACACS+ protocol tacacs+
  aaa-server RADIUS protocol radius
  snmp-server host inside 161.240.21.246
  no snmp-server location
  no snmp-server contact
  snmp-server community public
  no snmp-server enable traps
  floodguard enable
  terminal width 200
  Cryptochecksum:d66eb04bc477f21ffbd5baa21ce0f85a
  : end

路由器 A
Current configuration:
  !
  version 12.0
  service timestamps debug uptime
  service timestamps log uptime
  no service password-encryption
  !
  hostname 2522-R4
  !
  enable secret 5 $1$N0F3$XE2aJhJlCbLWYloDwNvcV.
  !
  ip subnet-zero
  !
  !
  !
  !
  !
  interface Ethernet0
   
!--- Assigns an IP address to the inside Ethernet interface.

   ip address 192.168.2.1 255.255.255.0
   no ip directed-broadcast
  !
  interface Ethernet1
   
!--- Assigns an IP address to the PIX-facing interface.

   ip address 192.168.1.2 255.255.255.252
   no ip directed-broadcast
  !
  interface Serial0
   no ip address
   no ip directed-broadcast
   shutdown
  !
  interface Serial1
   no ip address
   no ip directed-broadcast
   shutdown
  !
  ip classless
  
!--- This route instructs the inside router to forward all 
  !--- non-local packets to the PIX.

  ip route 0.0.0.0 0.0.0.0 192.168.1.1
  !
  !
  line con 0
   transport input none
   line aux 0
   autoselect during-login
   line vty 0 4
   exec-timeout 5 0
   password ww
   login
  !
  end

路由器 B
Current configuration:
  !
  version 12.0
  service timestamps debug uptime
  service timestamps log uptime
  no service password-encryption
  !
  hostname 2522-R4
  !
  enable secret 5 $1$N0F3$XE2aJhJlCbLWYloDwNvcV.
  !
  ip subnet-zero
  !
  !
  !
  !
  interface Ethernet0
   
!--- Assigns an IP address to the PIX-facing Ethernet interface.

   ip address 209.64.3.2 255.255.255.252
   no ip directed-broadcast
  !
  interface Ethernet1
   
!--- Assigns an IP address to the server-facing Ethernet interface.

   ip address 209.64.3.5 255.255.255.252
   no ip directed-broadcast
  !
  interface Serial0
   
!--- Assigns an IP address to the Internet-facing interface.

   ip address 209.64.3.9 255.255.255.252
   no ip directed-broadcast
   no ip mroute-cache
  !
  interface Serial1
   no ip address
   no ip directed-broadcast
  !
  ip classless
  
!--- All non-local packets are to be sent out serial 0.  In this case,
  !--- the IP address on the other end of the serial interface is not known,
  !--- or you can specify it here.

  ip route 0.0.0.0 0.0.0.0 serial 0
  !
  
!--- This statement is required to direct traffic destined to the 
  !--- 209.64.3.128 network (the PIX global pool) to the PIX to be translated 
  !--- back to inside addresses.

  ip route 209.64.3.128 255.255.255.128 209.64.3.1
  !
  !
  line con 0
   transport input none
  line aux 0
   autoselect during-login
  line vty 0 4
   exec-timeout 5 0
   password ww
   login
  !
  end

验证

当前没有可用于此配置的验证过程。

故障排除

logging console debugging 命令将邮件导向到 PIX 控制台。如果邮件是问题,请检查消息找出为了确定问题的发送和接收站的IP地址。

相关的思科支持社区讨论

思科支持社区是您提问、解答问题、分享建议以及与工作伙伴协作的论坛。


相关信息


Document ID: 8109