L2TP over IPSEC配置实例

今天继续给大家介绍HCIE安全。本文以华为eNSP模拟器,实现了L2TP over ipsec架构配置。L2TP over IPSEC ,通常是用在当公司员工在外出差,但是需要访问公司内部网站时,单纯的L2TP技术无法保证数据的保密性,而采用L2TP over IPSEC之后就可以使得出差在外的员工访问公司内部资源时数据通信收到保护。
阅读本文,您需要对L2TP 有一定的了解,如果您对此还存在困惑,欢迎您查阅我博客内的其他文章,相信您一定会有所收获。
关于Client-Initiated L2TP配置,请参考下列文章,在该文章中有详细介绍,本文中就不过多赘述了。
L2TP 配置实例——Client-Initiated

一、实验拓扑及目的

在这里插入图片描述
实验拓扑如上所示,现在要求配置L2TP Over IPSEC,其中本地使用Vmware虚拟出一台Win7设备与路由器实现链接。虚拟机如下所示:
在这里插入图片描述

二、实验配置命令

(一)定义感兴趣流

首先,我们需要确定IPSEC的流量,这一点可以根据源端口号或者目标端口号来进行配置,相关配置命令如下:

#
acl number 3000
 rule 5 permit udp source-port eq 1701

(二)IKE 策略配置

要配置IPSCE,首先需要配置IKE相关的加密算法、认证算法、分组算法,相关配置如下:

ike proposal 1
 encryption-algorithm aes-128
 dh group2
 authentication-algorithm sha1

(三)IPSCE 策略配置

在完成上述配制后,还需要配置IPSEC相关策略,也是包括加密算法和认证算法,相关配置如下:

ipsec proposal 1
 esp authentication-algorithm sha1
 esp encryption-algorithm aes-128

(四)IKE Peer配置

在本场景中,由于对端是L2TP来链接的本端,因此对端IP地址并不确定,在配置IKE Peer的时候,相关配置命令如下:

ike peer 1
 undo version 2
 pre-shared-key huawei@123
 ike-proposal 1

(五)IPSEC模板配置

在完成上述配置后,在IPSEC模板相关配置中把上述配置整合起来,相关配置如下:

ipsec policy-template map 10
 security acl 3000
 ike-peer 1
 proposal 1
#
ipsec policy map1 10 isakmp template map

(六)安全策略配置

考虑到防火墙的特点,要完成L2TP OVER IPSEC的相关配置,就必须防火墙安全策略中放行相关的数据流量,相关配置如下:

security-policy
 rule name IPSEC
  service protocol 50
  service protocol udp destination-port 500
  action permit

三、Seco Client配置

Seco Client配置各项参数已经在本文第一张拓扑图中体现出来了,为了方便读者配置,在这里我把Seco Client的配置截图给出。
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述
在这里插入图片描述

四、实验现象

(一)配置成功后访问内网

在这里插入图片描述

(二)L2TP over IPSEC建立过程

在这里插入图片描述

(三)查看FW会话表

在这里插入图片描述

五、附录——FW设备配置相关命令

#
 l2tp enable
 l2tp domain suffix-separator @
#
 ipsec sha2 compatible enable
#
acl number 3000
 rule 5 permit udp source-port eq 1701
#
ipsec proposal 1
 esp authentication-algorithm sha1
 esp encryption-algorithm aes-128
#
ike proposal 1
 encryption-algorithm aes-128
 dh group2
 authentication-algorithm sha1
 authentication-method pre-share
 integrity-algorithm hmac-sha2-256
 prf hmac-sha2-256
#
ike peer 1
 undo version 2
 pre-shared-key %^%#RGSkE5Z6#1F&*.U=Uk3939W'9^0Tu&ynWI+O{rA0%^%#
 ike-proposal 1
#
ipsec policy-template map 10
 security acl 3000
 ike-peer 1
 proposal 1
#
ipsec policy map1 10 isakmp template map
#
ip pool test
 section 0 192.168.100.100 192.168.100.110
#
l2tp-group default-lns
l2tp-group 1
 tunnel password cipher %$%$lCJhJN&*wEm+q94jKW2U$D&q%$%$
 allow l2tp virtual-template 1 remote test
#
interface Virtual-Template1
 ppp authentication-mode chap
 remote service-scheme L2TP
 ip address 192.168.100.200 255.255.255.0
 service-manage ping permit
#
interface GigabitEthernet0/0/0
 undo shutdown
 ip binding XXX-instance default
 ip address 192.168.0.1 255.255.255.0
 alias GE0/METH
#
interface GigabitEthernet1/0/0
 undo shutdown
 ip address 155.1.11.2 255.255.255.0
 service-manage ping permit
 ipsec policy map1
#
interface GigabitEthernet1/0/1
 undo shutdown
 ip address 192.168.58.254 255.255.255.0
 service-manage ping permit
#
firewall zone trust
 set priority 85
 add interface GigabitEthernet0/0/0
 add interface GigabitEthernet1/0/1
#
firewall zone untrust
 set priority 5
 add interface GigabitEthernet1/0/0
#
firewall zone dmz
 set priority 50
 add interface Virtual-Template1
#
ip route-static 0.0.0.0 0.0.0.0 155.1.11.1
#
pki realm default
#
sa
#
right-manager server-group
security-policy
 rule name l2tp
  source-zone untrust
  destination-zone local
  service l2tp
  action permit
 rule name ping
  source-zone dmz
  destination-zone trust
  action permit
 rule name IPSEC
  service protocol 50
  service protocol udp destination-port 500
  action permit
#

原创不易,转载请说明出处:https://blog.csdn.net/weixin_40228200/article/details/119854378

  • 10
    点赞
  • 77
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

永远是少年啊

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值