收藏 分销(赏)

GRE和IPSec结合案例.doc

上传人:仙人****88 文档编号:9447508 上传时间:2025-03-26 格式:DOC 页数:26 大小:201KB
下载 相关 举报
GRE和IPSec结合案例.doc_第1页
第1页 / 共26页
GRE和IPSec结合案例.doc_第2页
第2页 / 共26页
点击查看更多>>
资源描述
GRE over IPsec & IPsec over GRE IPSec -Over-GRE是先ipsec后gre, GRE -Over-IPSec 是先gre后ipsec,也就是说ipsec是最后的承载方式。一般常用的就是这种,解决了ipsec不支持多播的问题。 IPsec over GRE 和GRE over IPsec在配置上的区别:                           GRE over IPsec     IPsec over GRE ACL定义:       GRE数据流         内网数据流 IKE Peer中remote-address  对方公网地        对方GRE Tunnel地址 应用端口:          公网出          GRE Tunnel上 GRE over IPSEC(传输模式): IPSEC封装GRE 好处:可以利用GRE封装组播或广播了以及非IP流量,因为如果不使用GRE的话,IPSEC是传不了组播或广播IP流量的   IPSEC over GRE(里外)(tunel模式) IPSEC over GRE:GRE在IPSEC外面,由GRE来封装IPSEC注意!!!IPSEC over GRE的时候,路由协议流量是明文的 注意!!!当指的peer是对等体物理接口地址的时候不是IPSEC over GRE,只有当peer是对等体的tunnel口是才是真正的IPSEC over GRE SecPath防火墙GRE over IPSec+ospf的典型配置   一、 组网需求: 两个Peer分别使用的是SecPath1000F,中间公网使用一台SecPath100F起连接作用,两局域网分别使用的是SecPath1000F的LoopBack0口来模拟。在两个Peer上配置GRE over IPSec,使两个局域网能够穿越公网进行通信,并且保护一切传输的数据。   二、 组网图    SecPath1000F:版本为Version 3.40, ESS 1622;   三、 配置步骤   1.SecPath1000F(左)的主要配置:   sysname fw1 #  router id 10.1.1.1   #  firewall packet-filter enable  firewall packet-filter default permit # ike proposal 10   //设置IKE的策略  authentication-algorithm md5  //选择md5算法来进行验证(验证方式为预共享密钥,密钥交换为DH:group1,因为此两项均为缺省设置,故没有显示在dis cu 中,特此说明)  sa duration 1500  //设置IKE的生存周期为1500s # ike peer wanxin  //设置预共享密钥的认证字  pre-shared-key h3c   //密钥为:h3c(对端也必须一样)  remote-address 202.103.1.1  //设置对端地址 # ipsec proposal wanxin  //创建一个名为“wanxin”的安全提议 encapsulation-mode transport   //报文封装采用传输模式(安全协议采用esp,认证算法采用sha1,此两项均为缺省设置,故也没有显示在dis cu 中) # ipsec policy 1 10 isakmp   //创建安全策略,协商方式为自动协商,也就是采用IKE的策略协商  security acl 3000  //引用下面设置的acl 3000  ike-peer wanxin   //引用上面设置的“ike peer wanxin”  proposal wanxin   //引用上面设置的“ipsec proposal wanxin”  sa duration time-based 1500  //设置基于时间的生存周期为1500s # acl number 3000  //创建加密数据流(加密的是两Peer出口的网段,这个很关键)  rule 1 permit gre source 192.168.1.0 0.0.0.255 destination 202.103.1.0 0.0.0.255  rule 2 deny ip # interface GigabitEthernet0/0  ip address 192.168.1.1 255.255.255.0  ipsec policy 1  //在出接口上应用安全策略(只有应用了IPSec才能生效) # interface Tunnel0  //创建GRE隧道  ip address 1.1.1.1 255.255.255.0  source 192.168.1.1  destination 202.103.1.1 # interface LoopBack0  //用一个回环口地址带模拟一个LAN地址  ip address 10.1.1.1 255.255.255.0 # firewall zone untrust  add interface GigabitEthernet0/0  add interface Tunnel0  //切记隧道接口也需要加入某一个域  set priority 85 # ospf 1  //使用OSPF来保证两LAN之间能路由  area 0.0.0.0   network 1.1.1.0 0.0.0.255   network 10.1.1.0 0.0.0.255 #  ip route-static 0.0.0.0 0.0.0.0 192.168.1.2 preference 60  //保证两Peer之间能够通信,从而协商IPSec参数,同时也触发加密流量   2.SecPath1000F(Peer2)的主要配置:           注:Peer2的配置与Peer1基本相同,故注释同上 sysname fw2 #  router id 10.2.2.2 #  firewall packet-filter enable  firewall packet-filter default permit # ike proposal 10  authentication-algorithm md5  sa duration 1500 # ike peer wanxin  pre-shared-key h3c  remote-address 192.168.1.1 # ipsec proposal wanxin encapsulation-mode transport # ipsec policy 1 10 isakmp  security acl 3000  ike-peer wanxin  proposal wanxin  sa duration time-based 1500 # acl number 3000  rule 1 permit gre source 202.103.1.0 0.0.0.255 destination 192.168.1.0 0.0.0.255  rule 2 deny ip # interface GigabitEthernet0/0  ip address 202.103.1.1 255.255.255.0  ipsec policy 1 # interface Tunnel0  ip address 1.1.1.2 255.255.255.0  source 202.103.1.1  destination 192.168.1.1 # interface LoopBack0  ip address 10.2.2.2 255.255.255.0 # firewall zone untrust  add interface GigabitEthernet0/0  add interface Tunnel0  set priority 5 # ospf 1  area 0.0.0.0   network 1.1.1.0 0.0.0.255   network 10.2.2.0 0.0.0.255 #  ip route-static 0.0.0.0 0.0.0.0 202.103.1.2 preference 60   3.验证结果: ping –a 10.1.1.1 10.2.2.2  //测试两LAN之间是否能通信 dis ike sa //查看IKE是否建立完成 dis ipsec sa  //查看安全联盟的信息 dis ipsec statistica //查看安全报文的统计信息   四、 配置关键点 1.Peer1与Peer2的IKE,Ipsec两阶段的安全参数必须相同; 2.配置顺序一般为: (1)两Peer之间能够相互Ping通 (2)隧道建立UP (3)路由(本例为OSPF)配置完成,确保两LAN之间能够Ping通 (4)配置IPSec 3.其他关键点见注释。 SecPath防火墙IPSec over GRE + OSPF 典型配置 一、组网需求 分部1和分部2通过野蛮IPSec的方式连接到中心,采用IPSEC -Over-GRE的方式,在tunnel上运行OSPF协议来实现总部和分部之间的互通。 二、组网图 三、典型配置 总部防火墙SecPath 1000F最终配置 center>dis cu # sysname center # ike local-name center //中心ike的local-name # router id 1.1.1.1 # firewall packet-filter enable firewall packet-filter default permit # undo connection-limit enable connection-limit default deny connection-limit default amount upper-limit 50 lower-limit 20 # firewall statistic system enable # radius scheme system # domain system # ike peer branch1 //配置到分部1的ike peer exchange-mode aggressive //设置IPSec为野蛮方式 pre-shared-key abc //预共享密钥为abc id-type name //选择ID类型为名字/ remote-name branch1 //分部1的名字为branch1 remote-address 10.1.1.2 //分部1的地址 # ike peer branch2 //配置到分部2的ike peer exchange-mode aggressive //设置IPSec为野蛮方式 pre-shared-key abc //预共享密钥为abc id-type name //选择ID类型为名字 remote-name branch2 //分部1的名字为branch1 remote-address 10.1.2.2 //分部1的地址 # ipsec proposal 1 //定义ipsec proposal # ipsec policy branch1 10 isakmp //配置到分部1的ipsec policy security acl 3000 ike-peer branch1 proposal 1 # ipsec policy branch2 10 isakmp //配置到分部2的ipsec policy security acl 3001 ike-peer branch2 proposal 1 # acl number 3000 rule 0 permit ip source 192.168.1.0 0.0.0.255 destination 192.168.2.0 0.0.0.255 acl number 3001 rule 0 permit ip source 192.168.1.0 0.0.0.255 destination 192.168.3.0 0.0.0.255 # interface Aux0 async mode flow # interface GigabitEthernet0/0 ip address 192.168.1.1 255.255.255.0 # interface GigabitEthernet0/1 ip address 202.1.1.1 255.255.255.0 # interface GigabitEthernet1/0 # interface GigabitEthernet1/1 # interface Encrypt2/0 # interface Tunnel0 //配置中心和分部1之间的GRE tunnel ip address 10.1.1.1 255.255.255.0 source 202.1.1.1 destination 202.1.1.2 ipsec policy branch1 //应用IPSec策略 # interface Tunnel1 //配置中心和分部1之间的GRE tunnel ip address 10.1.2.1 255.255.255.0 source 202.1.1.1 destination 202.1.1.3 ipsec policy branch2 //应用IPSec策略 # interface NULL0 # interface LoopBack0 ip address 1.1.1.1 255.255.255.255 # firewall zone local set priority 100 # firewall zone trust add interface GigabitEthernet0/0 add interface GigabitEthernet0/1 add interface Tunnel0 add interface Tunnel1 set priority 85 # firewall zone untrust set priority 5 # firewall zone DMZ set priority 50 # firewall interzone local trust # firewall interzone local untrust # firewall interzone local DMZ # firewall interzone trust untrust # firewall interzone trust DMZ # firewall interzone DMZ untrust # ospf 1 area 0.0.0.10 //分部1属于area 10 network 10.1.1.0 0.0.0.255 # area 0.0.0.20 //分部2属于area 20 network 10.1.2.0 0.0.0.255 # area 0.0.0.0 //总部属于area 0 network 1.1.1.1 0.0.0.0 network 192.168.1.0 0.0.0.255 # user-interface con 0 user-interface aux 0 user-interface vty 0 4 # return <center> 分部1防火墙SecPath 100F最终配置
展开阅读全文

开通  VIP会员、SVIP会员  优惠大
下载10份以上建议开通VIP会员
下载20份以上建议开通SVIP会员


开通VIP      成为共赢上传
相似文档                                   自信AI助手自信AI助手

当前位置:首页 > 教育专区 > 小学其他

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        抽奖活动

©2010-2025 宁波自信网络信息技术有限公司  版权所有

客服电话:4009-655-100  投诉/维权电话:18658249818

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :微信公众号    抖音    微博    LOFTER 

客服