PIX VPN 的两个问题
(作者:大勇)


   
    在Cisco 的解决方案中,IPSEC VPN通常建立在IOS Router、VPN 集中器、PIX以及WinPC之间,其中WinPC既可以使用Windows自带的组件,也可以使用Cisco VPN client 程序,后者配置和使用都较为便利。

    问题一的拓扑如下:

     Lan1(ACS)-----PIX525-----Internet------Router------Lan2

     PIX 525是VPN Server, 在Lan2 中有多个客户。 客户端通过Router 以PAT(端口地址转换)方式连接到Internet,使用Cisco VPN Client 软件与PIX 525建立VPN 连接。当Lan2中只有一个客户与PIX 525建立连接时,一切正常;但如果另一个客户也要发起VPN连接的话,前一个客户的连接就会被断掉。问题的原因可能是PIX 525按IP地址识别SA,对同一IP地址,不能建立两个SA。

     解决的方法是使用PIX 6.3版本软件的一个新特性“TCP transparancy”,该特性允许客户端把IPSEC数据打包通过TCP或UDP的一个端口(默认10000)进行传输,关键命令是:isakmp nat-traversal。

     完整配置:

	PIX Version 6.3(1)
	interface ethernet0 auto
	interface ethernet1 auto
	interface ethernet2 auto
	nameif ethernet0 outside security0
	nameif ethernet1 inside security100
	nameif ethernet2 dmz security50
	enable password ******************** encrypted
	passwd ******************** encrypted
	hostname TEST
	domain-name jyzq.cn
	fixup protocol ftp 21
	fixup protocol h323 h225 1720
	fixup protocol h323 ras 1718-1719
	fixup protocol http 80
	fixup protocol ils 389
	fixup protocol rsh 514
	fixup protocol rtsp 554
	fixup protocol sip 5060
	fixup protocol sip udp 5060
	no fixup protocol skinny 2000
	fixup protocol smtp 25
	fixup protocol sqlnet 1521
	names
	access-list 101 permit ip 10.1.1.0 255.255.255.0 10.2.1.0 255.255.255.0 
	access-list 102 permit ip 10.1.2.0 255.255.255.0 10.2.2.0 255.255.255.0 
	access-list no-nat permit ip 10.1.1.0 255.255.255.0 10.2.1.0 255.255.255.0 
	access-list no-nat permit ip 10.1.2.0 255.255.255.0 10.2.2.0 255.255.255.0 
	pager lines 24
	mtu outside 1500
	mtu inside 1500
	mtu dmz 1500	
	ip address outside 202.100.100.100 255.255.255.192
	ip address inside 10.1.3.250 255.255.255.0
	ip address dmz 192.168.1.1 255.255.255.0
	ip audit info action alarm
	ip audit attack action alarm
	ip local pool pool1 10.2.1.1-10.2.1.250
	ip local pool pool2 10.2.2.1-10.2.2.250
	no failover
	failover timeout 0:00:00
	failover poll 15
	no failover ip address outside
	no failover ip address inside
	no failover ip address dmz
	pdm history enable
	arp timeout 14400
	global (outside) 1 interface
	nat (inside) 0 access-list no-nat
	nat (inside) 1 10.1.1.0 255.255.255.0 0 0
	nat (inside) 1 10.1.2.0 255.255.255.0 0 0
	nat (dmz) 1 192.168.1.0 255.255.255.0 0 0
	route outside 0.0.0.0 0.0.0.0 202.100.100.101 1
	route inside 10.1.1.0 255.255.248.0 10.1.3.2 1
	route inside 10.1.2.0 255.255.255.0 10.1.3.2 1
	timeout xlate 3:00:00
	timeout conn 1:00:00 half-closed 0:10:00 udp 0:02:00 rpc 0:10:00 h225 1:00:00
	timeout h323 0:05:00 mgcp 0:05:00 sip 0:30:00 sip_media 0:02:00
	timeout uauth 0:05:00 absolute
	aaa-server TACACS+ protocol tacacs+ 
	aaa-server RADIUS protocol radius 
	aaa-server RADIUS (inside) host 10.1.3.100 cisco timeout 10
	aaa-server LOCAL protocol local 
	aaa authentication telnet console RADIUS
	no snmp-server location
	no snmp-server contact
	snmp-server community public
	no snmp-server enable traps
	floodguard enable
	sysopt connection permit-ipsec
	crypto ipsec transform-set test esp-des esp-md5-hmac 
	crypto dynamic-map dynmap 10 set transform-set test
	crypto map testvpn 10 ipsec-isakmp dynamic dynmap
	crypto map testvpn client configuration address initiate
	crypto map testvpn client configuration address respond
	crypto map testvpn client authentication RADIUS
	crypto map testvpn interface outside
	isakmp enable outside
	isakmp key ******** address 0.0.0.0 netmask 0.0.0.0 
	isakmp identity address
	isakmp nat-traversal 120
	isakmp policy 10 authentication pre-share
	isakmp policy 10 encryption des
	isakmp policy 10 hash md5
	isakmp policy 10 group 2
	isakmp policy 10 lifetime 86400
	vpngroup vpn1 address-pool pool1
	vpngroup vpn1 dns-server 202.100.100.198
	vpngroup vpn1 default-domain test.cn
	vpngroup vpn1 split-tunnel 101
	vpngroup vpn1 idle-time 1800
	vpngroup vpn1 password ********
	vpngroup vpn2 address-pool pool2
	vpngroup vpn2 dns-server 202.100.100.198
	vpngroup vpn2 default-domain test.cn
	vpngroup vpn2 split-tunnel 102
	vpngroup vpn2 idle-time 1800
	vpngroup vpn2 password ********
	telnet 10.1.3.0 255.255.255.0 inside
	telnet timeout 5
	ssh timeout 5
	console timeout 0
	terminal width 80
	Cryptochecksum:bbafa6e012639b4db524831263ba7b86
	: end

     注意Cisco VPN Client 低版本(如3.5)在上述环境中使用有问题,须要使用较新的版本,如4.0版本。配置方法为选中VPN连接属性中的“Enable Transparent Tunneling"。

     在以上配置中,PIX上有两个vpngroup,均通过本机的地址池分配地址,不同组用户可以访问不同的资源。用户使用不同的Pre-shared key连接PIX,确定其所属的组。用户名、密码则由PIX提交给ACS做集中验证。由于ACS无法限定某个用户只能以某个组的身份登录,如果A组的成员知道了B组的Pre-shared key, 他可以使用自己的用户名、密码登录到B组。为了防止这种情况发生,可以在ACS上为两个组的用户指定不同的ACL,使得即使用户以别的组的身份登录,也无法访问受限资源。

     问题二的拓扑如下:

     Lan1-----PIX525-----Internet------PIX506E------Lan2

     在该环境中,Lan2用户可以通过PIX 506E上网,但不能与PIX 525建立VPN连接。经观察发现,Lan2用户如果不通过PIX506E防火墙可以与PIX 525建立VPN连接。如果PIX 506E为Lan2中的某台PC做了静态NAT, 该PC也可以与PIX 525建立VPN连接。

     解决过程:

    show version 发现PIX 506E不支持VPN-DES加密特性:

	Licensed Features: 
	Failover: Disabled 
	VPN-DES: Disabled  
	VPN-3DES-AES: Disabled 

     PIX 的VPN-DES特性是免费的,如果出厂时该特性是Disabled的,要到网址http://www.cisco.com/kobayashi/sw-center/ciscosecure/pix.shtml(需要CCO帐号)点击“*FREE* Register for PIX 56-bit IPSEC Software Feature Key”进行注册获取新的Acitvation Key。高版本软件可以用命令activation-key 直接输入新的key,低版本的升级方法可以参考:http://mize.netbuddy.org/021213.html

     升级之后,问题解决。