暂无评论
MER8300 作为 IPSec 服务端,实现所有 VPN 客户端互相互通完整配置
前置场景说明
MER8300 为总部 VPN 网关(固定公网 IP,IKEv2 模板接收多分支 / 远程客户端),每个 VPN 客户端各自独立内网网段,需求:
任意 VPN 客户端 A ↔ VPN 客户端 B 直接互通
客户端同时能访问总部内网、访问互联网
不通的4 个核心原因:
① 防火墙域间策略拦截 VPN 隧道互访流量;
② IPSec 策略模板未包含「客户端互访感兴趣流」;
③ 出口 NAT 未排除 VPN 网段互访流量;
④ 无路由可达对端 VPN 网段。
一、Web 界面分步配置(MER8300 可视化操作)
步骤 1:规划网段(示例)
总部内网:192.168.10.0/24
VPN 客户端 1 网段:192.168.20.0/24
VPN 客户端 2 网段:192.168.30.0/24
VPN 客户端 3 网段:192.168.40.0/24
步骤 2:新增地址对象(统一管理所有 VPN 网段)
VPN → IPSec VPN → 地址对象
HQ:192.168.10.0/24
VPN_ALL:192.168.20.0/24、192.168.30.0/24、192.168.40.0/24
步骤 3:修改 IPSec 安全策略模板(关键:增加客户端互访保护流)
VPN → IPSec VPN → IPSec 安全策略,找到你创建的策略模板(动态分支专用)
保护流原有:本端 HQ,对端 VPN_ALL(总部访问各客户端)
新增一组保护流:本端 VPN_ALL,对端 VPN_ALL
作用:让路由器识别「VPN 客户端之间互访流量」,并触发 IPSec 加密转发,否则客户端互访不进隧道直接丢弃。
步骤 4:防火墙放行 VPN 隧道互访流量(90% 不通都是这里拦截)
安全设置 → 防火墙策略,新增放行规则(LAN-VPN 域双向放行)
源地址:VPN_ALL,目的地址:VPN_ALL
服务:所有 IP,动作:允许
域:源 VPN 域、目的 VPN 域
补充放行总部与 VPN 互访:源 HQ ↔ VPN_ALL 允许
步骤 5:NAT 排除 VPN 客户端互访流量(禁止互访报文做公网转换)
高级设置 → NAT → 出站 NAT,新增不做 NAT 规则
源:VPN_ALL,目的:VPN_ALL,动作:不转换
源:HQ,目的:VPN_ALL,动作:不转换
如果不配置,客户端互访流量会被 NAT 转换成公网 IP,无法走隧道互通。
步骤 6:IKEv2 模板配套校验(动态客户端必备)
VPN → IPSec VPN → IKEv2 对等体(模板)
ID 类型:名称,所有分支统一分支 ID
开启 NAT-T、DPD,算法两端完全一致
预共享密钥统一
二、命令行完整配置(console 快速部署)
bash
运行
# 1. 地址对象
ip address-object HQ 192.168.10.0 255.255.255.0
ip address-object VPN20 192.168.20.0 255.255.255.0
ip address-object VPN30 192.168.30.0 255.255.255.0
ip address-object VPN40 192.168.40.0 255.255.255.0
# 2. ACL定义两类感兴趣流
# ACL3000:总部 ↔ 所有VPN客户端
acl number 3000
rule permit ip source address-object HQ destination address-object VPN20
rule permit ip source address-object HQ destination address-object VPN30
rule permit ip source address-object HQ destination address-object VPN40
# ACL3001:VPN客户端之间互相访问(核心!)
acl number 3001
rule permit ip source address-object VPN20 destination address-object VPN30
rule permit ip source address-object VPN20 destination address-object VPN40
rule permit ip source address-object VPN30 destination address-object VPN20
rule permit ip source address-object VPN30 destination address-object VPN40
rule permit ip source address-object VPN40 destination address-object VPN20
rule permit ip source address-object VPN40 destination address-object VPN30
# 3. IPSec策略模板同时引用两条ACL
ipsec policy-template VPN-TPL 1
transform-set IPSEC-PROP
ikev2-profile IKEV2-TPL
security acl 3000
security acl 3001
remote-address 0.0.0.0
# 4. NAT排除VPN互访流量
acl number 3999
rule deny ip source address-object VPN20 destination address-object VPN30
rule deny ip source address-object VPN20 destination address-object VPN40
rule deny ip source address-object VPN30 destination address-object VPN20
rule deny ip source address-object VPN30 destination address-object VPN40
rule deny ip source address-object VPN40 destination address-object VPN20
rule deny ip source address-object VPN40 destination address-object VPN30
rule deny ip source address-object HQ destination address-object VPN20
rule deny ip source address-object HQ destination address-object VPN30
rule deny ip source address-object HQ destination address-object VPN40
rule permit ip any any
# 公网出口应用NAT
interface GigabitEthernet 0/0
nat outbound 3999
# 5. 防火墙全局放行VPN域互访
zone vpn
zone lan
acl number 4000
rule permit ip source address-object VPN20 destination address-object VPN30
rule permit ip source address-object VPN20 destination address-object VPN40
rule permit ip source address-object VPN30 destination address-object VPN20
rule permit ip source address-object VPN30 destination address-object VPN40
rule permit ip source address-object VPN40 destination address-object VPN20
rule permit ip source address-object VPN40 destination address-object VPN30
# VPN域之间双向放行
zone-pair security source vpn destination vpn
security-filter 4000
zone-pair security source lan destination vpn
security-filter 4000
zone-pair security source vpn destination lan
security-filter 4000
三、远程客户端(分支路由器)配套必配项
每一台分支 IPSec 设备必须添加对所有其他 VPN 客户端网段的感兴趣流
以 192.168.20.0 分支为例:
本地网段:192.168.20.0
对端子网填写:192.168.10.0、192.168.30.0、192.168.40.0
NAT 排除:本地网段访问其他 VPN 网段不做出口 NAT
防火墙放行本地内网访问所有 VPN 网段
关键:分支如果只写总部网段,不写其他客户端网段,分支之间无法互通。
四、常见故障排查
1. 隧道能建立、能访问总部,但客户端之间 ping 不通
IPSec 模板缺少客户端互访 ACL(3001),流量不加密直接丢弃;
防火墙 VPN 域之间拦截,未放行互访 IP 流量;
分支侧 IPSec 策略只写了总部网段,未添加其他 VPN 客户端网段。
2. 客户端互访报文被 NAT 转换
检查出站 NAT ACL,必须 deny 所有 VPN 网段互访流量,禁止转换。
3. 客户端单向通 / 丢包
DPD 未开启,SA 老化后路由失效;
两端 IKE/IPSec 算法不匹配;
运营商拦截 ESP、UDP500/4500 端口。
五、最简落地顺序
总部 IPSec 模板新增「VPN 客户端互访保护流」;
防火墙 VPN 域双向放行所有 VPN 网段;
NAT 排除 VPN 互访流量;
每台分支 IPSec 策略添加全部其他 VPN 对端子网;
两端重启 IPSec 隧道,测试跨客户端互访。
暂无评论
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论