




已阅读5页,还剩24页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Wolf Security Lab 内部资料 PIX 分解试验指导Version 2.0 卷二WOLF PIX分解试验指导 software version 7.1(1) Version 2.0 卷二 作者:现任明教教主.秦柯Email:cq_ Security CCIE#13778 2006年6月21日 献 辞 献给WOLF北京安全试验室的所有讲师与学员,在我作PIX7.0实验时,他们给了我很大的支持。 - 秦柯 献给我的父亲和母亲,谢谢你们对我的鼓励和爱。献给我的老婆,我爱你。-秦柯目录1Pre-share key L2L P 2Pre-share key Remote P3RSA-sig Remote P 31 CA Server的架设 P 32 PIX7.0申请证书的过程 P 33 Remote Client申请证书的过程 P 34 RSA-sig Remote VPN的配置 P4RSA-sig L2l P 41 12.4Router证书申请过程 P 42 RSA-sig L2L VPN的配置 P5EZVPN P6Default route tunnel P 7NAT穿越技术 P8两个Client之间的互相访问 P9RRI P10.VPN全局featrue P1Pre-share key L2L拓扑图:VPN介绍:1. PIX和Outside之间建立preshare-key认证的lan to lan vpn2. 加密流量为/32到/32(通讯点)3. 加密点为PIX的outside接口(0)和Outside Router的物理口地址()路由的准备:1. inside需要知道/32(默认)的路由。2. Outside需要/32(默认)和0(直联路由)。3PIX需要/32(静态)和/32(静态)的路由。Outside的预配置:在这个分解试验中你应该掌握routervpn的基本配置Crypto isakmp policy 10 Hash md5 Authentication pre-share Group 2Crypto isakmp key cisco address 0Crypto ipsec transform-set cisco esp-des esp-md5-hmacCry map cisco 10 ipsec-isakmp Set peer 0 Set transform-set cisco Match address vpnIp access-list extended vpn Permit ip host host Inter e0 Cry map ciscoPIX的VPN配置:第一阶段策略:Isakmp policy 10 hash md5Isakmp enable outside以下是默认配置Isakmp policy 10 authentication pre-shareIsakmp policy 10 encryption desIsakmp policy 10 group 2Isakmp policy 10 lifetime 86400定义认证的key:Isakmp key cisco address Or 两种方法任选其一,建议使用第二种方法!Tunnel-group type ipsec-l2l 定义vpn类型Tunnel-group ipsec-attributes Pre-share-key ciscoTunnel-group的名字应该等于peer的地址第二阶段策略:Crypto ipsec transform-set cisco esp-des esp-md5-hmac定义感兴趣流:Access-list vpn permit host 定义crypto map:Crypto map cisco 10 ipsec-isaCrypto map cisco 10 set transform-set ciscoCrypto map cisco 10 match address vpnCrypto map cisco 10 set peer Crypto map cisco interface outside定义sysopt:放行解密后流量穿越pix,注意这个配置是默认配置,可以不敲。Sysopt connection permit-vpn6.3和7.0 L2L vpn的区别总结:17.0不需要配置nat,在6.3的时候我们需要为感兴趣流量配置nat0+acl2. 7.0用tunnel-group代替了isakmp key的配置3Sysopt在7.0里边是默认配置,6.3的时候需要手动加上2Pre-share key Remote拓扑图:VPN介绍:1. PC上的software vpn client 和PIX7.0之间建立remotevpn。2PC通过PIX分配的内部地址池的地址与inside router的/32进行vpn的通讯。路由的准备:1inside需要知道地址池的地址00-00(默认)。2. PIX需要/32(静态)和/24(默认)还有/24(默认)的路由。3Outside只需要直联/24和/24的路由。4. PC需要/24的路由,在PC上通过route add来增加PIX的VPN配置:第一阶段策略:Isakmp policy 10 hash md5Isakmp enable outside以下是默认配置Isakmp policy 10 authentication pre-shareIsakmp policy 10 encryption desIsakmp policy 10 group 2Isakmp policy 10 lifetime 86400第二阶段策略:Crypto ipsec transform-set cisco esp-des esp-md5-hmac定义动态map:Crypto dynamic-map cisco 10 set transform-set cisco定义crypto map:Crypto map cisco 10 ipsec-isakmp dynamic ciscoCrypto map cisco interface outside定义LOCAL POOL:Ip local pool cciepool 00-00定义tunnel-group:Tunnel-group ipsecgroup type ipsec-ra 定义group的名字和类型Tunnel-group ipsecgroup general-attributes Address-pool ccie-poolTunnel-group ipsecgroup ipsec-attributes Pre-shared-key cisco定义用户名和密码:Username cisco password cisco定义sysopt:放行解密后流量穿越pix,注意这个配置是默认配置,可以不敲。Sysopt connection permit-vpnTunnel split的配置:Tunnel split解决了既让用户上网又让用户通过vpn访问内部网资源的能力,通过定义一个acl的方式来向client表明那个内部网络是需要加密访问的,其它网络可以正常的明文通讯。 定义acl: Access-list split permit ip host any 格式为扩展访问控制列表,源为希望被加密访问的主机或网络目的是any。 定义group-policy: Group-policy split internal Group-policy split attributes Split-tunnel-policy tunnelspecified Split-tunnel-network-list value split 用户调用group-policy策略: User cisco attributes Vpn-group-policy split6.3和7.0 remote vpn的区别总结:17.0不需要配置nat,在6.3的时候我们需要为感兴趣流量配置nat0+acl。2. 7.0用tunnel-group代替了6.3的vpngroup。3Sysopt在7.0里边是默认配置,6.3的时候需要手动加上。4. 6.3里边必须要定义isakmp identity address,7.0没有这个必要。3RSA-sig Remote31 CA Server的架设请看录像介绍或者看12.4PKI的试验指导32 PIX7.0申请证书的过程正确的设置时间和时区:Clock time GMT +8Clock set 20:28:00 3 jun 2006定义主机和域名:Hostname test7Domain-name 产生密钥:Crypto key generate rsa usage-keys定义证书服务器: Crypto ca trustpoint CA Crl optional 定义检查crl只是一个选项,如果crl获得不了就正常服务 Enrollment url 获得证书的url(scep协议) Subject-name ou=wolfsecurity OU的定义很重要,一定要等于tunnel-group的名字,特别是client申请证书的时候。获取CA Server的证书(也叫认证证书服务器) Crypto ca authenticate CA 可以通过show crypto ca cer来确认你获得的CA Server的证书获取自己的identity的证书: Crypto ca enroll CA 在CA Server上通过crypto pki server CA info requests来看证书请求的状况,通过crypto pki server CA grant all来颁发证书。33 Remote Client申请证书的过程请看录像介绍或者看12.4PKI的试验指导34 RSA-sig Remote VPN的配置拓扑图:VPN介绍:3. PC上的software vpn client 和PIX7.0之间建立rsa-sig remotevpn。2PC通过PIX分配的内部地址池的地址与inside router的/32进行vpn的通讯。路由的准备:1inside需要知道地址池的地址00-00(默认)。4. PIX需要/32(静态)和41(直联)还有/24(默认)的路由。4. PC需要0(直联)的路由。 PIX的VPN配置:第一阶段策略:Isakmp policy 10 authentication rsa-sigIsakmp policy 10 hash md5Isakmp policy 10 group 1Isakmp enable outside以下是默认配置Isakmp policy 10 encryption desIsakmp policy 10 lifetime 86400定义isakmp identity的策略:Isakmp identity auto第二阶段策略:Crypto ipsec transform-set cisco esp-des esp-md5-hmac定义动态map:Crypto dynamic-map cisco 10 set transform-set cisco定义crypto map:Crypto map cisco 10 ipsec-isakmp dynamic ciscoCrypto map cisco interface outside定义LOCAL POOL:Ip local pool cciepool 00-00定义tunnel-group:Tunnel-group wolfsecurity type ipsec-ra 定义group的名字和类型注意tunnel-group的名字一定要等于证书里边的OUTunnel-group ipsecgroup general-attributes Address-pool ccie-poolTunnel-group ipsecgroup ipsec-attributes Trust-point CA 定义信任的CA server定义用户名和密码:Username cisco password ciscoTunnel split的配置:(和pre-share remote的配置相同)4RSA-sig L2L41 12.4Router证书申请过程请看录像介绍或者看12.4PKI的试验指导42 RSA-sig L2L VPN的配置拓扑图:VPN介绍:4. PIX和路由器12.4vs7之间建立rsa-sig认证的lan to lan vpn5. 加密流量为/32到/32(通讯点)6. 加密点为PIX的outside接口(0)和12.4vs7 Router的物理口地址(00)路由的准备:3. inside需要知道/32(默认)的路由。4. 12.4vs7需要/32(默认)和0(直联路由)。3PIX需要/32(静态)和/32(静态)的路由。Outside的预配置:在这个分解试验中你应该掌握routervpn的基本配置Crypto isakmp policy 10Crypto isakmp identity dnCrypto ipsec transform-set cisco esp-des esp-md5-hmacCry map cisco 10 ipsec-isakmp Set peer 0 Set transform-set cisco Match address vpnIp access-list extended vpn Permit ip host host Inter e0/0 Cry map ciscoPIX的VPN配置:第一阶段策略:Isakmp policy 10 authentication rsa-sigIsakmp policy 10 group 1Isakmp enable outside以下是默认配置Isakmp policy 10 encryption desIsakmp policy 10 hash shaIsakmp policy 10 lifetime 86400定义isakmp认证的策略:Isakmp identity hostname (默认配置)第二阶段策略:Crypto ipsec transform-set cisco esp-des esp-md5-hmac定义感兴趣流:Access-list 101 permit host 定义crypto map:Crypto map cisco 10 ipsec-isaCrypto map cisco 10 set transform-set ciscoCrypto map cisco 10 set trustpoint CACrypto map cisco 10 match address 101Crypto map cisco 10 set peer 00Crypto map cisco interface outside定义tunnel-group:Tunnel-group 00 type ipsec-l2lTunnel-group 00 ipsec-attributes Trust-point CA定义sysopt:放行解密后流量穿越pix,注意这个配置是默认配置,可以不敲。Sysopt connection permit-vpn5EZVPN拓扑图:Client Mode的配置: Client mode vpn 介绍:1.Outside router 和PIX7.0之间建立 client mode的ezvpn。2.Outside router 把lo0的地址转换成为(PAT)PIX分配的内部地址池的地址与inside router的/32进行vpn的通讯。 3.流量不可以从server inside router 主动发起到 outside router的lo0路由的准备:1.inside需要知道地址池的地址00-00(默认)。2.PIX需要/32(静态)和(直联)还有/24(默认)的路由。3. Outside Router需要/32(默认)和0(直联)的路由。 EZVPN Server端配置:EZVPN Server的配置和Remote VPN Server的配置基本相同 除了在ezvpn server里边必须敲上isakmp identity autoEZVPN Client端配置:Crypto ipsec client ezvpn cisco Connect manual group ipsecgroup key cisco Mode client Peer 0Interface loopback0 定义内部接口 Crypto ipsec client ezvpn cisco insideInterface ethernet0/0.3 定义外部接口 Crypto ipsec client ezvpn ciscoNetwork-extension Mode的配置: Network-extension mode vpn 介绍:1.Outside router 和PIX7.0之间建立 network-extension mode的ezvpn。2.Outside router 通过lo0的地址(内部真实的地址)与inside router的/32进行vpn的通讯。3.流量可以从server inside router 主动发起到 outside router的lo0路由的准备:1.inside需要知道Outside router lo 0的地址(内部真实的地址)。2.PIX需要/32(静态)和(直联)还有/32(默认)的路由。3. Outside Router需要/32(默认)和0(直联)的路由。 EZVPN Server端配置:EZVPN Server的配置和Remote VPN Server的配置基本相同 除了在ezvpn server里边必须敲上isakmp identity auto Group-policy split attributes Nem enable 打开network-extension modeEZVPN Client端配置:Crypto ipsec client ezvpn cisco Connect manual group ipsecgroup key cisco Mode network-extension Peer 0Interface loopback0 定义内部接口 Crypto ipsec client ezvpn cisco insideInterface ethernet0/0.3 定义外部接口 Crypto ipsec client ezvpn cisco6Default route tunnel拓扑图:试验希望达到的目的: 当PC上的remotevpn播到PIX上后可以通过一个专门为加密流量提供服务的默认路由抵达/32,这条默认路由不会为明文流量提供服务,例如:PIX本身发起的流量就不能通过这条路由抵达/32 实现的命令: Route inside 0 0 tunneled Tunneled这个关键字只是表示为加密的流量提供服务 这个时候pix是无法访问/32的,但是拨号上来的remotevpn的client能够利用这条默认路由抵达/32官方的解释:You can define a separate default route for tunneled traffic along with the standard default route. When you create a default route with the tunneled option, all encrypted traffic that arrives on the security appliance and cannot be routed using learned or static routes is sent to this route. Otherwise, if the trafficis not encrypted, the standard default route entry is used. You cannot define more than one default route with the tunneled option; ECMP for tunneled traffic is not supported.7NAT穿越技术拓扑图:Nat穿越技术解决的问题: 正常ipsec vpn产生的esp包是无法穿越pat的,因为esp没有四层的端口信息,所以无法实现pat转换。为了解决这个问题产生了nat穿越技术,nat穿越技术整体的思想就是把esp的流量封装在udp或者tcp的包里边来穿越pat设备,这样就克服了esp不能穿越pat设备的问题。7.0所支持的所有nat穿越技术: 1. ipsec-over-udp Cisco私有技术2. nat-t 标准的技术3. ipsec-over-tcp Cisco私有技术nat穿越技术的优先顺序: 1. 试验结果证明如果三个技术一起打开 ipsec-over-tcp 优先。2. 试验结果证明如果只打开 nat-t/ipsec-over-udp, nat-t优先。3. 所以nat穿越的优先顺序是 ipsec-over-tcp | nat-t | ipsec-over-udp7.0默认nat穿越技术的配置: 默认情况和vpn3000一样没有打开任何nat穿越技术,但是12.3以后的router默认是打开了nat-t功能的。Ipsec-over-udp的介绍: 技术特点: 把esp包封装在server端(7.0)预先定义的udp端口号内进行传输。 具体流量: 在启用ipsec-over-udp后,依然存在isakmp的包(6个主模式,3个快速模式,端口号为500),只是后来的esp包被封装在了server端预定义的一个特定udp端口号里边进行传输。 配置命令: Server端 Pixfirewall(config)#group-policy split attributes Pixfirewall(config-group-policy)#ipsec-udp enable Pixfirewall(config-group-policy)#ipsec-udp-port 5000 Client端 软件client端不需要额外配置Nat-t的介绍: 技术特点: 把esp包封装在4500的udp端口号内进行传输。 具体流量: 在启用nat-t后,依然存在isakmp的包(6个主模式,3个快速模式,端口号为500),只是后来的esp包被封装在了4500的udp端口号里边进行传输。 配置命令: Server端 Pixfirewall(config)#isakmp nat-traversal 20 Client端 软件client端不需要额外配置Ipsec-over-tcp的介绍: 技术特点: 把esp包封装在server端(7.0)预先定义的tcp端口号内进行传输。 具体流量: 在启用ipsec-over-tcp后,所有ipsec相关的包都被封装到了tcp的流量里边,包括isakmp和esp的包,在整个传输过程中不会出现udp/500的isakmp包。 配置命令: Server端 Pixfirewall(config)#isakmp ipsec-over-tcp port 1001 1002 1003 (up to 10) Client端 需要在transport面板里边设置ipsec-over-tcp并且需要定义一个与server端相同的端口号 IPSec over TCP TCP Port 10038两个client之间的相互访问拓扑图:两个client之间互相访问的问题: 在6.x时代两个remote vpn client之间是不能相互访问的,因为6.x内建了一条安全策略就是从一个接口进入的流量不能从相同的一个接口出去。但是到了7.x这个问题有了一个解决方法。可以通过一个命令打开相同接口互相访问的功能7.x默认的策略:7.x默认的策略和6.x一样,从一个接口进入的流量不能从相同的一个接口出去。实现命令: Same-security-traffic permit intra-interface9RRI拓扑图:试验希望达到的目的: 通过rri(反向路由注入)技术使remote vpn client播上PIX之后产生一条32位的主机路由,并在inside router和pix之间运行动态路由协议(ospf),把产生的主机路由重分布到动态路由协议当中,让inside router知道如何把返回流量送达remote vpn client。反向路由产生的格式: 产生一条32位的主机路由(对remotevpn而言) 类似于如下命令: Ip route 分配出去的IP地址 55 remoteclient的公网IP你也可以理解成为写一条目的为ipsec sa感兴趣流的目的为目的,ipsec sa的peer为下一跳的静态路由。实现的命令:pixfirewall(config)#crypto dynamic-map cisco 10 set reverse-route上面一个命令产生如下路由:pixfirewall(config)#sh routeS 00 55 1/0 via 41, outside重分布静态到ospf:Pixfirewall(config)#router ospf 1Pixfirewall(config-router)#redistribute static subnets在工程中rri解决的主要问题: rri解决主要问题的描述: rri主要和HA(高可用性)相关的featrue一起使用,如上图:一个公司有两个网关(GW1,GW2)分别与两个sp相连来提供高可用性,GW1是remote的首选拨入点,当GW1不能抵达的时候选择第二拨入点GW2。 但是这样的HA的设计引入了内部server的路由问题,当remote vpn client拨入到GW1的时候Server要通过GW1来抵达remote vpn(地址池的地址),如果GW1不能抵达,remote client拨到了GW2,这个时候server需要通过GW2来抵达remote vpn。 所以在HA vpn的情况下需要在GW1和GW2上同时启用rri,只有当remote vpn成功拨上以后才能产生32位的主机路由,这个时候在GW1和GW2同时运行内部的动态路由协议,把rri产生的主机路由重分布进入内部的动态路由协议,正确的引导流量返回remote vpn。主机rri的路由并不是同时产生的,只会在remote vpn拨上的路由器上产生,所以不会造成内部路由的混乱。RRI的格式:在拨入的设备上产生静态路由标准的静态路由的格式Ip route RRI产生的静态路由的格式ip route 10VPN全局featrue101 Disabling ISAKMP in Aggressive Mode: 官方的解释:Phase 1 ISAKMP negotiations can use either main mode or aggressive mode. Both provide the same services, but aggressive mode requires only two exchanges between the peers totaling 3 messages, rather than three exchanges totaling 6 messages. Aggressive mode is faster, but does not provide identity protection for the communicating parties. Therefore, the peers must exchange identification information prior to establishing a secure SA. Aggressive mode is enabled by default. Main mode is slower, using more exchanges, but it protects the identities of the communicating peers. Aggressive mode is faster, but does not protect the identities of the peers.实现的命令:Pixfirewall(config)# isakmp am-disable带来的一些问题:Disabling aggressive mode prevents Cisco VPN clients from using preshared key authentication to establish tunnels to the security appliance. However, they may use certificate-based authentication (that is, ASA or RSA) to establish tunnels.102 Determining an ID Method for ISAKMP Peers: 官方的解释:Address Uses the IP addresses of the hosts exchanging ISAKMP identity information. Automatic Determines ISAKMP negotiation by connection type: IP address for preshared key. Cert Distinguished Name for certificate authentication.Hostname Uses the fully qualified domain name of the hosts exchanging ISAKMP identity information (default). This name comprises the hostname and the domain name.Key ID Uses the string the remote peer uses to look up the preshared key.The default setting is hostname.实现的命令:Pixfirewall(config)# isakmp identity address | hostname | key-id id-string | autoFor example:hostname(config)# isakmp identity auto103 Enabling IPSec over NAT-T的一些问题: 官方的解释:The security appliance supports multiple IPSec peers behind a single NAT/PAT device operating in oneof the following networks, but not both: LAN-to-LAN Remote accessIn a mixed environment, the remote access tunnels fail the negotiation because all peers appear to be coming from the same public IP address, that of the NAT device. Also, remote access tunnels fail in a mixed environment because they often use the same name as the LAN-to-LAN tunnel group (that is, the IP address of the NAT device). This match can cause negotiation failures among multiple peers in a mixed LAN-to-LAN and remote access network of peers behind the NAT device.104 Enabling IPSec over NAT-T的一些问题: 官方的解释:You can schedule a security appliance reboot to occur only when all active sessions have terminated voluntarily. This feature is disabled by default.To enable waiting for all active sessions to voluntarily terminate before the security appliance reboots。实现的命令:Pixfirewall(config)# isakmp reload-wait105 isakmp disconnect-notify:官方的解释:Remote access or LAN-to-LAN sessions can drop for several reasons, such as: a security appliance shutdown or reboot, session idle timeout, maximum connection time exceeded, or administrator cut-off.The security appliance can notify qualified peers (in LAN-to-LAN configurations), Cisco VPN Clientsand VPN 3002 hardware clients of sessions that are about to be disconnected. The peer or client receiving the al
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 建设工程安全条例讲解
- 雪天令我感动的一件事250字(7篇)
- 亡羊补牢的故事400字15篇
- 基于2025年数据洞察的跨境电商海外仓风险评估与管控报告
- 房地产行业新质生产力的内涵与方向
- 事故调查程序指南讲解
- 营商环境与新质生产力对话
- 粮食企业发展新质生产力
- (正式版)DB15∕T 2674-2022 《旱作区燕麦-大豆带状间轮作技术规程》
- 央企与新质生产力发展
- 新疆G20联盟文海大联考2025-2026学年高三上学期起点物理考试题(含答案)
- 2025年高考四川卷生物真题试卷(解析版)
- 烹饪原料知识PPT完整全套教学课件
- 成功八步课件
- 玉石床垫讲稿课件
- 初中音乐七年级上册第一单元 红岩魂走进歌乐山
- 栈桥修复方案(全文)
- 某五星级酒店单项工程经济指标
- 【课件】《红烛》课件24张统编版高中语文必修上册
- 电气一次设备吊装搬运施工方案
- 公司法实施条例
评论
0/150
提交评论