最简单的VPN登入PIX
时间:2016-05-26 02:02 来源:linux.it.net.cn 作者:IT
做一个最简单的PIX和VPN client连接,不需要验证服务器。
环境如下:
VPN client----------------------PIX--------------------
192.168.10.1 218.218.218.218 192.168.100.1
VPN分配IP为192.168.100.10-192.168.100.200
PIX Version 6.3(3)
interface ethernet0 auto
interface ethernet1 100full
nameif ethernet0 outside security0
nameif ethernet1 inside security100
enable password AmL53.8shQrncOlX encrypted
passwd 2KFQnbNIdI.2KYOU encrypted
hostname pixfirewall
fixup protocol dns maximum-length 512
fixup protocol ftp 21
fixup protocol h323 h225 1720
fixup protocol h323 ras 1718-1719
fixup protocol http 80
fixup protocol rsh 514
fixup protocol rtsp 554
fixup protocol sip 5060
fixup protocol sip udp 5060
fixup protocol skinny 2000
fixup protocol smtp 25
fixup protocol sqlnet 1521
fixup protocol tftp 69
names
access-list no-nat permit ip 192.168.100.0 255.255.255.0 192.168.100.0 255.255.255.0
!定义不进行NAT的传输,
pager lines 24
interface ethernet0 auto
interface ethernet1 auto
mtu outside 1500
mtu inside 1500
ip address outside 218.218.218 255.255.255.0
!定义PIX的outside口IP
ip address inside 192.168.100.1 255.255.255.0
!定义PIX的inside口IP
ip audit info action alarm
ip audit attack action alarm
ip local pool dialer 192.168.100.10-192.168.100.200
!定义分配给VPN client的IP地址池
no failover
failover timeout 0:00:00
failover poll 15
failover ip address outside 0.0.0.0
failover ip address inside 0.0.0.0
pdm logging informational 100
pdm history enable
arp timeout 14400
global (outside) 1 interface
nat (inside) 0 access-list no-nat
!定义不需要进行NAT传输的流量
nat (inside) 1 0.0.0.0 0.0.0.0 0 0
route outside 0.0.0.0 0.0.0.0 218.218.218.1 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
aaa-server LOCAL protocol local
!服务器使用的协议
http server enable
http 10.1.1.0 255.255.255.255 inside
no snmp-server location
no snmp-server contact
snmp-server community public
no snmp-server enable traps
floodguard enable
sysopt connection permit-ipsec
!对于所有IPSec流量不检测允许其通过,如果不加这个命令的话,需要加上ACL到outside口以允许特定的IPSce流量通过,但会控制更加灵活。
no sysopt route dnat
crypto ipsec transform-set aaades esp-des esp-md5-hmac
!定义一个变换集aaades
crypto dynamic-map dynomap 10 set transform-set aaades
!把变换集aaades添加到动态加密策略dynomap
crypto map vpnpeer 20 ipsec-isakmp dynamic dynomap
!把动态加密策略绑定到vpnpeer 加密图
crypto map vpnpeer client authentication LOCAL
!定义不需要验证服务器 ,使用的是PIX自己的用户验证。
crypto map vpnpeer client configuration address initiate
!定义给每个客户端分配IP地址
crypto map vpnpeer client configuration address respond
!定义PIX防火墙接受来自任何IP的请求
crypto map vpnpeer interface outside
!把动态加密图vpnpeer绑定到outside口
isakmp enable outside
!在outside口启用isakmp
isakmp key 1234 address 0.0.0.0 netmask 0.0.0.0
!定义共享密匙,并接受任何地址的请求。
isakmp client configuration address-pool local dialer outside
!将VPN client地址池绑定到isakmp
isakmp policy 10 authentication pre-share
!定义phase 1使用pre-shared key进行认证
isakmp policy 10 encryption des
!定义phase 1协商用DES加密算法
isakmp policy 10 hash md5
!定义phase 1协商用MD5散列算法
isakmp policy 10 group 2
!定义phase 1进行IKE协商使用DH group 2
isakmp policy 10 lifetime 86400
!定义IKE SA生存时间
vpngroup student0 address-pool dialer
!定义VPN client拨入使用的vpngroup所分配的IP地址池
vpngroup student0 idle-time 1800
!定义vpngroup的空闲时间
vpngroup student0 password 1234
!定义vpngroup的pre-shared key
telnet 192.168.100.9 255.255.255.0 inside
telnet timeout 5
ssh 192.168.100.9 255.255.255.255 inside
ssh timeout 20
terminal width 80
username vpnuser password vpnuser
!在PIX上创建一个用户,用户名密码都为vpnuser
Cryptochecksum:693b87faa42d062c2848346a3a0acb43
pixfirewall#
VPN client版本为4.0.5,先在Connection Entries里创建一个连接,在最上面填入。
Connection Entry:vpnpeer1
Description:test
Host:218.218.218.218
在Authentication里的GROUP Authentication里填入。
Name:student0 #就是vpngroup name
Password:1234 #就是vpngroup password
Confirm Password:1234
name和password要和PIX中的vpngroup和key一致。
在vpn client进行连接的时候会有一个窗口弹出,要输入用户名和密码,输入vpnuser就可以了。
(责任编辑:IT)
做一个最简单的PIX和VPN client连接,不需要验证服务器。 环境如下: VPN client----------------------PIX-------------------- 192.168.10.1 218.218.218.218 192.168.100.1 VPN分配IP为192.168.100.10-192.168.100.200 PIX Version 6.3(3) interface ethernet0 auto interface ethernet1 100full nameif ethernet0 outside security0 nameif ethernet1 inside security100 enable password AmL53.8shQrncOlX encrypted passwd 2KFQnbNIdI.2KYOU encrypted hostname pixfirewall fixup protocol dns maximum-length 512 fixup protocol ftp 21 fixup protocol h323 h225 1720 fixup protocol h323 ras 1718-1719 fixup protocol http 80 fixup protocol rsh 514 fixup protocol rtsp 554 fixup protocol sip 5060 fixup protocol sip udp 5060 fixup protocol skinny 2000 fixup protocol smtp 25 fixup protocol sqlnet 1521 fixup protocol tftp 69 names access-list no-nat permit ip 192.168.100.0 255.255.255.0 192.168.100.0 255.255.255.0 !定义不进行NAT的传输, pager lines 24 interface ethernet0 auto interface ethernet1 auto mtu outside 1500 mtu inside 1500 ip address outside 218.218.218 255.255.255.0 !定义PIX的outside口IP ip address inside 192.168.100.1 255.255.255.0 !定义PIX的inside口IP ip audit info action alarm ip audit attack action alarm ip local pool dialer 192.168.100.10-192.168.100.200 !定义分配给VPN client的IP地址池 no failover failover timeout 0:00:00 failover poll 15 failover ip address outside 0.0.0.0 failover ip address inside 0.0.0.0 pdm logging informational 100 pdm history enable arp timeout 14400 global (outside) 1 interface nat (inside) 0 access-list no-nat !定义不需要进行NAT传输的流量 nat (inside) 1 0.0.0.0 0.0.0.0 0 0 route outside 0.0.0.0 0.0.0.0 218.218.218.1 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 aaa-server LOCAL protocol local !服务器使用的协议 http server enable http 10.1.1.0 255.255.255.255 inside no snmp-server location no snmp-server contact snmp-server community public no snmp-server enable traps floodguard enable sysopt connection permit-ipsec !对于所有IPSec流量不检测允许其通过,如果不加这个命令的话,需要加上ACL到outside口以允许特定的IPSce流量通过,但会控制更加灵活。 no sysopt route dnat crypto ipsec transform-set aaades esp-des esp-md5-hmac !定义一个变换集aaades crypto dynamic-map dynomap 10 set transform-set aaades !把变换集aaades添加到动态加密策略dynomap crypto map vpnpeer 20 ipsec-isakmp dynamic dynomap !把动态加密策略绑定到vpnpeer 加密图 crypto map vpnpeer client authentication LOCAL !定义不需要验证服务器 ,使用的是PIX自己的用户验证。 crypto map vpnpeer client configuration address initiate !定义给每个客户端分配IP地址 crypto map vpnpeer client configuration address respond !定义PIX防火墙接受来自任何IP的请求 crypto map vpnpeer interface outside !把动态加密图vpnpeer绑定到outside口 isakmp enable outside !在outside口启用isakmp isakmp key 1234 address 0.0.0.0 netmask 0.0.0.0 !定义共享密匙,并接受任何地址的请求。 isakmp client configuration address-pool local dialer outside !将VPN client地址池绑定到isakmp isakmp policy 10 authentication pre-share !定义phase 1使用pre-shared key进行认证 isakmp policy 10 encryption des !定义phase 1协商用DES加密算法 isakmp policy 10 hash md5 !定义phase 1协商用MD5散列算法 isakmp policy 10 group 2 !定义phase 1进行IKE协商使用DH group 2 isakmp policy 10 lifetime 86400 !定义IKE SA生存时间 vpngroup student0 address-pool dialer !定义VPN client拨入使用的vpngroup所分配的IP地址池 vpngroup student0 idle-time 1800 !定义vpngroup的空闲时间 vpngroup student0 password 1234 !定义vpngroup的pre-shared key telnet 192.168.100.9 255.255.255.0 inside telnet timeout 5 ssh 192.168.100.9 255.255.255.255 inside ssh timeout 20 terminal width 80 username vpnuser password vpnuser !在PIX上创建一个用户,用户名密码都为vpnuser Cryptochecksum:693b87faa42d062c2848346a3a0acb43 pixfirewall# VPN client版本为4.0.5,先在Connection Entries里创建一个连接,在最上面填入。 Connection Entry:vpnpeer1 Description:test Host:218.218.218.218 在Authentication里的GROUP Authentication里填入。 Name:student0 #就是vpngroup name Password:1234 #就是vpngroup password Confirm Password:1234 name和password要和PIX中的vpngroup和key一致。 在vpn client进行连接的时候会有一个窗口弹出,要输入用户名和密码,输入vpnuser就可以了。 (责任编辑:IT) |