温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

Ipsec的配置的实现

发布时间:2020-06-13 22:30:31 来源:网络 阅读:346 作者:1092683619 栏目:安全技术

实现***的另一种协议是ipsec ,准确的说ipsec是一个多种协议组合的框架。它的实现可以分为下面四个步骤:

1. 实现数据流的筛选控制(靠acl实现控制)

2. 安全提议(实现工作模式,安全协议的选择,验证算法,若为esp协议则还要有加密算法的一致性选择)

3. 创建安全策略(acl+安全提议+ike邻居),一般策略的实现都是选择自动协商的,所以要建立ike邻居

4. 策略应用到端口

下面是此次实验的拓扑图(sw 为防火墙 isp 为交换机):

Ipsec的配置的实现

下面为isp上的一些配置:

[Quidway]sysname isp

[isp]int vlan 10

[isp-vlan10]port Ethernet 0/2

[isp-vlan10]vlan 20

[isp-vlan20]port Ethernet 0/10

[isp-vlan20]vlan 30

[isp-vlan30]port Ethernet 0/3

[isp-vlan30]vlan 40

[isp-vlan40]port Ethernet 0/20

[isp-vlan40]qu

[isp]int Vlan-interface 10

[isp-Vlan-interface10]ip add 61.130.132.2 255.255.255.252

[isp-Vlan-interface10]qu

[isp]int vlan 20

[isp-Vlan-interface20]ip add 61.130.134.2 255.255.255.252

[isp-Vlan-interface20]qu

[isp]int vlan 30

[isp-Vlan-interface30]ip add 61.130.133.2 255.255.255.252

[isp-Vlan-interface30]qu

[isp]int vlan 40

[isp-Vlan-interface40]ip add 61.130.135.2 255.255.255.252

Sw1上的一些配置:

[H3C]sysname sw1

[sw1]int eth0/0

[sw1-Ethernet0/0]ip add 192.168.1.254 24

[sw1-Ethernet0/0]int eth0/3

[sw1-Ethernet0/3]ip add 61.130.132.1 30

[sw1-Ethernet0/3]int eth 0/4

[sw1-Ethernet0/4]ip add 61.130.133.1 30

[sw1-Ethernet0/4]qu

[sw1]firewall zone trust

[sw1-zone-trust]add interface e0/0

[sw1-zone-trust]qu

[sw1]firewall zone untrust

[sw1-zone-untrust]add int e0/3    

[sw1-zone-untrust]add int e0/4

Sw3上的一些配置:

[H3C]sysname sw3

[sw3]int e0/4

[sw3-Ethernet0/4]ip add 61.130.135.1 255.255.255.252

[sw3-Ethernet0/4]int eth0/0

[sw3-Ethernet0/0]ip add 192.168.3.254 255.255.255.0

[sw3-Ethernet0/0]loopback

[sw3-Ethernet0/0]qu

[sw3]firewall zone untrust

[sw3-zone-untrust]add int e0/4

[sw3]ip route 0.0.0.0 0 61.130.135.2

Sw2上的一些配置:

[H3C]sysname sw2

[sw2]int e0/4

[sw2-Ethernet0/4]ip add 61.130.134.1 255.255.255.252

[sw2-Ethernet0/4]int e0/0

[sw2-Ethernet0/0]ip add 192.168.2.254 255.255.255.0

[sw2-Ethernet0/0]loopback

[sw2-Ethernet0/0]qu

[sw2]firewall zone untrust

[sw2-zone-untrust]add int e0/4

[sw2]ip route 0.0.0.0 0 61.130.134.2

在sw1上实现ipsec 的配置:

// 利用acl实现流筛选

[sw1]acl number 3000 match-order auto

[sw1-acl-adv-3000]rule 10 permit ip source 192.168.1.0 0.0.0.255 destination 192.168.2.0 0.0.0.255

[sw1-acl-adv-3000]rule 20 deny ip source any destination any

[sw1-acl-adv-3000]qu

// 制作安全提议

[sw1]ipsec proposal tran3

[sw1-ipsec-proposal-tran3]encapsulation-mode tunnel

[sw1-ipsec-proposal-tran3]transform esp

[sw1-ipsec-proposal-tran3]esp authentication-algorithm md5

[sw1-ipsec-proposal-tran3]esp en des

[sw1-ipsec-proposal-tran3]quit

// 配置ike邻居

[sw1]  ike peer fw3

[sw1-ike-peer-fw3]pre-shared-key simple 12345

[sw1-ike-peer-fw3]local-address 61.130.132.1

[sw1-ike-peer-fw3]remote-address 61.130.134.1

[sw1-ike-peer-fw3]qu

// 配置策略

[sw1]ipsec policy policy3 10 isakmp

[sw1-ipsec-policy-isakmp-policy3-10]security acl 3000

[sw1-ipsec-policy-isakmp-policy3-10]proposal tran3

[sw1-ipsec-policy-isakmp-policy3-10]ike-peer fw3

[sw1-ipsec-policy-isakmp-policy3-10]qu

// 应用到接口

[sw1]int eth0/3

[sw1-Ethernet0/3]ipsec policy policy3

[sw1-Ethernet0/3]qu

同样,在sw2和sw3上做同样的设置即可,要注意提议与ike pre-shared-key的一致性

结果如下:

Ipsec的配置的实现

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI