from:http://lulu1101.blog.51cto.com/4455468/817954

ipsec在企业网中的应用(IKE野蛮模式)

案例:
本实验采用华为三台F100防火墙,和一台s3526交换机,实现ipsec野蛮模式下的vpn通道的建立。Fw1是总部,实现fw1可以与fw2的内部网络互访,fw1和fw3的内部网络互访。fw2和fw3通过DHCP服务器动态获取地址。
 
拓扑图:

配置: 
fw1 的配置:
 
配置ip和默认路由:
# firewall zone trust
# add interface Ethernet 0/4
# quit
# firewall zone untrust
# add interface Ethernet 0/1
# quit
 
# int e0/4
# ip add 192.168.1.1 24
# int e0/1
# ip add 192.168.10.200 24
# quit
# ip route-static 0.0.0.0 0.0.0.0 192.168.10.1
配置两个访问控制列表:
# acl number 3000
# rule permit ip source 192.168.1.0 0.0.0.255 destination 192.168.2.0 0.0.0.255
# rule deny ip source any destination any
# quit
# acl number 3001
# rule permit ip source 192.168.1.0 0.0.0.255 destination 192.168.3.0 0.0.0.255
# rule deny ip source any destination any
# quit
配置安全提议:
# ipsec proposal tran1  //创建名为tran1的安全协议
# encapsulation-mode tunnel  //报文封装形式采用隧道模式
# transform esp-new  //安全协议采用esp协议
选择加密算法和认证算法:
# esp-new encryption-algorithm des
# esp-new authentication-algorithm md5
# quit
 
# ipsec proposal tran2   //创建名为tran2的安全协议
# encapsulation-mode tunnel   //报文封装形式采用隧道模式
# transform esp-new  //安全协议采用esp协议
选择加密算法和认证算法:
# esp-new encryption-algorithm des
# esp-new authentication-algorithm md5
# quit
 
# ike local-name fw1  //配置IKE协商时的本地ID
 
创建IKE Peer并进入IKE Peer视图:
# ike peer peer1
# exchange-mode aggressive  //配置IKE协商方式为野蛮模式
# pre-shard-key simple 1234  //配置预共享密钥
# local-address 192.168.10.200  //配置本机地址
# id-type name   //配置对端ID类型
# remote-name fw2  //配置对端名称
# quit
创建IKE Peer:
# ike peer peer2  //创建IKE Peer
# exchange-mode aggressive  //配置IKE协商方式为野蛮模式
# pre-shard-key simple abcd  //配置预共享密钥
# local-address 192.168.10.200  //配置本机地址
# id-type name    //配置对端ID类型
# remote-name fw3   //配置对端名称
# quit
 
创建一条安全策略,协商方式为动态方式
# ipsec poli policy 10 isakmp
# proposal tran1   //引用安全提议
# security acl 3000   //引用访问列表
# ike-peer peer1 
# quit
 
 
创建安全策略,协商方式为动态方式
# ipsec poli policy 20 isakmp
# proposal tran2   //引用安全提议
# security acl 3001   //引用访问列表
# ike-peer peer1
# quit
 
 
在接口上应用安全策略组:
# int e0/1
# ipsec policy policy
  
###################################
fw2 的配置:
 
配置ip和默认路由:
# firewall zone trust
# add interface Ethernet 0/4
# quit
# firewall zone untrust
# add interface Ethernet 0/1
# quit
 
# int e0/4
# ip add 192.168.2.1 24
# int e0/1
# ip address dhcp-alloc  //配置dhcp动态获取地址
# quit
# ip route-static 0.0.0.0 0.0.0.0 192.168.20.1
配置两个访问控制列表:
# acl number 3000
# rule permit ip source 192.168.2.0 0.0.0.255 destination 192.168.1.0 0.0.0.255
# rule deny ip source any destination any
# quit
 
配置安全提议:
# ipsec proposal tran1  //创建名为tran1的安全协议
# encapsulation-mode tunnel  //报文封装形式采用隧道模式
# transform esp-new  //安全协议采用esp协议
选择加密算法和认证算法:
# esp-new encryption-algorithm des
# esp-new authentication-algorithm md5
# quit
 
# ike local-name fw2  //配置IKE协商时的本地ID
 
创建IKE Peer并进入IKE Peer视图:
# ike peer peer1
# exchange-mode aggressive  //配置IKE协商方式为野蛮模式
# pre-shard-key simple 1234  //配置预共享密钥
# id-type name   //配置对端ID类型
# remote-name fw1  //配置对端名称
# remote-address 192.168.10.200  //配置对端地址
# quit
 
创建一条安全策略,协商方式为动态方式
# ipsec poli policy 10 isakmp
# proposal tran1   //引用安全提议
# security acl 3000   //引用访问列表
# ike-peer peer1 
# quit
 
在接口上应用安全策略组:
# int e0/1
# ipsec policy policy
 
#################################
fw3 的配置:
 
配置ip和默认路由:
# firewall zone trust
# add interface Ethernet 0/4
# quit
# firewall zone untrust
# add interface Ethernet 0/1
# quit
 
# int e0/4
# ip add 192.168.3.1 24
# int e0/1
# ip address dhcp-alloc  //配置dhcp动态获取地址
# quit
# ip route-static 0.0.0.0 0.0.0.0 192.168.30.1
配置两个访问控制列表:
# acl number 3000
# rule permit ip source 192.168.3.0 0.0.0.255 destination 192.168.1.0 0.0.0.255
# rule deny ip source any destination any
# quit
 
配置安全提议:
# ipsec proposal tran2  //创建名为tran1的安全协议
# encapsulation-mode tunnel  //报文封装形式采用隧道模式
# transform esp-new  //安全协议采用esp协议
选择加密算法和认证算法:
# esp-new encryption-algorithm des
# esp-new authentication-algorithm md5
# quit
 
# ike local-name fw3  //配置IKE协商时的本地ID
 
创建IKE Peer并进入IKE Peer视图:
# ike peer peer2
# exchange-mode aggressive  //配置IKE协商方式为野蛮模式
# pre-shard-key simple abcd  //配置预共享密钥
# id-type name   //配置对端ID类型
# remote-address 192.168.10.200  //配置对端地址
# remote-name fw1 //配置对端名称
# quit
 
创建一条安全策略,协商方式为动态方式
# ipsec poli policy 20 isakmp
# proposal tran2   //引用安全提议
# security acl 3001   //引用访问列表
# ike-peer peer2 
# quit
 
在接口上应用安全策略组:
# int e0/1
# ipsec policy policy
########################
Switch12 的配置:
 
划分三个vlan,并加入接口:
# vlan 10 
# port e1/0/1
# vlan 20
# port e1/0/5
# vlan 30
# port e1/0/3
 
分别为vlan 10、20、30配置地址:
# interface vlan-interface 10
# ip add 192.168.10.1 255.255.255.0
 
# interface vlan-interface 20
# ip add 192.168.20.1 255.255.255.0
 
# interface vlan-interface 30
# ip add 192.168.30.1 255.255.255.0
 
配置dhcp服务:
# dhcp server ip-pool fw2
# network 192.168.20.0 mask 255.255.255.0
# quit
# dhcp server ip-pool fw3
# network 192.168.30.0 mask 255.255.255.0
# quit
 
# dhcp server enable
 

测试:

查看fw2  fw3的e/1端口获得地址信息以及dhcp服务器分配出的地址信息

1.0网段的pc分别访问2.0和3.0网段的pc:

2.0访问1.0:

3.0访问1.0:

此时可以查看它们之间建立的安全联盟信息:

fw1:

fw2:

fw3:

ipsec在企业网中的应用(IKE野蛮模式)(转)的更多相关文章

  1. 在WildFly中运行多个standalone模式的实例

      WildFly作为一款优秀的EJB容器,其前身为JBoss AS.JBoss作为一款开源的应用服务器,被广泛的应用在各种项目当中.假设我们现在有这样一个项目,他是以standalone的模式运行在 ...

  2. VMware Workstation虚拟机中的Linux通过NAT模式共享上网配置教程

    VMware Workstation虚拟机中的Linux通过NAT模式共享上网配置教程 在VMware Workstation虚拟机下面,Linux虚机要上网,一般是桥接模式,但我自己的电脑上网的环境 ...

  3. 内存中 OLTP - 常见的工作负荷模式和迁移注意事项(三)

    ----------------------------我是分割线------------------------------- 本文翻译自微软白皮书<In-Memory OLTP – Comm ...

  4. 内存中 OLTP - 常见的工作负荷模式和迁移注意事项(二)

    ----------------------------我是分割线------------------------------- 本文翻译自微软白皮书<In-Memory OLTP – Comm ...

  5. 内存中 OLTP - 常见的工作负荷模式和迁移注意事项(一)

    ----------------------------我是分割线------------------------------- 本文翻译自微软白皮书<In-Memory OLTP – Comm ...

  6. Activity中的四种启动模式

    在Android中每个界面都是一个Activity,切换界面操作其实是多个不同Activity之间的实例化操作.在Android中Activity的启动模式决定了Activity的启动运行方式. An ...

  7. CDC不同模式在ODI中体现系列之一 同步模式

    CDC不同模式在ODI中体现系列之一 同步模式 Oracle Database Change Data Capture feature 变化数据捕获是一个通称,是用来描述捕捉增量变化应用到数据存储.随 ...

  8. 详解 Java 中的三种代理模式

    代理模式 代理(Proxy)是一种设计模式,提供了对目标对象另外的访问方式;即通过代理对象访问目标对象.这样做的好处是:可以在目标对象实现的基础上,增强额外的功能操作,即扩展目标对象的功能. 这里使用 ...

  9. 协议中UART的两种模式 【转】

    转自:http://wjf88223.blog.163.com/blog/static/3516800120104179327286/ ^^…… 协议栈中UART有两种模式:1.中断2.DMA 对于这 ...

随机推荐

  1. python3 验证码图片切割

    切割前图片 切割后四个图片 代码 #coding:utf8 import os from PIL import Image,ImageDraw,ImageFile import numpy impor ...

  2. kaggle-Corporación Favorita Grocery Sales Forecasting

    https://blog.csdn.net/bitcs_zt/article/details/79256688 该项比赛1月15日就已经结赛了,但由于之后进入期末,备考花费了大量的时间,没来得及整理相 ...

  3. CHtmlEditCtrl(1) : Use CHtmlEditCtrl to Create a Simple HTML Editor

    I needed a lightweight HTML editor to generate "rich text" emails, so I decided to explore ...

  4. 这次要好好吐槽下idea呢还是SpringMVC ?

    特么的!(我为什么要骂脏话,因为这个问题弱智+不能理解) 相信很多人遇到过 org.springframework.web.servlet.PageNotFound - No mapping foun ...

  5. git 本地与服务器的同步

    如果在服务器上直接用 git init 则会自动在当前目录创建.git目录但在本地clone后修改后,不能push,这是由于git默认拒绝了push操作,需要进行设置,修改.git/config添加如 ...

  6. 面试小结之Elasticsearch篇

    https://www.cnblogs.com/luckcs/articles/7052932.html

  7. iOS 按钮拖动。

    -(void)testMove { moveBtn = [[UIButton alloc ]init]; moveBtn.frame = CGRectMake(0, 30, 60, 60); move ...

  8. jQuery的md5加密插件及其它js md5加密代码

    /** * jQuery MD5 hash algorithm function * * <code> * Calculate the md5 hash of a String * Str ...

  9. CUPS/Printer sharing

    https://wiki.archlinux.org/index.php/CUPS/Printer_sharing_(简体中文)   GNU/Linux系统间共享 在作为打印服务器的GNU/Linux ...

  10. C#实现发布订阅模式

    首先给出项目的结构 IPublish.cs的源码: namespace NsWebChat.PublishSubscribe { /// <summary> /// 发布事件基础接口 // ...