组 VPNv2 服务器群集
组 VPNv2 服务器群集提供组控制器/密钥服务器 (GCKS) 冗余,因此整个组 VPN 网络不存在单点故障。
了解组 VPNv2 服务器群集
在组解释域 (GDOI) 协议中,组控制器/密钥服务器 (GCKS) 管理组 VPN 安全关联 (SA),并生成加密密钥并将其分发给组成员。组成员根据 GCKS 提供的组 SA 和密钥加密流量。如果 GCKS 失败,组成员将无法注册或获取密钥。组 VPNv2 服务器群集提供 GCKS 冗余,因此整个组 VPN 网络不存在单点故障。组 VPNv2 服务器群集还可以提供负载平衡、扩展和链路冗余。
SRX300、SRX320、SRX340、SRX345、SRX550HM、SRX1500、SRX4100、SRX4200和 SRX4600 设备和 vSRX 虚拟防火墙实例支持 VPNv2 组。组 VPNv2 服务器群集中的所有服务器都必须在 SRX 系列防火墙或 vSRX 虚拟防火墙实例上受支持。组 VPNv2 服务器群集是瞻博网络的专有解决方案,与其他供应商的 GCK 没有互操作性。
根服务器和子服务器
组 VPNv2 服务器群集由一个根服务器和最多四个连接的子服务器组成。群集中的所有服务器共享分配给组 VPNv2 成员的相同 SA 和加密密钥。群集中的服务器可以位于不同的站点,如 所示 图 1。
群集中服务器之间的消息由 IKE SA 加密和验证。根服务器负责生成加密密钥并将其分发给子服务器;由于此责任,我们建议将根服务器配置为机箱群集。子服务器是单个设备,不能是机箱群集。子服务器必须能够连接到根服务器,尽管子服务器之间的直接链接不是必需的。
如果子服务器失去与根服务器的连接,则不允许从组成员进一步连接到子服务器,并删除 SA。因此,我们建议您使用不同的链接将每个子服务器连接到根服务器。
组 VPNv2 服务器群集使用 [edit security group-vpn server group-name
] 层次结构级别的语句进行server-cluster
配置。必须为群集中的每个服务器配置以下值:
服务器角色 - 指定
root-server
或sub-server
。给定服务器可以是多个组 VPNv2 服务器群集的一部分,但它必须在所有群集中具有相同的服务器角色。不能在一个组中配置服务器根服务器角色,而在另一个组中配置子服务器角色。必须确保组 VPNv2 服务器群集在任何时候都只有一个根服务器。
IKE 网关 — 指定在 [
edit security group-vpn server ike
] 层次结构级别配置的 IKE 网关的名称。对于根服务器,IKE 网关必须是群集中的子服务器;最多可以指定四个子服务器。对于子服务器,IKE 网关必须是根服务器。根服务器和子服务器必须配置
dead-peer-detection always-send
动态(未指定)IP 地址,不能为其配置。组成员未配置失效对等方检测。
给定组中每个子服务器上 的组 VPNv2 配置必须相同。
组 VPNv2 服务器集群中的每个子服务器都作为正常的 GCKS 运行,用于注册和删除成员。成功注册会员后,注册服务器负责向会员发送更新。对于给定组,您可以配置每个子服务器可以接受的最大组 VPNv2 成员数;此数字在群集中的所有子服务器上必须相同。当子服务器达到配置的最大组 VPNv2 成员数时,它将停止响应新成员的注册请求。请参阅 负载平衡。
使用服务器群集注册组成员
组成员可以向给定组的组 VPNv2 服务器群集中的任何服务器注册,但我们建议成员仅连接到子服务器,而不连接到根服务器。每个组成员最多可以配置四个服务器地址。在组成员上配置的服务器地址可以不同。在下面显示的示例中,组成员 A 配置为子服务器 1 到 4,而成员 B 配置为子服务器 4 和 3:
组成员 A: |
组成员 B: |
|
服务器地址: |
子服务器 1 子服务器 2 子服务器 3 子服务器 4 |
子服务器 4 子服务器 3 |
在成员上配置服务器地址的顺序非常重要。组成员尝试向第一个配置的服务器注册。如果向已配置的服务器注册不成功,组成员将尝试向下一个已配置的服务器注册。
组 VPNv2 服务器集群中的每个服务器都作为普通 GCKS 运行,用于注册和删除成员。成功注册后,注册服务器负责通过交易所向 groupkey-push
会员发送更新。对于给定组,可以配置每个服务器可以接受的最大组成员数,但是对于给定组,此数字在群集中的所有服务器上必须相同。达到配置的最大组成员数后,服务器将停止响应新成员的注册请求。有关其他信息,请参阅 负载平衡 。
失效对等体检测
若要验证组 VPNv2 服务器群集中对等服务器的可用性,必须将群集中的每个服务器配置为发送失效对等方检测 (DPD) 请求,而不管是否存在传出 IPsec 流量到对等方。这是使用 [edit security group-vpn server ike gateway gateway-name
] 层次结构级别的语句配置dead-peer-detection always-send
的。
组 VPNv2 服务器群集中的活动服务器将 DPD 探测发送到服务器群集中配置的 IKE 网关。不应为组配置 DPD,因为多个组可以共享相同的对等服务器 IKE 网关配置。当 DPD 检测到服务器已关闭时,将删除该服务器的 IKE SA。所有组都将服务器标记为非活动状态,并且服务器的 DPD 已停止。
不应为组成员上的 IKE 网关配置 DPD。
当 DPD 将根服务器标记为非活动时,子服务器将停止响应新的组成员请求,但当前组成员的现有 SA 仍处于活动状态。非活动子服务器不会向组成员发送删除操作,因为 SA 可能仍然有效,并且组成员可以继续使用现有 SA。
如果 IKE SA 过期而对等服务器仍处于活动状态,DPD 将触发 IKE SA 协商。由于根服务器和子服务器都可以通过 DPD 触发 IKE SA,因此同时协商可能会导致多个 IKE SA。在这种情况下,预计不会影响服务器群集功能。
负载平衡
可以通过为组配置正确的 member-threshold
值来实现组 VPNv2 服务器群集中的负载平衡。当在服务器上注册的成员数超过该 member-threshold
值时,将拒绝该服务器上的后续成员注册。成员注册将故障转移到组成员上配置的下一台服务器,直到它到达尚未到达的 member-threshold
服务器。
配置有两个 member-threshold
限制:
对于给定组,必须在组服务器群集中的根服务器和所有子服务器上配置相同的
member-threshold
值。如果组中的成员总数超过配置member-threshold
的值,则拒绝由新成员启动的groupkey-pull
注册(服务器不发送响应)。一个服务器可以支持多个组中的成员。每个服务器都有它可以支持的最大组成员数。如果服务器达到它可以支持的最大成员数,
groupkey-pull
则即使未达到特定组的值,也会member-threshold
拒绝由新成员启动的注册。
群集中的服务器之间没有成员同步。根服务器没有关于子服务器上注册成员数的信息。每个子服务器只能显示自己的注册成员。
另请参阅
了解组 VPNv2 服务器群集限制
SRX300、SRX320、SRX340、SRX345、SRX550HM、SRX1500、SRX4100、SRX4200和 SRX4600 设备和 vSRX 虚拟防火墙实例支持 VPNv2 组。配置组 VPNv2 服务器群集时,请注意以下注意事项:
服务器身份验证不支持证书身份验证;只能配置预共享密钥。
组 VPNv2 服务器群集中的服务器之间没有配置同步。
启用组 VPNv2 服务器群集时,必须先在根服务器上完成配置,然后在子服务器上完成配置。在服务器之间手动同步配置之前,在配置更改期间可能会丢失流量。
在某些极端情况下,组 VPNv2 成员上的 SA 可能不同步。组 VPN 成员可以通过交换获取
groupkey-pull
新密钥来同步 SA。您可以使用或clear security group-vpn member group
命令手动clear security group-vpn member ipsec security-associations
清除组 VPNv2 成员上的 SA,以帮助加快恢复速度。组 VPNv2 服务器群集不支持 ISSU。
如果在组 VPNv2 成员注册期间丢失了最后一条
groupkey-pull
消息,则服务器可能会将该成员视为已注册成员,即使该成员可能会故障转移到服务器群集中的下一台服务器也是如此。在这种情况下,同一成员可能看起来已在多个服务器上注册。如果所有服务器上的总成员阈值等于已部署成员的总数,则后续组成员可能无法注册。
请注意根服务器上机箱群集操作的以下注意事项:
不保留任何统计信息。
不会保存任何协商数据或状态。如果在 OR
groupkey-pull
groupkey-push
协商期间发生根服务器机箱群集故障切换,则故障切换后不会重新启动协商。如果根服务器的两个机箱群集节点在重新生成加密密钥期间关闭,则某些组 VPNv2 成员可能会收到新密钥,而其他成员则不会。流量可能会受到影响。当根服务器可访问时,使用 or
clear security group-vpn member group
命令手动clear security group-vpn member ipsec security-associations
清除组 VPNv2 成员上的 SA 可能有助于加快恢复速度。在大规模环境中,根服务器上的 RG0 故障转移可能需要一些时间。如果子服务器上的 DPD 间隔和阈值配置了较小的值,则可能导致子服务器在 RG0 故障转移期间将根服务器标记为非活动状态。流量可能会受到影响。建议为子服务器配置 DPD
interval
*threshold
值大于 150 秒的 IKE 网关。
了解组 VPNv2 服务器群集消息
SRX300、SRX320、SRX340、SRX345、SRX550HM、SRX1500、SRX4100、SRX4200和 SRX4600 设备和 vSRX 虚拟防火墙实例支持 VPNv2 组。组 VPNv2 服务器群集中服务器之间的所有消息都通过 IKE 安全关联 (SA) 进行加密和身份验证。每个子服务器使用根服务器启动 IKE SA;必须先建立此 IKE SA,然后才能在服务器之间交换消息。
本节介绍根服务器和子服务器之间交换的消息。
集群初始化交换
子服务器启动与根服务器的集群初始化 (cluster-init
) 交换,以获取 SA 和加密密钥信息。根服务器通过交换将 cluster-init
当前 SA 信息发送到子服务器进行响应。
然后, groupkey-pull
子服务器可以通过交换响应组 VPNv2 成员的注册请求。交换 groupkey-pull
允许组 VPNv2 成员从子服务器请求组共享的 SA 和密钥。
子服务器在以下情况下开始 cluster-init
与根服务器交换:
根服务器被视为非活动状态。这是根服务器的初始假定状态。如果根服务器和子服务器之间没有 IKE SA,则子服务器会向根服务器启动 IKE SA。交换成功
cluster-init
后,子服务器获取有关 SA 的信息,并将根服务器标记为活动。SA 的软生存期已过期。
收到删除
cluster-update
所有 SA 的消息。有组配置更改。
cluster-init
如果交换失败,子服务器每 5 秒重试一次与根服务器的交换。
群集更新消息
groupkey-push
交换是单个重新生成密钥的消息,允许组控制器/密钥服务器 (GCKS) 在现有组 SA 过期之前向成员发送组 SA 和密钥,并更新组成员身份。密钥消息是从 GCKS 发送给成员的未经请求的消息
为 SA 生成新的加密密钥后,根服务器会通过消息将 cluster-update
SA 更新发送到所有活动的子服务器。从根服务器接收到 a cluster-update
后,子服务器将安装新的 SA,并通过 将 groupkey-push
新的 SA 信息发送给其注册的组成员。
cluster-update
从根服务器发送的消息需要子服务器的确认。如果未收到来自子服务器的确认,根服务器将在配置的重新传输周期(默认值为 10 秒)重新传输。cluster-update
如果失效对等体检测 (DPD) 指示子服务器不可用,则根服务器不会重新传输。如果子服务器在收到 cluster-update
后未能更新 SA 信息,则不会发送确认,根服务器会 cluster-update
重新传输消息。
如果 SA 的软生存期在从根服务器接收新 SA 之前过期,则子服务器会向根服务器发送消息 cluster-init
以获取所有 SA,并且在获得新更新之前不会向其成员发送 groupkey-push
消息。如果子服务器上的 SA 的硬生存期在接收新 SA 之前过期,则子服务器会将根服务器标记为非活动状态,删除所有已注册的组成员,并继续向根服务器发送 cluster-init
消息。
cluster-update
可以发送消息以删除 SA 或组成员;这可能是命令或配置更改的结果clear
。如果子服务器收到 cluster-update
删除 SA 的消息,则会向其组成员发送 groupkey-push
删除消息并删除相应的 SA。如果删除了组的所有 SA,子服务器将 cluster-init
启动与根服务器的交换。如果删除所有已注册的成员,子服务器将删除所有本地注册的成员。
了解组 VPNv2 服务器群集的配置更改
SRX300、SRX320、SRX340、SRX345、SRX550HM、SRX1500、SRX4100、SRX4200和 SRX4600 设备和 vSRX 虚拟防火墙实例支持 VPNv2 组。当配置更改导致新的加密密钥和安全关联 (SA) 更改时,组 VPNv2 服务器群集的行为与独立组 VPNv2 服务器的行为不同。根服务器通过消息将 cluster-update
SA 更新或删除发送到子服务器。然后,子服务器向成员发送 groupkey-push
消息。子服务器如果不先从根服务器接收删除消息,则无法向组成员发送删除消息。
所有配置更改必须首先在根服务器上进行,然后在子服务器上进行,以确保组成员按预期接收更新或删除。在 VPNv2 组服务器群集中的服务器之间同步配置之前,流量可能会丢失。
表 1 描述各种配置更改对组 VPNv2 服务器的影响。
配置更改 |
独立组 VPNv2 服务器操作 |
组 VPNv2 服务器群集操作 |
|
---|---|---|---|
根服务器 |
子服务器 |
||
更改 IKE 提议、策略或网关 |
删除受影响网关的 IKE SA。对于 IKE 提议、策略或网关删除,请删除受影响网关的注册成员。 |
||
更改 IPsec 提议 |
更改将在流量加密密钥 (TEK) 重新生成密钥后生效。 |
||
组更改: |
|||
删除组名称 |
向群组成员发送“全部删除”。删除组中的所有 IKE SA。立即删除组中的所有密钥。删除组中的所有注册成员。 |
将“全部删除”发送到子服务器。立即删除组中的所有密钥。将所有对等方标记为非活动状态。删除子服务器 IKE SA。删除所有成员 IKE SA。 |
删除所有成员 IKE SA。立即删除组中的所有密钥。删除组中的所有注册成员。将对等方标记为非活动状态。删除对等服务器 IKE SA。 |
更改 ID |
向所有成员发送“全部删除”。删除组中的所有 IKE SA。立即删除组中的所有密钥。删除组中的所有注册成员。根据配置生成新密钥。 |
将“全部删除”发送到子服务器。删除组中的所有成员 IKE SA。立即删除组中的所有密钥。将所有对等方标记为非活动状态。删除所有对等服务器 IKE SA。根据配置生成新密钥。 |
删除组中的所有成员 IKE SA。立即删除组中的所有密钥。删除组中的所有注册成员。将对等方标记为非活动状态。删除对等服务器 IKE SA。发起新的 |
添加或删除 IKE 网关 |
添加没有变化。对于删除,请删除受影响网关的 IKE SA 和注册成员。 |
||
添加或更改防重放时间窗口 |
新值在 TEK 重新生成密钥后生效。 |
||
不添加或更改防重放 |
新值在 TEK 重新生成密钥后生效。 |
||
服务器成员通信更改: |
|||
加 |
删除所有注册会员。生成密钥加密密钥 (KEK) SA。 |
生成 KEK SA。将新的 KEK SA 发送到子服务器。删除所有成员 IKE SA。 |
删除所有注册会员。 |
改变 |
新值在 KEK 重新生成密钥后生效。 |
||
删除 |
发送删除以删除所有 KEK SA。删除 KEK SA。 |
将删除发送到子服务器。删除 KEK SA。删除所有成员 IKE SA。 |
删除 KEK SA。 |
IPsec SA: |
|||
加 |
生成新的 TEK SA。更新成员的新TEK SA。 |
生成新的 TEK SA。将新的 TEK SA 发送到子服务器。 |
无操作。 |
改变 |
新值在 TEK 重新生成密钥后生效。 如果匹配策略发生更改,则会立即删除当前 TEK,并发送删除组键推送,因为需要明确通知成员此配置已删除。 |
如果匹配策略发生更改,请将删除发送到子服务器。立即删除 TEK。 |
如果匹配策略发生更改,请立即删除 TEK。 |
删除 |
立即删除 TEK。发送删除以删除此 TEK SA。 |
将删除发送到子服务器。立即删除 TEK。 |
立即删除 TEK。 |
表 2 介绍了更改组 VPNv2 服务器群集配置的效果。
必须确保在任何时候服务器群集中只有一个根服务器。
服务器群集配置更改 |
组 VPNv2 服务器群集 |
|
---|---|---|
根服务器 |
子服务器 |
|
IKE 提议、策略或网关(集群对等方) |
对于添加,没有变化。对于更改或删除,请删除受影响对等方的 IKE SA。 |
|
服务器群集: |
||
加 |
没有。 |
向群组成员发送“全部删除”。删除组中的所有成员 IKE SA。立即删除组中的所有 TEK 和 KEK。删除组中的所有注册成员。发送到 |
更改角色 必须确保在任何时候服务器群集中只有一个根服务器。 |
将“全部删除”发送到子服务器。删除组中的所有成员 IKE SA。立即删除组中的所有 TEK 和 KEK。将所有对等方标记为非活动状态。删除所有对等服务器 IKE SA。发送到 |
重新键泰克。重新键入 KEK。将新密钥发送到子服务器。向成员发送新密钥。 |
添加对等方 |
没有。 |
|
删除对等 |
将对等方标记为非活动状态。清除对等方 IKE SA。 |
将对等方标记为非活动状态。清除 KEK。清除 TEK。清除对等方 IKE SA。 |
更改重传周期 |
没有。 |
|
删除服务器群集 |
将“全部删除”发送到子服务器。立即删除组中的所有 TEK 和 KEK。将所有对等方标记为非活动状态。删除所有对等服务器 IKE SA。根据配置生成新的 TEK 和 KEK。 |
删除组中的所有成员 IKE SA。立即删除组中的所有 TEK 和 KEK。删除组中的所有注册成员。将对等方标记为非活动状态。删除对等服务器 IKE SA。根据配置生成新的 TEK 和 KEK。 |
将独立组 VPNv2 服务器迁移到组 VPNv2 服务器群集
SRX300、SRX320、SRX340、SRX345、SRX550HM、SRX1500、SRX4100、SRX4200 和 SRX4600 系列防火墙和 vSRX 虚拟防火墙实例支持 VPNv2 组。本节介绍如何将独立组 VPNv2 服务器迁移到组 VPNv2 服务器群集。
要将独立的组 VPNv2 服务器迁移到根服务器,请执行以下操作:
强烈建议将根服务器设置为机箱群集。
要将子服务器添加到组 VPNv2 服务器群集,请执行以下操作:
在根服务器上,为子服务器配置组 VPNv2 服务器 IKE 网关和服务器群集 IKE 网关。SA 和现有成员流量不应受到影响。
在子服务器上,配置服务器群集。请记住,群集中每台服务器上的组 VPNv2 配置必须相同,但组 VPNv2 服务器 IKE 网关、群集中的服务器角色和服务器群集 IKE 网关配置除外。在子服务器上,群集中配置的服务器角色必须是
sub-server
。为根服务器配置组 VPNv2 服务器 IKE 网关和服务器群集 IKE 网关。
要从组 VPNv2 服务器群集中删除子服务器,请执行以下操作:
在根服务器上,删除子服务器的组 VPNv2 服务器 IKE 网关和服务器群集 IKE 网关配置。SA 和现有成员流量不应受到影响。
关闭子服务器的电源。
另请参阅
示例:配置组 VPNv2 服务器群集和成员
此示例说明如何配置组 VPNv2 服务器群集,以便为组 VPNv2 组成员提供组控制器/密钥服务器 (GCKS) 冗余和缩放。SRX300、SRX320、SRX340、SRX345、SRX550HM、SRX1500、SRX4100、SRX4200和 SRX4600 设备和 vSRX 虚拟防火墙实例支持 VPNv2 组。
要求
该示例使用以下硬件和软件组件:
八个受支持的 SRX 系列防火墙或运行 Junos OS 版本 15.1X49-D30 或更高版本且支持组 VPNv2 的 vSRX 虚拟防火墙实例:
两个设备或实例配置为作为机箱群集运行。机箱群集作为组 VPNv2 服务器群集中的根服务器运行。设备或实例必须具有相同的软件版本和许可证。
根服务器负责生成加密密钥并将其分发到组 VPN 服务器集群中的子服务器;由于此责任,我们建议根服务器为机箱群集。
另外四个设备或实例作为组 VPNv2 服务器群集中的子服务器运行。
另外两个设备或实例作为组 VPNv2 组成员运行。
两台受支持的 MX 系列设备,运行 Junos OS 15.1R2 或更高版本,并支持 VPNv2 组。这些设备作为组 VPNv2 组成员运行。
必须在每个 SRX 系列防火墙或 vSRX 虚拟防火墙实例上配置主机名、root 管理员密码和管理访问权限。我们建议在每个设备上也配置 NTP。
此示例中的配置侧重于组 VPNv2 操作所需的内容,具体取决于 中 图 3所示的拓扑。此处不包括某些配置,如接口、路由或机箱群集设置。例如,组 VPNv2 操作需要有效的路由拓扑,允许客户端设备通过网络到达其预期站点;此示例不涉及静态或动态路由的配置。
概述
在此示例中,组 VPNv2 网络由一个服务器群集和四个成员组成。服务器群集由一个根服务器和四个子服务器组成。其中两个成员是 SRX 系列防火墙或 vSRX 虚拟防火墙实例,另外两个成员是 MX 系列设备。
组 VPN SA 必须受第 1 阶段 SA 的保护。因此,组 VPN 配置必须包括在根服务器、子服务器和组成员上配置 IKE 第 1 阶段协商。IKE 配置说明如下。
在根服务器上:
IKE 策略
SubSrv
用于与每个子服务器建立第 1 阶段 SA。IKE 网关为每个子服务器配置了失效对等体检测 (DPD)。
服务器群集角色是
root-server
,并且每个子服务器都配置为服务器群集的 IKE 网关。
根服务器应配置为支持机箱群集操作。在此示例中,根服务器上的冗余以太网接口连接到服务器群集中的每个子服务器;未显示整个机箱群集配置。
在每个子服务器上:
配置了两个 IKE 策略:
RootSrv
用于与根服务器建立第 1 阶段 SA,并GMs
用于与每个组成员建立第 1 阶段 SA。预共享密钥用于保护根服务器和子服务器之间以及子服务器和组成员之间的第 1 阶段 SA。确保使用的预共享密钥是强密钥。在子服务器上,为 IKE 策略
RootSrv
配置的预共享密钥必须与根服务器上配置的预共享密钥匹配,为 IKE 策略GMs
配置的预共享密钥必须与组成员上配置的预共享密钥匹配。IKE 网关为根服务器配置了 DPD。此外,还为每个组成员配置了一个 IKE 网关。
服务器群集角色为
sub-server
,根服务器配置为服务器群集的 IKE 网关。
在每个组成员上:
IKE 策略
SubSrv
用于与子服务器建立第 1 阶段 SA。IKE 网关配置包括子服务器的地址。
在 SRX 系列防火墙或 vSRX 虚拟防火墙组成员上,将为将 LAN 区域作为起始区域(传入流量)并将 WAN 区域作为目标区域(传出流量)的组配置 IPsec 策略。还需要安全策略来允许 LAN 和 WAN 区域之间的流量。
必须在组服务器和组成员上配置相同的组标识符。在此示例中,组名称为 GROUP_ID-0001,组标识符为 1。服务器上配置的组策略指定将 SA 和密钥应用于 172.16.0.0/12 范围内子网之间的流量。
配置
- 配置根服务器
- 配置子服务器 1
- 配置子服务器 2
- 配置子服务器 3
- 配置子服务器 4
- 配置 GM-0001(SRX 系列防火墙或 vSRX 虚拟防火墙实例)
- 配置 GM-0002(SRX 系列防火墙或 vSRX 虚拟防火墙实例)
- 配置 GM-0003(MX 系列设备)
- 配置 GM-0004(MX 系列设备)
配置根服务器
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,将命令复制并粘贴到 [edit]
层级的 CLI 中,然后从配置模式进入 commit
。
set interfaces reth1 redundant-ether-options redundancy-group 1 set interfaces reth1 unit 0 description To_SubSrv01 set interfaces reth1 unit 0 family inet address 10.10.101.1/24 set interfaces reth2 redundant-ether-options redundancy-group 1 set interfaces reth2 unit 0 description To_SubSrv02 set interfaces reth2 unit 0 family inet address 10.10.102.1/24 set interfaces reth3 redundant-ether-options redundancy-group 1 set interfaces reth3 unit 0 description To_SubSrv03 set interfaces reth3 unit 0 family inet address 10.10.103.1/24 set interfaces reth4 redundant-ether-options redundancy-group 1 set interfaces reth4 unit 0 description To_SubSrv04 set interfaces reth4 unit 0 family inet address 10.10.104.1/24 set security zones security-zone GROUPVPN host-inbound-traffic system-services ike set security zones security-zone GROUPVPN host-inbound-traffic system-services ssh set security zones security-zone GROUPVPN host-inbound-traffic system-services ping set security zones security-zone GROUPVPN interfaces reth1.0 set security zones security-zone GROUPVPN interfaces reth2.0 set security zones security-zone GROUPVPN interfaces reth3.0 set security zones security-zone GROUPVPN interfaces reth4.0 set security policies global policy 1000 match source-address any set security policies global policy 1000 match destination-address any set security policies global policy 1000 match application any set security policies global policy 1000 match from-zone any set security policies global policy 1000 match to-zone any set security policies global policy 1000 then deny set security policies global policy 1000 then log session-init set security policies global policy 1000 then count set security policies default-policy deny-all set chassis cluster reth-count 5 set chassis cluster redundancy-group 1 node 0 priority 254 set chassis cluster redundancy-group 1 node 1 priority 1 set chassis cluster redundancy-group 0 node 0 priority 254 set chassis cluster redundancy-group 0 node 1 priority 1 set security group-vpn server ike proposal PSK-SHA256-DH14-AES256 authentication-method pre-shared-keys set security group-vpn server ike proposal PSK-SHA256-DH14-AES256 authentication-algorithm sha-256 set security group-vpn server ike proposal PSK-SHA256-DH14-AES256 dh-group group14 set security group-vpn server ike proposal PSK-SHA256-DH14-AES256 encryption-algorithm aes-256-cbc set security group-vpn server ike policy SubSrv mode main set security group-vpn server ike policy SubSrv proposals PSK-SHA256-DH14-AES256 set security group-vpn server ike policy SubSrv pre-shared-key ascii-text "$ABC123" set security group-vpn server ike gateway SubSrv01 ike-policy SubSrv set security group-vpn server ike gateway SubSrv01 address 10.16.101.1 set security group-vpn server ike gateway SubSrv01 dead-peer-detection always-send set security group-vpn server ike gateway SubSrv01 local-address 10.10.101.1 set security group-vpn server ike gateway SubSrv02 ike-policy SubSrv set security group-vpn server ike gateway SubSrv02 address 10.16.102.1 set security group-vpn server ike gateway SubSrv02 dead-peer-detection always-send set security group-vpn server ike gateway SubSrv02 local-address 10.10.102.1 set security group-vpn server ike gateway SubSrv03 ike-policy SubSrv set security group-vpn server ike gateway SubSrv03 address 10.16.103.1 set security group-vpn server ike gateway SubSrv03 dead-peer-detection always-send set security group-vpn server ike gateway SubSrv03 local-address 10.10.103.1 set security group-vpn server ike gateway SubSrv04 ike-policy SubSrv set security group-vpn server ike gateway SubSrv04 address 10.16.104.1 set security group-vpn server ike gateway SubSrv04 dead-peer-detection always-send set security group-vpn server ike gateway SubSrv04 local-address 10.10.104.1 set security group-vpn server ipsec proposal AES256-SHA256-L3600 authentication-algorithm hmac-sha-256-128 set security group-vpn server ipsec proposal AES256-SHA256-L3600 encryption-algorithm aes-256-cbc set security group-vpn server ipsec proposal AES256-SHA256-L3600 lifetime-seconds 3600 set security group-vpn server group GROUP_ID-0001 group-id 1 set security group-vpn server group GROUP_ID-0001 member-threshold 2000 set security group-vpn server group GROUP_ID-0001 server-cluster server-role root-server set security group-vpn server group GROUP_ID-0001 server-cluster ike-gateway SubSrv01 set security group-vpn server group GROUP_ID-0001 server-cluster ike-gateway SubSrv02 set security group-vpn server group GROUP_ID-0001 server-cluster ike-gateway SubSrv03 set security group-vpn server group GROUP_ID-0001 server-cluster ike-gateway SubSrv04 set security group-vpn server group GROUP_ID-0001 server-cluster retransmission-period 10 set security group-vpn server group GROUP_ID-0001 anti-replay-time-window 1000 set security group-vpn server group GROUP_ID-0001 server-member-communication communication-type unicast set security group-vpn server group GROUP_ID-0001 server-member-communication encryption-algorithm aes-256-cbc set security group-vpn server group GROUP_ID-0001 server-member-communication lifetime-seconds 7200 set security group-vpn server group GROUP_ID-0001 server-member-communication sig-hash-algorithm sha-256 set security group-vpn server group GROUP_ID-0001 ipsec-sa GROUP_ID-0001 proposal AES256-SHA256-L3600 set security group-vpn server group GROUP_ID-0001 ipsec-sa GROUP_ID-0001 match-policy 1 source 172.16.0.0/12 set security group-vpn server group GROUP_ID-0001 ipsec-sa GROUP_ID-0001 match-policy 1 destination 172.16.0.0/12 set security group-vpn server group GROUP_ID-0001 ipsec-sa GROUP_ID-0001 match-policy 1 protocol 0
分步过程
下面的示例要求您在各个配置层级中进行导航。有关操作说明,请参阅 CLI 用户指南中的在配置模式下使用 CLI 编辑器。
要配置根服务器:
配置安全区域和安全策略。
[edit interfaces] user@host# set reth1 redundant-ether-options redundancy-group 1 user@host# set reth1 unit 0 description To_SubSrv01 user@host# set reth1 unit 0 family inet address 10.10.101.1/24 user@host# set reth2 redundant-ether-options redundancy-group 1 user@host# set reth2 unit 0 description To_SubSrv02 user@host# set reth2 unit 0 family inet address 10.10.102.1/24 user@host# set reth3 redundant-ether-options redundancy-group 1 user@host# set reth3 unit 0 description To_SubSrv03 user@host# set reth3 unit 0 family inet address 10.10.103.1/24 user@host# set reth4 redundant-ether-options redundancy-group 1 user@host# set reth4 unit 0 description To_SubSrv04 user@host# set reth4 unit 0 family inet address 10.10.104.1/24 [edit security zones security-zone GROUPVPN] user@host# set host-inbound-traffic system-services ike user@host# set host-inbound-traffic system-services ssh user@host# set host-inbound-traffic system-services ping user@host# set interfaces reth1.0 user@host# set interfaces reth2.0 user@host# set interfaces reth3.0 user@host# set interfaces reth4.0 [edit security policies global] user@host# set policy 1000 match source-address any user@host# set policy 1000 match destination-address any user@host# set policy 1000 match application any user@host# set policy 1000 match from-zone any user@host# set policy 1000 match to-zone any user@host# set policy 1000 then deny user@host# set policy 1000 then log session-init user@host# set policy 1000 then count [edit security policies] user@host# set default-policy deny-all
配置机箱群集。
[edit chassis cluster] user@host# set reth-count 5 user@host# set redundancy-group 1 node 0 priority 254 user@host# set redundancy-group 1 node 1 priority 1 user@host# set redundancy-group 0 node 0 priority 254 user@host# set redundancy-group 0 node 1 priority 1
配置 IKE 提议、策略和网关。
[edit security group-vpn server ike proposal PSK-SHA256-DH14-AES256] user@host# set authentication-method pre-shared-keys user@host# set group group14 user@host# set authentication-algorithm sha-256 user@host# set encryption-algorithm aes-256-cbc [edit security group-vpn server ike policy SubSrv] user@host# set mode main user@host# set proposals PSK-SHA256-DH14-AES256 user@host# set pre-shared-key ascii-text "$ABC123" [edit security group-vpn server ike gateway SubSrv01] user@host# set ike-policy SubSrv user@host# set address 10.16.101.1 user@host# set dead-peer-detection always-send user@host# set local-address 10.10.101.1 [edit security group-vpn server ike gateway SubSrv02] user@host# set ike-policy SubSrv user@host# set address 10.16.102.1 user@host# set dead-peer-detection always-send user@host# set local-address 10.10.102.1 [edit security group-vpn server ike gateway SubSrv03] user@host# set ike-policy SubSrv user@host# set address 10.16.103.1 user@host# set dead-peer-detection always-send user@host# set local-address 10.10.103.1 [edit security group-vpn server ike gateway SubSrv04] user@host# set ike-policy SubSrv user@host# set address 10.16.104.1 user@host# set dead-peer-detection always-send user@host# set local-address 10.10.104.1
配置 IPsec SA。
[edit security group-vpn server ipsec proposal AES256-SHA256-L3600] user@host# set authentication-algorithm hmac-sha-256-128 user@host# set encryption-algorithm aes-256-cbc user@host# set lifetime-seconds 3600
配置 VPN 组。
[edit security group-vpn server group GROUP_ID-0001] user@host# set group-id 1 user@host# set member-threshold 2000 user@host# set server-cluster server-role root-server user@host# set server-cluster ike-gateway SubSrv01 user@host# set server-cluster ike-gateway SubSrv02 user@host# set server-cluster ike-gateway SubSrv03 user@host# set server-cluster ike-gateway SubSrv04 user@host# set server-cluster retransmission-period 10 user@host# set anti-replay-time-window 1000 user@host# set server-member-communication communication-type unicast user@host# set server-member-communication encryption-algorithm aes-256-cbc user@host# set server-member-communication lifetime-seconds 7200 user@host# set server-member-communication sig-hash-algorithm sha-256
配置组策略。
[edit security group-vpn server group GROUP_ID-0001] user@host# set ipsec-sa GROUP_ID-0001 match-policy 1 source 172.16.0.0/12 user@host# set ipsec-sa GROUP_ID-0001 match-policy 1 destination 172.16.0.0/12 user@host# set ipsec-sa GROUP_ID-0001 match-policy 1 protocol 0 user@host# set ipsec-sa GROUP_ID-0001 proposal AES256-SHA256-L3600
结果
在配置模式下,输入 show interfaces
、 show chassis cluster
和 show security
命令确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明,以便进行更正。
[edit] user@host# show interfaces reth1 { redundant-ether-options { redundancy-group 1; } unit 0 { description To_SubSrv01; family inet { address 10.10.101.1/24; } } } reth2 { redundant-ether-options { redundancy-group 1; } unit 0 { description To_SubSrv02; family inet { address 10.10.102.1/24; } } } reth3 { redundant-ether-options { redundancy-group 1; } unit 0 { description To_SubSrv03; family inet { address 10.10.103.1/24; } } } reth4 { redundant-ether-options { redundancy-group 1; } unit 0 { description To_SubSrv04; family inet { address 10.10.104.1/24; } } } [edit] user@host# show chassis cluster reth-count 5; redundancy-group 1 { node 0 priority 254; node 1 priority 1; } redundancy-group 0 { node 0 priority 254; node 1 priority 1; } [edit] user@host# show security group-vpn { server { ike { proposal PSK-SHA256-DH14-AES256 { authentication-method pre-shared-keys; authentication-algorithm sha-256; dh-group group14; encryption-algorithm aes-256-cbc; } policy SubSrv { mode main; proposals PSK-SHA256-DH14-AES256; pre-shared-key ascii-text "$ABC123"; ## SECRET-DATA } gateway SubSrv01 { ike-policy SubSrv; address 10.16.101.1; dead-peer-detection always-send; local-address 10.10.101.1; } gateway SubSrv02 { ike-policy SubSrv; address 10.16.102.1; dead-peer-detection always-send; local-address 10.10.102.1; } gateway SubSrv03 { ike-policy SubSrv; address 10.16.103.1; dead-peer-detection always-send; local-address 10.10.103.1; } gateway SubSrv04 { ike-policy SubSrv; address 10.16.104.1; dead-peer-detection always-send; local-address 10.10.104.1; } } ipsec { proposal AES256-SHA256-L3600 { authentication-algorithm hmac-sha-256-128; encryption-algorithm aes-256-cbc; lifetime-seconds 3600; } } group GROUP_ID-0001 { group-id 1; member-threshold 2000; server-cluster { server-role root-server; ike-gateway SubSrv01; ike-gateway SubSrv02; ike-gateway SubSrv03; ike-gateway SubSrv04; retransmission-period 10; } anti-replay-time-window 1000; server-member-communication { communication-type unicast; lifetime-seconds 7200; encryption-algorithm aes-256-cbc; sig-hash-algorithm sha-256; } ipsec-sa GROUP_ID-0001 { proposal AES256-SHA256-L3600; match-policy 1 { source 172.16.0.0/12; destination 172.16.0.0/12; protocol 0; } } } } } policies { global { policy 1000 { match { source-address any; destination-address any; application any; from-zone any; to-zone any; } then { deny; log { session-init; } count; } } } default-policy { deny-all; } } zones { security-zone GROUPVPN { host-inbound-traffic { system-services { ike; ssh; ping; } } interfaces { reth1.0; reth2.0; reth3.0; reth4.0; } } }
如果完成设备配置,请从配置模式输入 commit
。
配置子服务器 1
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,将命令复制并粘贴到 [edit]
层级的 CLI 中,然后从配置模式进入 commit
。
set interfaces ge-0/0/0 unit 0 description To_RootSrv set interfaces ge-0/0/0 unit 0 family inet address 10.16.101.1/24 set interfaces ge-0/0/1 unit 0 description To_WAN set interfaces ge-0/0/1 unit 0 family inet address 10.17.101.1/24 set security zones security-zone GROUPVPN host-inbound-traffic system-services ike set security zones security-zone GROUPVPN host-inbound-traffic system-services ssh set security zones security-zone GROUPVPN host-inbound-traffic system-services ping set security zones security-zone GROUPVPN interfaces ge-0/0/0.0 set security zones security-zone GROUPVPN interfaces ge-0/0/1.0 set security policies global policy 1000 match source-address any set security policies global policy 1000 match destination-address any set security policies global policy 1000 match application any set security policies global policy 1000 match from-zone any set security policies global policy 1000 match to-zone any set security policies global policy 1000 then deny set security policies global policy 1000 then log session-init set security policies global policy 1000 then count set security policies default-policy deny-all set security group-vpn server ike proposal PSK-SHA256-DH14-AES256 authentication-method pre-shared-keys set security group-vpn server ike proposal PSK-SHA256-DH14-AES256 dh-group group14 set security group-vpn server ike proposal PSK-SHA256-DH14-AES256 authentication-algorithm sha-256 set security group-vpn server ike proposal PSK-SHA256-DH14-AES256 encryption-algorithm aes-256-cbc set security group-vpn server ike policy RootSrv mode main set security group-vpn server ike policy RootSrv proposals PSK-SHA256-DH14-AES256 set security group-vpn server ike policy RootSrv pre-shared-key ascii-text "$ABC123" set security group-vpn server ike policy GMs mode main set security group-vpn server ike policy GMs proposals PSK-SHA256-DH14-AES256 set security group-vpn server ike policy GMs pre-shared-key ascii-text "$ABC123$ABC123" set security group-vpn server ike gateway RootSrv ike-policy RootSrv set security group-vpn server ike gateway RootSrv address 10.10.101.1 set security group-vpn server ike gateway RootSrv dead-peer-detection always-send set security group-vpn server ike gateway RootSrv local-address 10.16.101.1 set security group-vpn server ike gateway GM-0001 ike-policy GMs set security group-vpn server ike gateway GM-0001 address 10.18.101.1 set security group-vpn server ike gateway GM-0001 local-address 10.17.101.1 set security group-vpn server ike gateway GM-0002 ike-policy GMs set security group-vpn server ike gateway GM-0002 address 10.18.102.1 set security group-vpn server ike gateway GM-0002 local-address 10.17.101.1 set security group-vpn server ike gateway GM-0003 ike-policy GMs set security group-vpn server ike gateway GM-0003 address 10.18.103.1 set security group-vpn server ike gateway GM-0003 local-address 10.17.101.1 set security group-vpn server ike gateway GM-0004 ike-policy GMs set security group-vpn server ike gateway GM-0004 address 10.18.104.1 set security group-vpn server ike gateway GM-0004 local-address 10.17.101.1 set security group-vpn server ipsec proposal AES256-SHA256-L3600 authentication-algorithm hmac-sha-256-128 set security group-vpn server ipsec proposal AES256-SHA256-L3600 encryption-algorithm aes-256-cbc set security group-vpn server ipsec proposal AES256-SHA256-L3600 lifetime-seconds 3600 set security group-vpn server group GROUP_ID-0001 group-id 1 set security group-vpn server group GROUP_ID-0001 member-threshold 2000 set security group-vpn server group GROUP_ID-0001 server-cluster server-role sub-server set security group-vpn server group GROUP_ID-0001 server-cluster ike-gateway RootSrv set security group-vpn server group GROUP_ID-0001 server-cluster retransmission-period 10 set security group-vpn server group GROUP_ID-0001 ike-gateway GM-0001 set security group-vpn server group GROUP_ID-0001 ike-gateway GM-0002 set security group-vpn server group GROUP_ID-0001 ike-gateway GM-0003 set security group-vpn server group GROUP_ID-0001 ike-gateway GM-0004 set security group-vpn server group GROUP_ID-0001 anti-replay-time-window 1000 set security group-vpn server group GROUP_ID-0001 server-member-communication communication-type unicast set security group-vpn server group GROUP_ID-0001 server-member-communication encryption-algorithm aes-256-cbc set security group-vpn server group GROUP_ID-0001 server-member-communication lifetime-seconds 7200 set security group-vpn server group GROUP_ID-0001 server-member-communication sig-hash-algorithm sha-256 set security group-vpn server group GROUP_ID-0001 ipsec-sa GROUP_ID-0001 proposal AES256-SHA256-L3600 set security group-vpn server group GROUP_ID-0001 ipsec-sa GROUP_ID-0001 match-policy 1 source 172.16.0.0/12 set security group-vpn server group GROUP_ID-0001 ipsec-sa GROUP_ID-0001 match-policy 1 destination 172.16.0.0/12 set security group-vpn server group GROUP_ID-0001 ipsec-sa GROUP_ID-0001 match-policy 1 protocol 0
分步过程
下面的示例要求您在各个配置层级中进行导航。有关操作说明,请参阅 CLI 用户指南中的在配置模式下使用 CLI 编辑器。
要在组 VPNv2 服务器群集中配置子服务器,请执行以下操作:
配置接口、安全区域和安全策略。
[edit interfaces] user@host# set ge-0/0/0 unit 0 description To_RootSrv user@host# set ge-0/0/0 unit 0 family inet address 10.16.101.1/24 user@host# set ge-0/0/1 unit 0 description To_WAN user@host# set ge-0/0/1 unit 0 family inet address 10.17.101.1/24 [edit security zones security-zone GROUPVPN] user@host# set host-inbound-traffic system-services ike user@host# set host-inbound-traffic system-services ssh user@host# set host-inbound-traffic system-services ping user@host# set interfaces ge-0/0/0.0 user@host# set interfaces ge-0/0/1.0 [edit security policies global] user@host# set policy 1000 match source-address any user@host# set policy 1000 match destination-address any user@host# set policy 1000 match application any user@host# set policy 1000 match from-zone any user@host# set policy 1000 match to-zone any user@host# set policy 1000 then deny user@host# set policy 1000 then log session-init user@host# set policy 1000 then count [edit security policies] user@host# set default-policy deny-all
配置 IKE 提议、策略和网关。
[edit security group-vpn server ike proposal PSK-SHA256-DH14-AES256] user@host# set authentication-method pre-shared-keys user@host# set group group14 user@host# set authentication-algorithm sha-256 user@host# set encryption-algorithm aes-256-cbc [edit security group-vpn server ike policy RootSrv] user@host# set mode main user@host# set proposals PSK-SHA256-DH14-AES256 user@host# set pre-shared-key ascii-text "$ABC123" [edit security group-vpn server ike policy GMs] user@host# set mode main user@host# set proposals PSK-SHA256-DH14-AES256 user@host# set pre-shared-key ascii-text "$ABC123$ABC123" [edit security group-vpn server ike gateway RootSrv] user@host# set ike-policy RootSrv user@host# set address 10.10.101.1 user@host# set dead-peer-detection always-send user@host# set local-address 10.16.101.1 [edit security group-vpn server ike gateway GM-0001] user@host# set ike-policy GMs user@host# set address 10.18.101.1 user@host# set local-address 10.17.101.1 [edit security group-vpn server ike gateway GM-0002] user@host# set ike-policy GMs user@host# set address 10.18.102.1 user@host# set local-address 10.17.101.1 [edit security group-vpn server ike gateway GM-0003] user@host# set ike-policy GMs user@host# set address 10.18.103.1 user@host# set local-address 10.17.101.1 [edit security group-vpn server ike gateway GM-0004] user@host# set ike-policy GMs user@host# set address 10.18.104.1 user@host# set local-address 10.17.101.1
配置 IPsec SA。
[edit security group-vpn server ipsec proposal AES256-SHA256-L3600] user@host# set authentication-algorithm hmac-sha-256-128 user@host# set encryption-algorithm aes-256-cbc user@host# set lifetime-seconds 3600
配置 VPN 组。
[edit security group-vpn server group GROUP_ID-0001] user@host# set group-id 1 user@host# set member-threshold 2000 user@host# set server-cluster server-role sub-server user@host# set server-cluster ike-gateway RootSrv user@host# set server-cluster retransmission-period 10 user@host# set ike-gateway GM-0001 user@host# set ike-gateway GM-0002 user@host# set ike-gateway GM-0003 user@host# set ike-gateway GM-0004 user@host# set anti-replay-time-window 1000 user@host# set server-member-communication communication-type unicast user@host# set server-member-communication encryption-algorithm aes-256-cbc user@host# set server-member-communication lifetime-seconds 7200 user@host# set server-member-communication sig-hash-algorithm sha-256 user@host# set ipsec-sa GROUP_ID-0001 proposal AES256-SHA256-L3600
配置组策略。
[edit security group-vpn server group GROUP_ID-0001] user@host# set ipsec-sa GROUP_ID-0001 match-policy 1 source 172.16.0.0/12 user@host# set ipsec-sa GROUP_ID-0001 match-policy 1 destination 172.16.0.0/12 user@host# set ipsec-sa GROUP_ID-0001 match-policy 1 protocol 0
结果
在配置模式下,输入 show interfaces
和 show security
命令确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明,以便进行更正。
[edit] user@host# show interfaces ge-0/0/0 { unit 0 { description To_RootSrv; family inet { address 10.16.101.1/24; } } } ge-0/0/1 { unit 0 { description To_WAN; family inet { address 10.17.101.1/24; } } } [edit] user@host# show security group-vpn { server { ike { proposal PSK-SHA256-DH14-AES256 { authentication-method pre-shared-keys; authentication-algorithm sha-256; dh-group group14; encryption-algorithm aes-256-cbc; } policy RootSrv { mode main; proposals PSK-SHA256-DH14-AES256; pre-shared-key ascii-text "$ABC123"; ## SECRET-DATA } policy GMs { mode main; proposals PSK-SHA256-DH14-AES256; pre-shared-key ascii-text "$ABC123$ABC123"; ## SECRET-DATA } gateway RootSrv { ike-policy RootSrv; address 10.10.101.1; dead-peer-detection always-send; local-address 10.16.101.1; } gateway GM-0001 { ike-policy GMs; address 10.18.101.1; local-address 10.17.101.1; } gateway GM-0002 { ike-policy GMs; address 10.18.102.1; local-address 10.17.101.1; } gateway GM-0003 { ike-policy GMs; address 10.18.103.1; local-address 10.17.101.1; } gateway GM-0004 { ike-policy GMs; address 10.18.104.1; local-address 10.17.101.1; } } ipsec { proposal AES256-SHA256-L3600 { authentication-algorithm hmac-sha-256-128; encryption-algorithm aes-256-cbc; lifetime-seconds 3600; } } group GROUP_ID-0001 { group-id 1; member-threshold 2000; server-cluster { server-role sub-server; ike-gateway RootSrv; retransmission-period 10; } ike-gateway GM-0001; ike-gateway GM-0002; ike-gateway GM-0003; ike-gateway GM-0004; anti-replay-time-window 1000; server-member-communication { communication-type unicast; lifetime-seconds 7200; encryption-algorithm aes-256-cbc; sig-hash-algorithm sha-256; } ipsec-sa GROUP_ID-0001 { proposal AES256-SHA256-L3600; match-policy 1 { source 172.16.0.0/12; destination 172.16.0.0/12; protocol 0; } } } } } policies { global { policy 1000 { match { source-address any; destination-address any; application any; from-zone any; to-zone any; } then { deny; log { session-init; } count; } } } default-policy { deny-all; } } zones { security-zone GROUPVPN { host-inbound-traffic { system-services { ike; ssh; ping; } } interfaces { ge-0/0/0.0; ge-0/0/1.0; } } }
如果完成设备配置,请从配置模式输入 commit
。
配置子服务器 2
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,将命令复制并粘贴到 [edit]
层级的 CLI 中,然后从配置模式进入 commit
。
set interfaces ge-0/0/0 unit 0 description To_RootSrv set interfaces ge-0/0/0 unit 0 family inet address 10.16.102.1/24 set interfaces ge-0/0/1 unit 0 description To_WAN set interfaces ge-0/0/1 unit 0 family inet address 10.17.102.1/24 set security zones security-zone GROUPVPN host-inbound-traffic system-services ike set security zones security-zone GROUPVPN host-inbound-traffic system-services ssh set security zones security-zone GROUPVPN host-inbound-traffic system-services ping set security zones security-zone GROUPVPN interfaces ge-0/0/0.0 set security zones security-zone GROUPVPN interfaces ge-0/0/1.0 set security policies global policy 1000 match source-address any set security policies global policy 1000 match destination-address any set security policies global policy 1000 match application any set security policies global policy 1000 match from-zone any set security policies global policy 1000 match to-zone any set security policies global policy 1000 then deny set security policies global policy 1000 then log session-init set security policies global policy 1000 then count set security policies default-policy deny-all set security group-vpn server ike proposal PSK-SHA256-DH14-AES256 authentication-method pre-shared-keys set security group-vpn server ike proposal PSK-SHA256-DH14-AES256 dh-group group14 set security group-vpn server ike proposal PSK-SHA256-DH14-AES256 authentication-algorithm sha-256 set security group-vpn server ike proposal PSK-SHA256-DH14-AES256 encryption-algorithm aes-256-cbc set security group-vpn server ike policy RootSrv mode main set security group-vpn server ike policy RootSrv proposals PSK-SHA256-DH14-AES256 set security group-vpn server ike policy RootSrv pre-shared-key ascii-text "$ABC123" set security group-vpn server ike policy GMs mode main set security group-vpn server ike policy GMs proposals PSK-SHA256-DH14-AES256 set security group-vpn server ike policy GMs pre-shared-key ascii-text "$ABC123$ABC123" set security group-vpn server ike gateway RootSrv ike-policy RootSrv set security group-vpn server ike gateway RootSrv address 10.10.102.1 set security group-vpn server ike gateway RootSrv dead-peer-detection always-send set security group-vpn server ike gateway RootSrv local-address 10.16.102.1 set security group-vpn server ike gateway GM-0001 ike-policy GMs set security group-vpn server ike gateway GM-0001 address 10.18.101.1 set security group-vpn server ike gateway GM-0001 local-address 10.17.102.1 set security group-vpn server ike gateway GM-0002 ike-policy GMs set security group-vpn server ike gateway GM-0002 address 10.18.102.1 set security group-vpn server ike gateway GM-0002 local-address 10.17.102.1 set security group-vpn server ike gateway GM-0003 ike-policy GMs set security group-vpn server ike gateway GM-0003 address 10.18.103.1 set security group-vpn server ike gateway GM-0003 local-address 10.17.102.1 set security group-vpn server ike gateway GM-0004 ike-policy GMs set security group-vpn server ike gateway GM-0004 address 10.18.104.1 set security group-vpn server ike gateway GM-0004 local-address 10.17.102.1 set security group-vpn server ipsec proposal AES256-SHA256-L3600 authentication-algorithm hmac-sha-256-128 set security group-vpn server ipsec proposal AES256-SHA256-L3600 encryption-algorithm aes-256-cbc set security group-vpn server ipsec proposal AES256-SHA256-L3600 lifetime-seconds 3600 set security group-vpn server group GROUP_ID-0001 group-id 1 set security group-vpn server group GROUP_ID-0001 member-threshold 2000 set security group-vpn server group GROUP_ID-0001 server-cluster server-role sub-server set security group-vpn server group GROUP_ID-0001 server-cluster ike-gateway RootSrv set security group-vpn server group GROUP_ID-0001 server-cluster retransmission-period 10 set security group-vpn server group GROUP_ID-0001 ike-gateway GM-0001 set security group-vpn server group GROUP_ID-0001 ike-gateway GM-0002 set security group-vpn server group GROUP_ID-0001 ike-gateway GM-0003 set security group-vpn server group GROUP_ID-0001 ike-gateway GM-0004 set security group-vpn server group GROUP_ID-0001 anti-replay-time-window 1000 set security group-vpn server group GROUP_ID-0001 server-member-communication communication-type unicast set security group-vpn server group GROUP_ID-0001 server-member-communication encryption-algorithm aes-256-cbc set security group-vpn server group GROUP_ID-0001 server-member-communication lifetime-seconds 7200 set security group-vpn server group GROUP_ID-0001 server-member-communication sig-hash-algorithm sha-256 set security group-vpn server group GROUP_ID-0001 ipsec-sa GROUP_ID-0001 proposal AES256-SHA256-L3600 set security group-vpn server group GROUP_ID-0001 ipsec-sa GROUP_ID-0001 match-policy 1 source 172.16.0.0/12 set security group-vpn server group GROUP_ID-0001 ipsec-sa GROUP_ID-0001 match-policy 1 destination 172.16.0.0/12 set security group-vpn server group GROUP_ID-0001 ipsec-sa GROUP_ID-0001 match-policy 1 protocol 0
分步过程
下面的示例要求您在各个配置层级中进行导航。有关操作说明,请参阅 CLI 用户指南中的在配置模式下使用 CLI 编辑器。
要在组 VPNv2 服务器群集中配置子服务器,请执行以下操作:
配置接口、安全区域和安全策略。
[edit interfaces] user@host# set ge-0/0/0 unit 0 description To_RootSrv user@host# set ge-0/0/0 unit 0 family inet address 10.16.102.1/24 user@host# set ge-0/0/1 unit 0 description To_WAN user@host# set ge-0/0/1 unit 0 family inet address 10.17.102.1/24 [edit security zones security-zone GROUPVPN] user@host# set host-inbound-traffic system-services ike user@host# set host-inbound-traffic system-services ssh user@host# set host-inbound-traffic system-services ping user@host# set interfaces ge-0/0/0.0 user@host# set interfaces ge-0/0/1.0 [edit security policies global] user@host# set policy 1000 match source-address any user@host# set policy 1000 match destination-address any user@host# set policy 1000 match application any user@host# set policy 1000 match from-zone any user@host# set policy 1000 match to-zone any user@host# set policy 1000 then deny user@host# set policy 1000 then log session-init user@host# set policy 1000 then count [edit security policies] user@host# set default-policy deny-all
配置 IKE 提议、策略和网关。
[edit security group-vpn server ike proposal PSK-SHA256-DH14-AES256] user@host# set authentication-method pre-shared-keys user@host# set group group14 user@host# set authentication-algorithm sha-256 user@host# set encryption-algorithm aes-256-cbc [edit security group-vpn server ike policy RootSrv] user@host# set mode main user@host# set proposals PSK-SHA256-DH14-AES256 user@host# set pre-shared-key ascii-text "$ABC123" [edit security group-vpn server ike policy GMs] user@host# set mode main user@host# set proposals PSK-SHA256-DH14-AES256 user@host# set pre-shared-key ascii-text "$ABC123$ABC123" [edit security group-vpn server ike gateway RootSrv] user@host# set ike-policy RootSrv user@host# set address 10.10.102.1 user@host# set dead-peer-detection always-send user@host# set local-address 10.16.102.1 [edit security group-vpn server ike gateway GM-0001] user@host# set ike-policy GMs user@host# set address 10.18.101.1 user@host# set local-address 10.17.102.1 [edit security group-vpn server ike gateway GM-0002] user@host# set ike-policy GMs user@host# set address 10.18.102.1 user@host# set local-address 10.17.102.1 [edit security group-vpn server ike gateway GM-0003] user@host# set ike-policy GMs user@host# set address 10.18.103.1 user@host# set local-address 10.17.102.1 [edit security group-vpn server ike gateway GM-0004] user@host# set ike-policy GMs user@host# set address 10.18.104.1 user@host# set local-address 10.17.102.1
配置 IPsec SA。
[edit security group-vpn server ipsec proposal AES256-SHA256-L3600] user@host# set authentication-algorithm hmac-sha-256-128 user@host# set encryption-algorithm aes-256-cbc user@host# set lifetime-seconds 3600
配置 VPN 组。
[edit security group-vpn server group GROUP_ID-0001] user@host# set group-id 1 user@host# set member-threshold 2000 user@host# set server-cluster server-role sub-server user@host# set server-cluster ike-gateway RootSrv user@host# set server-cluster retransmission-period 10 user@host# set ike-gateway GM-0001 user@host# set ike-gateway GM-0002 user@host# set ike-gateway GM-0003 user@host# set ike-gateway GM-0004 user@host# set anti-replay-time-window 1000 user@host# set server-member-communication communication-type unicast user@host# set server-member-communication encryption-algorithm aes-256-cbc user@host# set server-member-communication lifetime-seconds 7200 user@host# set server-member-communication sig-hash-algorithm sha-256
配置组策略。
[edit security group-vpn server group GROUP_ID-0001] user@host# set ipsec-sa GROUP_ID-0001 match-policy 1 source 172.16.0.0/12 user@host# set ipsec-sa GROUP_ID-0001 match-policy 1 destination 172.16.0.0/12 user@host# set ipsec-sa GROUP_ID-0001 match-policy 1 protocol 0 user@host# set ipsec-sa GROUP_ID-0001 proposal AES256-SHA256-L3600
结果
在配置模式下,输入 show interfaces
和 show security
命令,以确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明,以便进行更正。
[edit] user@host# show interfaces ge-0/0/0 { unit 0 { description To_RootSrv; family inet { address 10.16.102.1/24; } } } ge-0/0/1 { unit 0 { description To_WAN; family inet { address 10.17.102.1/24; } } } [edit] user@host# show security group-vpn { server { ike { proposal PSK-SHA256-DH14-AES256 { authentication-method pre-shared-keys; authentication-algorithm sha-256; dh-group group14; encryption-algorithm aes-256-cbc; } policy RootSrv { mode main; proposals PSK-SHA256-DH14-AES256; pre-shared-key ascii-text "$ABC123"; ## SECRET-DATA } policy GMs { mode main; proposals PSK-SHA256-DH14-AES256; pre-shared-key ascii-text "$ABC123$ABC123"; ## SECRET-DATA } gateway RootSrv { ike-policy RootSrv; address 10.10.102.1; dead-peer-detection always-send; local-address 10.16.102.1; } gateway GM-0001 { ike-policy GMs; address 10.18.101.1; local-address 10.17.102.1; } gateway GM-0002 { ike-policy GMs; address 10.18.102.1; local-address 10.17.102.1; } gateway GM-0003 { ike-policy GMs; address 10.18.103.1; local-address 10.17.102.1; } gateway GM-0004 { ike-policy GMs; address 10.18.104.1; local-address 10.17.102.1; } } ipsec { proposal AES256-SHA256-L3600 { authentication-algorithm hmac-sha-256-128; encryption-algorithm aes-256-cbc; lifetime-seconds 3600; } } group GROUP_ID-0001 { group-id 1; member-threshold 2000; server-cluster { server-role sub-server; ike-gateway RootSrv; retransmission-period 10; } ike-gateway GM-0001; ike-gateway GM-0002; ike-gateway GM-0003; ike-gateway GM-0004; anti-replay-time-window 1000; server-member-communication { communication-type unicast; lifetime-seconds 7200; encryption-algorithm aes-256-cbc; sig-hash-algorithm sha-256; } ipsec-sa GROUP_ID-0001 { proposal AES256-SHA256-L3600; match-policy 1 { source 172.16.0.0/12; destination 172.16.0.0/12; protocol 0; } } } } } policies { global { policy 1000 { match { source-address any; destination-address any; application any; from-zone any; to-zone any; } then { deny; log { session-init; } count; } } } default-policy { deny-all; } } zones { security-zone GROUPVPN { host-inbound-traffic { system-services { ike; ssh; ping; } } interfaces { ge-0/0/0.0; ge-0/0/1.0; } } }
如果完成设备配置,请从配置模式输入 commit
。
配置子服务器 3
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,将命令复制并粘贴到 [edit]
层级的 CLI 中,然后从配置模式进入 commit
。
set interfaces ge-0/0/0 unit 0 description To_RootSrv set interfaces ge-0/0/0 unit 0 family inet address 10.16.103.1/24 set interfaces ge-0/0/1 unit 0 description To_WAN set interfaces ge-0/0/1 unit 0 family inet address 10.17.103.1/24 set security zones security-zone GROUPVPN host-inbound-traffic system-services ike set security zones security-zone GROUPVPN host-inbound-traffic system-services ssh set security zones security-zone GROUPVPN host-inbound-traffic system-services ping set security zones security-zone GROUPVPN interfaces ge-0/0/0.0 set security zones security-zone GROUPVPN interfaces ge-0/0/1.0 set security policies global policy 1000 match source-address any set security policies global policy 1000 match destination-address any set security policies global policy 1000 match application any set security policies global policy 1000 match from-zone any set security policies global policy 1000 match to-zone any set security policies global policy 1000 then deny set security policies global policy 1000 then log session-init set security policies global policy 1000 then count set security policies default-policy deny-all set security group-vpn server ike proposal PSK-SHA256-DH14-AES256 authentication-method pre-shared-keys set security group-vpn server ike proposal PSK-SHA256-DH14-AES256 dh-group group14 set security group-vpn server ike proposal PSK-SHA256-DH14-AES256 authentication-algorithm sha-256 set security group-vpn server ike proposal PSK-SHA256-DH14-AES256 encryption-algorithm aes-256-cbc set security group-vpn server ike policy RootSrv mode main set security group-vpn server ike policy RootSrv proposals PSK-SHA256-DH14-AES256 set security group-vpn server ike policy RootSrv pre-shared-key ascii-text "$ABC123" set security group-vpn server ike policy GMs mode main set security group-vpn server ike policy GMs proposals PSK-SHA256-DH14-AES256 set security group-vpn server ike policy GMs pre-shared-key ascii-text "$ABC123$ABC123" set security group-vpn server ike gateway RootSrv ike-policy RootSrv set security group-vpn server ike gateway RootSrv address 10.10.103.1 set security group-vpn server ike gateway RootSrv dead-peer-detection always-send set security group-vpn server ike gateway RootSrv local-address 10.16.103.1 set security group-vpn server ike gateway GM-0001 ike-policy GMs set security group-vpn server ike gateway GM-0001 address 10.18.101.1 set security group-vpn server ike gateway GM-0001 local-address 10.17.103.1 set security group-vpn server ike gateway GM-0002 ike-policy GMs set security group-vpn server ike gateway GM-0002 address 10.18.102.1 set security group-vpn server ike gateway GM-0002 local-address 10.17.103.1 set security group-vpn server ike gateway GM-0003 ike-policy GMs set security group-vpn server ike gateway GM-0003 address 10.18.103.1 set security group-vpn server ike gateway GM-0003 local-address 10.17.103.1 set security group-vpn server ike gateway GM-0004 ike-policy GMs set security group-vpn server ike gateway GM-0004 address 10.18.104.1 set security group-vpn server ike gateway GM-0004 local-address 10.17.103.1 set security group-vpn server ipsec proposal AES256-SHA256-L3600 authentication-algorithm hmac-sha-256-128 set security group-vpn server ipsec proposal AES256-SHA256-L3600 encryption-algorithm aes-256-cbc set security group-vpn server ipsec proposal AES256-SHA256-L3600 lifetime-seconds 3600 set security group-vpn server group GROUP_ID-0001 group-id 1 set security group-vpn server group GROUP_ID-0001 member-threshold 2000 set security group-vpn server group GROUP_ID-0001 server-cluster server-role sub-server set security group-vpn server group GROUP_ID-0001 server-cluster ike-gateway RootSrv set security group-vpn server group GROUP_ID-0001 server-cluster retransmission-period 10 set security group-vpn server group GROUP_ID-0001 ike-gateway GM-0001 set security group-vpn server group GROUP_ID-0001 ike-gateway GM-0002 set security group-vpn server group GROUP_ID-0001 ike-gateway GM-0003 set security group-vpn server group GROUP_ID-0001 ike-gateway GM-0004 set security group-vpn server group GROUP_ID-0001 anti-replay-time-window 1000 set security group-vpn server group GROUP_ID-0001 server-member-communication communication-type unicast set security group-vpn server group GROUP_ID-0001 server-member-communication encryption-algorithm aes-256-cbc set security group-vpn server group GROUP_ID-0001 server-member-communication lifetime-seconds 7200 set security group-vpn server group GROUP_ID-0001 server-member-communication sig-hash-algorithm sha-256 set security group-vpn server group GROUP_ID-0001 ipsec-sa GROUP_ID-0001 proposal AES256-SHA256-L3600 set security group-vpn server group GROUP_ID-0001 ipsec-sa GROUP_ID-0001 match-policy 1 source 172.16.0.0/12 set security group-vpn server group GROUP_ID-0001 ipsec-sa GROUP_ID-0001 match-policy 1 destination 172.16.0.0/12 set security group-vpn server group GROUP_ID-0001 ipsec-sa GROUP_ID-0001 match-policy 1 protocol 0
分步过程
下面的示例要求您在各个配置层级中进行导航。有关操作说明,请参阅 CLI 用户指南中的在配置模式下使用 CLI 编辑器。
要在组 VPNv2 服务器群集中配置子服务器,请执行以下操作:
配置接口、安全区域和安全策略。
[edit interfaces] user@host# set ge-0/0/0 unit 0 description To_RootSrv user@host# set ge-0/0/0 unit 0 family inet address 10.16.103.1/24 user@host# set ge-0/0/1 unit 0 description To_WAN user@host# set ge-0/0/1 unit 0 family inet address 10.17.103.1/24 [edit security zones security-zone GROUPVPN] user@host# set host-inbound-traffic system-services ike user@host# set host-inbound-traffic system-services ssh user@host# set host-inbound-traffic system-services ping user@host# set interfaces ge-0/0/0.0 user@host# set interfaces ge-0/0/1.0 [edit security policies global] user@host# set policy 1000 match source-address any user@host# set policy 1000 match destination-address any user@host# set policy 1000 match application any user@host# set policy 1000 match from-zone any user@host# set policy 1000 match to-zone any user@host# set policy 1000 then deny user@host# set policy 1000 then log session-init user@host# set policy 1000 then count [edit security policies] user@host# set default-policy deny-all
配置 IKE 提议、策略和网关。
[edit security group-vpn server ike proposal PSK-SHA256-DH14-AES256] user@host# set authentication-method pre-shared-keys user@host# set group group14 user@host# set authentication-algorithm sha-256 user@host# set encryption-algorithm aes-256-cbc [edit security group-vpn server ike policy RootSrv] user@host# set mode main user@host# set proposals PSK-SHA256-DH14-AES256 user@host# set pre-shared-key ascii-text "$ABC123" [edit security group-vpn server ike policy GMs] user@host# set mode main user@host# set proposals PSK-SHA256-DH14-AES256 user@host# set pre-shared-key ascii-text "$ABC123$ABC123" [edit security group-vpn server ike gateway RootSrv] user@host# set ike-policy RootSrv user@host# set address 10.10.103.1 user@host# set dead-peer-detection always-send user@host# set local-address 10.16.103.1 [edit security group-vpn server ike gateway GM-0001] user@host# set ike-policy GMs user@host# set address 10.18.101.1 user@host# set local-address 10.17.103.1 [edit security group-vpn server ike gateway GM-0002] user@host# set ike-policy GMs user@host# set address 10.18.102.1 user@host# set local-address 10.17.103.1 [edit security group-vpn server ike gateway GM-0003] user@host# set ike-policy GMs user@host# set address 10.18.103.1 user@host# set local-address 10.17.103.1 [edit security group-vpn server ike gateway GM-0004] user@host# set ike-policy GMs user@host# set address 10.18.104.1 user@host# set local-address 10.17.103.1
配置 IPsec SA。
[edit security group-vpn server ipsec proposal AES256-SHA256-L3600] user@host# set authentication-algorithm hmac-sha-256-128 user@host# set encryption-algorithm aes-256-cbc user@host# set lifetime-seconds 3600
配置 VPN 组。
[edit security group-vpn server group GROUP_ID-0001] user@host# set group-id 1 user@host# set member-threshold 2000 user@host# set server-cluster server-role sub-server user@host# set server-cluster ike-gateway RootSrv user@host# set server-cluster retransmission-period 10 user@host# set ike-gateway GM-0001 user@host# set ike-gateway GM-0002 user@host# set ike-gateway GM-0003 user@host# set ike-gateway GM-0004 user@host# set anti-replay-time-window 1000 user@host# set server-member-communication communication-type unicast user@host# set server-member-communication encryption-algorithm aes-256-cbc user@host# set server-member-communication lifetime-seconds 7200 user@host# set server-member-communication sig-hash-algorithm sha-256
配置组策略。
[edit security group-vpn server group GROUP_ID-0001] user@host# set ipsec-sa GROUP_ID-0001 match-policy 1 source 172.16.0.0/12 user@host# set ipsec-sa GROUP_ID-0001 match-policy 1 destination 172.16.0.0/12 user@host# set ipsec-sa GROUP_ID-0001 match-policy 1 protocol 0 user@host# set ipsec-sa GROUP_ID-0001 proposal AES256-SHA256-L3600
结果
在配置模式下,输入 show interfaces
和 show security
命令,以确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明,以便进行更正。
[edit] user@host# show interfaces ge-0/0/0 { unit 0 { description To_RootSrv; family inet { address 10.16.103.1/24; } } } ge-0/0/1 { unit 0 { description To_WAN; family inet { address 10.17.103.1/24; } } } [edit] user@host# show security group-vpn { server { ike { proposal PSK-SHA256-DH14-AES256 { authentication-method pre-shared-keys; authentication-algorithm sha-256; dh-group group14; encryption-algorithm aes-256-cbc; } policy RootSrv { mode main; proposals PSK-SHA256-DH14-AES256; pre-shared-key ascii-text "$ABC123"; ## SECRET-DATA } policy GMs { mode main; proposals PSK-SHA256-DH14-AES256; pre-shared-key ascii-text "$ABC123$ABC123"; ## SECRET-DATA } gateway RootSrv { ike-policy RootSrv; address 10.10.103.1; dead-peer-detection always-send; local-address 10.16.103.1; } gateway GM-0001 { ike-policy GMs; address 10.18.101.1; local-address 10.17.103.1; } gateway GM-0002 { ike-policy GMs; address 10.18.102.1; local-address 10.17.103.1; } gateway GM-0003 { ike-policy GMs; address 10.18.103.1; local-address 10.17.103.1; } gateway GM-0004 { ike-policy GMs; address 10.18.104.1; local-address 10.17.103.1; } } ipsec { proposal AES256-SHA256-L3600 { authentication-algorithm hmac-sha-256-128; encryption-algorithm aes-256-cbc; lifetime-seconds 3600; } } group GROUP_ID-0001 { group-id 1; member-threshold 2000; server-cluster { server-role sub-server; ike-gateway RootSrv; retransmission-period 10; } ike-gateway GM-0001; ike-gateway GM-0002; ike-gateway GM-0003; ike-gateway GM-0004; anti-replay-time-window 1000; server-member-communication { communication-type unicast; lifetime-seconds 7200; encryption-algorithm aes-256-cbc; sig-hash-algorithm sha-256; } ipsec-sa GROUP_ID-0001 { proposal AES256-SHA256-L3600; match-policy 1 { source 172.16.0.0/12; destination 172.16.0.0/12; protocol 0; } } } } } policies { global { policy 1000 { match { source-address any; destination-address any; application any; from-zone any; to-zone any; } then { deny; log { session-init; } count; } } } default-policy { deny-all; } } zones { security-zone GROUPVPN { host-inbound-traffic { system-services { ike; ssh; ping; } } interfaces { ge-0/0/0.0; ge-0/0/1.0; } } }
如果完成设备配置,请从配置模式输入 commit
。
配置子服务器 4
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,将命令复制并粘贴到 [edit]
层级的 CLI 中,然后从配置模式进入 commit
。
set interfaces ge-0/0/0 unit 0 description To_RootSrv set interfaces ge-0/0/0 unit 0 family inet address 10.16.104.1/24 set interfaces ge-0/0/1 unit 0 description To_WAN set interfaces ge-0/0/1 unit 0 family inet address 10.17.104.1/24 set security zones security-zone GROUPVPN host-inbound-traffic system-services ike set security zones security-zone GROUPVPN host-inbound-traffic system-services ssh set security zones security-zone GROUPVPN host-inbound-traffic system-services ping set security zones security-zone GROUPVPN interfaces ge-0/0/0.0 set security zones security-zone GROUPVPN interfaces ge-0/0/1.0 set security policies global policy 1000 match source-address any set security policies global policy 1000 match destination-address any set security policies global policy 1000 match application any set security policies global policy 1000 match from-zone any set security policies global policy 1000 match to-zone any set security policies global policy 1000 then deny set security policies global policy 1000 then log session-init set security policies global policy 1000 then count set security policies default-policy deny-all set security group-vpn server ike proposal PSK-SHA256-DH14-AES256 authentication-method pre-shared-keys set security group-vpn server ike proposal PSK-SHA256-DH14-AES256 dh-group group14 set security group-vpn server ike proposal PSK-SHA256-DH14-AES256 authentication-algorithm sha-256 set security group-vpn server ike proposal PSK-SHA256-DH14-AES256 encryption-algorithm aes-256-cbc set security group-vpn server ike policy RootSrv mode main set security group-vpn server ike policy RootSrv proposals PSK-SHA256-DH14-AES256 set security group-vpn server ike policy RootSrv pre-shared-key ascii-text "$ABC123" set security group-vpn server ike policy GMs mode main set security group-vpn server ike policy GMs proposals PSK-SHA256-DH14-AES256 set security group-vpn server ike policy GMs pre-shared-key ascii-text "$ABC123$ABC123" set security group-vpn server ike gateway RootSrv ike-policy RootSrv set security group-vpn server ike gateway RootSrv address 10.10.104.1 set security group-vpn server ike gateway RootSrv dead-peer-detection always-send set security group-vpn server ike gateway RootSrv local-address 10.16.104.1 set security group-vpn server ike gateway GM-0001 ike-policy GMs set security group-vpn server ike gateway GM-0001 address 10.18.101.1 set security group-vpn server ike gateway GM-0001 local-address 10.17.104.1 set security group-vpn server ike gateway GM-0002 ike-policy GMs set security group-vpn server ike gateway GM-0002 address 10.18.102.1 set security group-vpn server ike gateway GM-0002 local-address 10.17.104.1 set security group-vpn server ike gateway GM-0003 ike-policy GMs set security group-vpn server ike gateway GM-0003 address 10.18.103.1 set security group-vpn server ike gateway GM-0003 local-address 10.17.104.1 set security group-vpn server ike gateway GM-0004 ike-policy GMs set security group-vpn server ike gateway GM-0004 address 10.18.104.1 set security group-vpn server ike gateway GM-0004 local-address 10.17.104.1 set security group-vpn server ipsec proposal AES256-SHA256-L3600 authentication-algorithm hmac-sha-256-128 set security group-vpn server ipsec proposal AES256-SHA256-L3600 encryption-algorithm aes-256-cbc set security group-vpn server ipsec proposal AES256-SHA256-L3600 lifetime-seconds 3600 set security group-vpn server group GROUP_ID-0001 group-id 1 set security group-vpn server group GROUP_ID-0001 member-threshold 2000 set security group-vpn server group GROUP_ID-0001 server-cluster server-role sub-server set security group-vpn server group GROUP_ID-0001 server-cluster ike-gateway RootSrv set security group-vpn server group GROUP_ID-0001 server-cluster retransmission-period 10 set security group-vpn server group GROUP_ID-0001 ike-gateway GM-0001 set security group-vpn server group GROUP_ID-0001 ike-gateway GM-0002 set security group-vpn server group GROUP_ID-0001 ike-gateway GM-0003 set security group-vpn server group GROUP_ID-0001 ike-gateway GM-0004 set security group-vpn server group GROUP_ID-0001 anti-replay-time-window 1000 set security group-vpn server group GROUP_ID-0001 server-member-communication communication-type unicast set security group-vpn server group GROUP_ID-0001 server-member-communication encryption-algorithm aes-256-cbc set security group-vpn server group GROUP_ID-0001 server-member-communication lifetime-seconds 7200 set security group-vpn server group GROUP_ID-0001 server-member-communication sig-hash-algorithm sha-256 set security group-vpn server group GROUP_ID-0001 ipsec-sa GROUP_ID-0001 proposal AES256-SHA256-L3600 set security group-vpn server group GROUP_ID-0001 ipsec-sa GROUP_ID-0001 match-policy 1 source 172.16.0.0/12 set security group-vpn server group GROUP_ID-0001 ipsec-sa GROUP_ID-0001 match-policy 1 destination 172.16.0.0/12 set security group-vpn server group GROUP_ID-0001 ipsec-sa GROUP_ID-0001 match-policy 1 protocol 0
分步过程
下面的示例要求您在各个配置层级中进行导航。有关操作说明,请参阅 CLI 用户指南中的在配置模式下使用 CLI 编辑器。
要在组 VPNv2 服务器群集中配置子服务器,请执行以下操作:
配置接口、安全区域和安全策略。
[edit interfaces] user@host# set ge-0/0/0 unit 0 description To_RootSrv user@host# set ge-0/0/0 unit 0 family inet address 10.16.104.1/24 user@host# set ge-0/0/1 unit 0 description To_WAN user@host# set ge-0/0/1 unit 0 family inet address 10.17.104.1/24 [edit security zones security-zone GROUPVPN] user@host# set host-inbound-traffic system-services ike user@host# set host-inbound-traffic system-services ssh user@host# set host-inbound-traffic system-services ping user@host# set interfaces ge-0/0/0.0 user@host# set interfaces ge-0/0/1.0 [edit security policies global] user@host# set policy 1000 match source-address any user@host# set policy 1000 match destination-address any user@host# set policy 1000 match application any user@host# set policy 1000 match from-zone any user@host# set policy 1000 match to-zone any user@host# set policy 1000 then deny user@host# set policy 1000 then log session-init user@host# set policy 1000 then count [edit security policies] user@host# set default-policy deny-all
配置 IKE 提议、策略和网关。
[edit security group-vpn server ike proposal PSK-SHA256-DH14-AES256] user@host# set authentication-method pre-shared-keys user@host# set group group14 user@host# set authentication-algorithm sha-256 user@host# set encryption-algorithm aes-256-cbc [edit security group-vpn server ike policy RootSrv] user@host# set mode main user@host# set proposals PSK-SHA256-DH14-AES256 user@host# set pre-shared-key ascii-text "$ABC123" [edit security group-vpn server ike policy GMs] user@host# set mode main user@host# set proposals PSK-SHA256-DH14-AES256 user@host# set pre-shared-key ascii-text "$ABC123$ABC123" [edit security group-vpn server ike gateway RootSrv] user@host# set ike-policy RootSrv user@host# set address 10.10.104.1 user@host# set dead-peer-detection always-send user@host# set local-address 10.16.104.1 [edit security group-vpn server ike gateway GM-0001] user@host# set ike-policy GMs user@host# set address 10.18.101.1 user@host# set local-address 10.17.104.1 [edit security group-vpn server ike gateway GM-0002] user@host# set ike-policy GMs user@host# set address 10.18.102.1 user@host# set local-address 10.17.104.1 [edit security group-vpn server ike gateway GM-0003] user@host# set ike-policy GMs user@host# set address 10.18.103.1 user@host# set local-address 10.17.104.1 [edit security group-vpn server ike gateway GM-0004] user@host# set ike-policy GMs user@host# set address 10.18.104.1 user@host# set local-address 10.17.104.1
配置 IPsec SA。
[edit security group-vpn server ipsec proposal AES256-SHA256-L3600] user@host# set authentication-algorithm hmac-sha-256-128 user@host# set encryption-algorithm aes-256-cbc user@host# set lifetime-seconds 3600
配置 VPN 组。
[edit security group-vpn server group GROUP_ID-0001] user@host# set group-id 1 user@host# set member-threshold 2000 user@host# set server-cluster server-role sub-server user@host# set server-cluster ike-gateway RootSrv user@host# set server-cluster retransmission-period 10 user@host# set ike-gateway GM-0001 user@host# set ike-gateway GM-0002 user@host# set ike-gateway GM-0003 user@host# set ike-gateway GM-0004 user@host# set anti-replay-time-window 1000 user@host# set server-member-communication communication-type unicast user@host# set server-member-communication encryption-algorithm aes-256-cbc user@host# set server-member-communication lifetime-seconds 7200 user@host# set server-member-communication sig-hash-algorithm sha-256
配置组策略。
[edit security group-vpn server group GROUP_ID-0001] user@host# set ipsec-sa GROUP_ID-0001 match-policy 1 source 172.16.0.0/12 user@host# set ipsec-sa GROUP_ID-0001 match-policy 1 destination 172.16.0.0/12 user@host# set ipsec-sa GROUP_ID-0001 match-policy 1 protocol 0 user@host# set ipsec-sa GROUP_ID-0001 proposal AES256-SHA256-L3600
结果
在配置模式下,输入 show interfaces
和 show security
命令,以确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明,以便进行更正。
[edit] user@host# show interfaces ge-0/0/0 { unit 0 { description To_RootSrv; family inet { address 10.16.104.1/24; } } } ge-0/0/1 { unit 0 { description To_WAN; family inet { address 10.17.104.1/24; } } } [edit] user@host# show security group-vpn { server { ike { proposal PSK-SHA256-DH14-AES256 { authentication-method pre-shared-keys; authentication-algorithm sha-256; dh-group group14; encryption-algorithm aes-256-cbc; } policy RootSrv { mode main; proposals PSK-SHA256-DH14-AES256; pre-shared-key ascii-text "$ABC123"; ## SECRET-DATA } policy GMs { mode main; proposals PSK-SHA256-DH14-AES256; pre-shared-key ascii-text "$ABC123$ABC123"; ## SECRET-DATA } gateway RootSrv { ike-policy RootSrv; address 10.10.104.1; dead-peer-detection always-send; local-address 10.16.104.1; } gateway GM-0001 { ike-policy GMs; address 10.18.101.1; local-address 10.17.104.1; } gateway GM-0002 { ike-policy GMs; address 10.18.102.1; local-address 10.17.104.1; } gateway GM-0003 { ike-policy GMs; address 10.18.103.1; local-address 10.17.104.1; } gateway GM-0004 { ike-policy GMs; address 10.18.104.1; local-address 10.17.104.1; } } ipsec { proposal AES256-SHA256-L3600 { authentication-algorithm hmac-sha-256-128; encryption-algorithm aes-256-cbc; lifetime-seconds 3600; } } group GROUP_ID-0001 { group-id 1; member-threshold 2000; server-cluster { server-role sub-server; ike-gateway RootSrv; retransmission-period 10; } ike-gateway GM-0001; ike-gateway GM-0002; ike-gateway GM-0003; ike-gateway GM-0004; anti-replay-time-window 1000; server-member-communication { communication-type unicast; lifetime-seconds 7200; encryption-algorithm aes-256-cbc; sig-hash-algorithm sha-256; } ipsec-sa GROUP_ID-0001 { proposal AES256-SHA256-L3600; match-policy 1 { source 172.16.0.0/12; destination 172.16.0.0/12; protocol 0; } } } } } policies { global { policy 1000 { match { source-address any; destination-address any; application any; from-zone any; to-zone any; } then { deny; log { session-init; } count; } } } default-policy { deny-all; } } zones { security-zone GROUPVPN { host-inbound-traffic { system-services { ike; ssh; ping; } } interfaces { ge-0/0/0.0; ge-0/0/1.0; } } }
如果完成设备配置,请从配置模式输入 commit
。
配置 GM-0001(SRX 系列防火墙或 vSRX 虚拟防火墙实例)
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,将命令复制并粘贴到 [edit]
层级的 CLI 中,然后从配置模式进入 commit
。
set interfaces ge-0/0/0 unit 0 description To_LAN set interfaces ge-0/0/0 unit 0 family inet address 172.16.101.1/24 set interfaces ge-0/0/1 unit 0 description To_SubSrv set interfaces ge-0/0/1 unit 0 family inet address 10.18.101.1/24 set security zones security-zone LAN host-inbound-traffic system-services ike set security zones security-zone LAN host-inbound-traffic system-services ssh set security zones security-zone LAN host-inbound-traffic system-services ping set security zones security-zone LAN interfaces ge-0/0/0.0 set security zones security-zone WAN host-inbound-traffic system-services ike set security zones security-zone WAN host-inbound-traffic system-services ssh set security zones security-zone WAN host-inbound-traffic system-services ping set security zones security-zone WAN interfaces ge-0/0/1.0 set security address-book global address 172.16.0.0/12 172.16.0.0/12 set security policies from-zone LAN to-zone WAN policy 1 match source-address 172.16.0.0/12 set security policies from-zone LAN to-zone WAN policy 1 match destination-address 172.16.0.0/12 set security policies from-zone LAN to-zone WAN policy 1 match application any set security policies from-zone LAN to-zone WAN policy 1 then permit set security policies from-zone LAN to-zone WAN policy 1 then log session-init set security policies from-zone WAN to-zone LAN policy 1 match source-address 172.16.0.0/12 set security policies from-zone WAN to-zone LAN policy 1 match destination-address 172.16.0.0/12 set security policies from-zone WAN to-zone LAN policy 1 match application any set security policies from-zone WAN to-zone LAN policy 1 then permit set security policies from-zone WAN to-zone LAN policy 1 then log session-init set security policies global policy 1000 match source-address any set security policies global policy 1000 match destination-address any set security policies global policy 1000 match application any set security policies global policy 1000 match from-zone any set security policies global policy 1000 match to-zone any set security policies global policy 1000 then deny set security policies global policy 1000 then log session-init set security policies global policy 1000 then count set security policies default-policy deny-all set security group-vpn member ike proposal PSK-SHA256-DH14-AES256 authentication-method pre-shared-keys set security group-vpn member ike proposal PSK-SHA256-DH14-AES256 dh-group group14 set security group-vpn member ike proposal PSK-SHA256-DH14-AES256 authentication-algorithm sha-256 set security group-vpn member ike proposal PSK-SHA256-DH14-AES256 encryption-algorithm aes-256-cbc set security group-vpn member ike policy SubSrv mode main set security group-vpn member ike policy SubSrv proposals PSK-SHA256-DH14-AES256 set security group-vpn member ike policy SubSrv pre-shared-key ascii-text "$ABC123$ABC123" set security group-vpn member ike gateway SubSrv ike-policy SubSrv set security group-vpn member ike gateway SubSrv server-address 10.17.101.1 set security group-vpn member ike gateway SubSrv server-address 10.17.102.1 set security group-vpn member ike gateway SubSrv server-address 10.17.103.1 set security group-vpn member ike gateway SubSrv server-address 10.17.104.1 set security group-vpn member ike gateway SubSrv local-address 10.18.101.1 set security group-vpn member ipsec vpn GROUP_ID-0001 ike-gateway SubSrv set security group-vpn member ipsec vpn GROUP_ID-0001 group-vpn-external-interface ge-0/0/1.0 set security group-vpn member ipsec vpn GROUP_ID-0001 group 1 set security group-vpn member ipsec vpn GROUP_ID-0001 recovery-probe set security ipsec-policy from-zone LAN to-zone WAN ipsec-group-vpn GROUP_ID-0001
分步过程
下面的示例要求您在各个配置层级中进行导航。有关操作说明,请参阅 CLI 用户指南中的在配置模式下使用 CLI 编辑器。
要配置组 VPNv2 成员,请执行以下操作:
配置接口、安全区域和安全策略。
[edit interfaces] user@host# set ge-0/0/0 unit 0 description To_LAN user@host# set ge-0/0/0 unit 0 family inet address 172.16.101.1/24 user@host# set ge-0/0/1 unit 0 description To_SubSrv user@host# set ge-0/0/1 unit 0 family inet address 10.18.101.1/24 [edit security zones security-zone LAN] user@host# set host-inbound-traffic system-services ike user@host# set host-inbound-traffic system-services ssh user@host# set host-inbound-traffic system-services ping user@host# set interfaces ge-0/0/0.0 [edit security zones security-zone WAN] user@host# set host-inbound-traffic system-services ike user@host# set host-inbound-traffic system-services ssh user@host# set host-inbound-traffic system-services ping user@host# set interfaces ge-0/0/1.0 [edit security] user@host# set address-book global address 172.16.0.0/12 172.16.0.0/12 [edit security policies from-zone LAN to-zone WAN] user@host# set policy 1 match source-address 172.16.0.0/12 user@host# set policy 1 match destination-address 172.16.0.0/12 user@host# set policy 1 match application any user@host# set policy 1 then permit user@host# set policy 1 then log session-init [edit security policies from-zone WAN to-zone LAN] user@host# set policy 1 match source-address 172.16.0.0/12 user@host# set policy 1 match destination-address 172.16.0.0/12 user@host# set policy 1 match application any user@host# set policy 1 then permit user@host# set policy 1 then log session-init [edit security policies global] user@host# set policy 1000 match source-address any user@host# set policy 1000 match destination-address any user@host# set policy 1000 match application any user@host# set policy 1000 match from-zone any user@host# set policy 1000 match to-zone any user@host# set policy 1000 then deny user@host# set policy 1000 then log session-init user@host# set policy 1000 then count [edit] user@host# set security policies default-policy deny-all
配置 IKE 提议、策略和网关。
[edit security group-vpn member ike proposal PSK-SHA256-DH14-AES256] user@host# set authentication-method pre-shared-keys user@host# set group group14 user@host# set authentication-algorithm sha-256 user@host# set encryption-algorithm aes-256-cbc [edit security group-vpn member ike policy SubSrv] user@host# set mode main user@host# set proposals PSK-SHA256-DH14-AES256 user@host# set pre-shared-key ascii-text "$ABC123$ABC123" [edit security group-vpn member ike gateway SubSrv] user@host# set ike-policy SubSrv user@host# set server-address 10.17.101.1 user@host# set server-address 10.17.102.1 user@host# set server-address 10.17.103.1 user@host# set server-address 10.17.104.1 user@host# set local-address 10.18.101.1
配置 IPsec SA。
[edit security group-vpn member ipsec vpn GROUP_ID-0001] user@host# set ike-gateway SubSrv user@host# set group-vpn-external-interface ge-0/0/1.0 user@host# set group 1 user@host# set recovery-probe
配置 IPsec 策略。
[edit security ipsec-policy from-zone LAN to-zone WAN] user@host# set ipsec-group-vpn GROUP_ID-0001
结果
在配置模式下,输入 show interfaces
和 show security
命令,以确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明,以便进行更正。
[edit] user@host# show interfaces ge-0/0/0 { unit 0 { description To_LAN; family inet { address 172.16.101.1/24; } } } ge-0/0/1 { unit 0 { description To_SubSrv; family inet { address 10.18.101.1/24; } } } [edit] user@host# show security address-book { global { address 172.16.0.0/12 172.16.0.0/12; } } group-vpn { member { ike { proposal PSK-SHA256-DH14-AES256 { authentication-method pre-shared-keys; dh-group group14; authentication-algorithm sha-256; encryption-algorithm aes-256-cbc; } policy SubSrv { mode main; proposals PSK-SHA256-DH14-AES256; pre-shared-key ascii-text "$ABC123$ABC123"; ## SECRET-DATA } gateway SubSrv { ike-policy SubSrv; server-address [ 10.17.101.1 10.17.102.1 10.17.103.1 10.17.104.1 ]; local-address 10.18.101.1; } } ipsec { vpn GROUP_ID-0001 { ike-gateway SubSrv; group-vpn-external-interface ge-0/0/1.0; group 1; recovery-probe; } } } } ipsec-policy { from-zone LAN to-zone WAN { ipsec-group-vpn GROUP_ID-0001; } } policies { from-zone LAN to-zone WAN { policy 1 { match { source-address 172.16.0.0/12; destination-address 172.16.0.0/12; application any; } then { permit; log { session-init; } } } } from-zone WAN to-zone LAN { policy 1 { match { source-address 172.16.0.0/12; destination-address 172.16.0.0/12; application any; } then { permit; log { session-init; } } } } global { policy 1000 { match { source-address any; destination-address any; application any; from-zone any; to-zone any; } then { deny; log { session-init; } count; } } } default-policy { deny-all; } } zones { security-zone LAN { host-inbound-traffic { system-services { ike; ssh; ping; } } interfaces { ge-0/0/0.0; } } security-zone WAN { host-inbound-traffic { system-services { ike; ssh; ping; } } interfaces { ge-0/0/1.0; } } }
如果完成设备配置,请从配置模式输入 commit
。
配置 GM-0002(SRX 系列防火墙或 vSRX 虚拟防火墙实例)
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,将命令复制并粘贴到 [edit]
层级的 CLI 中,然后从配置模式进入 commit
。
set interfaces ge-0/0/0 unit 0 description To_LAN set interfaces ge-0/0/0 unit 0 family inet address 172.16.102.1/24 set interfaces ge-0/0/1 unit 0 description To_SubSrv set interfaces ge-0/0/1 unit 0 family inet address 10.18.102.1/24 set security zones security-zone LAN host-inbound-traffic system-services ike set security zones security-zone LAN host-inbound-traffic system-services ssh set security zones security-zone LAN host-inbound-traffic system-services ping set security zones security-zone LAN interfaces ge-0/0/0.0 set security zones security-zone WAN host-inbound-traffic system-services ike set security zones security-zone WAN host-inbound-traffic system-services ssh set security zones security-zone WAN host-inbound-traffic system-services ping set security zones security-zone WAN interfaces ge-0/0/1.0 set security address-book global address 172.16.0.0/12 172.16.0.0/12 set security policies from-zone LAN to-zone WAN policy 1 match source-address 172.16.0.0/12 set security policies from-zone LAN to-zone WAN policy 1 match destination-address 172.16.0.0/12 set security policies from-zone LAN to-zone WAN policy 1 match application any set security policies from-zone LAN to-zone WAN policy 1 then permit set security policies from-zone LAN to-zone WAN policy 1 then log session-init set security policies from-zone WAN to-zone LAN policy 1 match source-address 172.16.0.0/12 set security policies from-zone WAN to-zone LAN policy 1 match destination-address 172.16.0.0/12 set security policies from-zone WAN to-zone LAN policy 1 match application any set security policies from-zone WAN to-zone LAN policy 1 then permit set security policies from-zone WAN to-zone LAN policy 1 then log session-init set security policies global policy 1000 match source-address any set security policies global policy 1000 match destination-address any set security policies global policy 1000 match application any set security policies global policy 1000 match from-zone any set security policies global policy 1000 match to-zone any set security policies global policy 1000 then deny set security policies global policy 1000 then log session-init set security policies global policy 1000 then count set security policies default-policy deny-all set security group-vpn member ike proposal PSK-SHA256-DH14-AES256 authentication-method pre-shared-keys set security group-vpn member ike proposal PSK-SHA256-DH14-AES256 dh-group group14 set security group-vpn member ike proposal PSK-SHA256-DH14-AES256 authentication-algorithm sha-256 set security group-vpn member ike proposal PSK-SHA256-DH14-AES256 encryption-algorithm aes-256-cbc set security group-vpn member ike policy SubSrv mode main set security group-vpn member ike policy SubSrv proposals PSK-SHA256-DH14-AES256 set security group-vpn member ike policy SubSrv pre-shared-key ascii-text "$ABC123$ABC123" set security group-vpn member ike gateway SubSrv ike-policy SubSrv set security group-vpn member ike gateway SubSrv server-address 10.17.101.1 set security group-vpn member ike gateway SubSrv server-address 10.17.102.1 set security group-vpn member ike gateway SubSrv server-address 10.17.103.1 set security group-vpn member ike gateway SubSrv server-address 10.17.104.1 set security group-vpn member ike gateway SubSrv local-address 10.18.102.1 set security group-vpn member ipsec vpn GROUP_ID-0001 ike-gateway SubSrv set security group-vpn member ipsec vpn GROUP_ID-0001 group-vpn-external-interface ge-0/0/1.0 set security group-vpn member ipsec vpn GROUP_ID-0001 group 1 set security group-vpn member ipsec vpn GROUP_ID-0001 recovery-probe set security ipsec-policy from-zone LAN to-zone WAN ipsec-group-vpn GROUP_ID-0001
分步过程
下面的示例要求您在各个配置层级中进行导航。有关操作说明,请参阅 CLI 用户指南中的在配置模式下使用 CLI 编辑器。
要配置组 VPNv2 成员,请执行以下操作:
配置接口、安全区域和安全策略。
[edit interfaces] user@host# set ge-0/0/0 unit 0 description To_LAN user@host# set ge-0/0/0 unit 0 family inet address 172.16.102.1/24 user@host# set ge-0/0/1 unit 0 description To_SubSrv user@host# set ge-0/0/1 unit 0 family inet address 10.18.102.1/24 [edit security zones security-zone LAN] user@host# set host-inbound-traffic system-services ike user@host# set host-inbound-traffic system-services ssh user@host# set host-inbound-traffic system-services ping user@host# set interfaces ge-0/0/0.0 [edit security zones security-zone WAN] user@host# set host-inbound-traffic system-services ike user@host# set host-inbound-traffic system-services ssh user@host# set host-inbound-traffic system-services ping user@host# set interfaces ge-0/0/1.0 [edit security] user@host# set address-book global address 172.16.0.0/12 172.16.0.0/12 [edit security policies from-zone LAN to-zone WAN] user@host# set policy 1 match source-address 172.16.0.0/12 user@host# set policy 1 match destination-address 172.16.0.0/12 user@host# set policy 1 match application any user@host# set policy 1 then permit user@host# set policy 1 then log session-init [edit security policies from-zone WAN to-zone LAN] user@host# set policy 1 match source-address 172.16.0.0/12 user@host# set policy 1 match destination-address 172.16.0.0/12 user@host# set policy 1 match application any user@host# set policy 1 then permit user@host# set policy 1 then log session-init [edit security policies global] user@host# set policy 1000 match source-address any user@host# set policy 1000 match destination-address any user@host# set policy 1000 match application any user@host# set policy 1000 match from-zone any user@host# set policy 1000 match to-zone any user@host# set policy 1000 then deny user@host# set policy 1000 then log session-init user@host# set policy 1000 then count [edit] user@host# set security policies default-policy deny-all
配置 IKE 提议、策略和网关。
[edit security group-vpn member ike proposal PSK-SHA256-DH14-AES256] user@host# set authentication-method pre-shared-keys user@host# set group group14 user@host# set authentication-algorithm sha-256 user@host# set encryption-algorithm aes-256-cbc [edit security group-vpn member ike policy SubSrv] user@host# set mode main user@host# set proposals PSK-SHA256-DH14-AES256 user@host# set pre-shared-key ascii-text "$ABC123$ABC123" [edit security group-vpn member ike gateway SubSrv] user@host# set ike-policy SubSrv user@host# set server-address 10.17.101.1 user@host# set server-address 10.17.102.1 user@host# set server-address 10.17.103.1 user@host# set server-address 10.17.104.1 user@host# set local-address 10.18.102.1
配置 IPsec SA。
[edit security group-vpn member ipsec vpn GROUP_ID-0001] user@host# set ike-gateway SubSrv user@host# set group-vpn-external-interface ge-0/0/1.0 user@host# set group 1 user@host# set recovery-probe
配置 IPsec 策略。
[edit security ipsec-policy from-zone LAN to-zone WAN] user@host# set ipsec-group-vpn GROUP_ID-0001
结果
在配置模式下,输入 show interfaces
和 show security
命令,以确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明,以便进行更正。
[edit] user@host# show interfaces ge-0/0/0 { unit 0 { description To_LAN; family inet { address 172.16.102.1/24; } } } ge-0/0/1 { unit 0 { description To_SubSrv; family inet { address 10.18.102.1/24; } } } [edit] user@host# show security address-book { global { address 172.16.0.0/12 172.16.0.0/12; } } group-vpn { member { ike { proposal PSK-SHA256-DH14-AES256 { authentication-method pre-shared-keys; dh-group group14; authentication-algorithm sha-256; encryption-algorithm aes-256-cbc; } policy SubSrv { mode main; proposals PSK-SHA256-DH14-AES256; pre-shared-key ascii-text "$ABC123$ABC123"; ## SECRET-DATA } gateway SubSrv { ike-policy SubSrv; server-address [ 10.17.101.1 10.17.102.1 10.17.103.1 10.17.104.1 ]; local-address 10.18.102.1; } } ipsec { vpn GROUP_ID-0001 { ike-gateway SubSrv; group-vpn-external-interface ge-0/0/1.0; group 1; recovery-probe; } } } } ipsec-policy { from-zone LAN to-zone WAN { ipsec-group-vpn GROUP_ID-0001; } } policies { from-zone LAN to-zone WAN { policy 1 { match { source-address 172.16.0.0/12; destination-address 172.16.0.0/12; application any; } then { permit; log { session-init; } } } } from-zone WAN to-zone LAN { policy 1 { match { source-address 172.16.0.0/12; destination-address 172.16.0.0/12; application any; } then { permit; log { session-init; } } } } global { policy 1000 { match { source-address any; destination-address any; application any; from-zone any; to-zone any; } then { deny; log { session-init; } count; } } } default-policy { deny-all; } } zones { security-zone LAN { host-inbound-traffic { system-services { ike; ssh; ping; } } interfaces { ge-0/0/0.0; } } security-zone WAN { host-inbound-traffic { system-services { ike; ssh; ping; } } interfaces { ge-0/0/1.0; } } }
如果完成设备配置,请从配置模式输入 commit
。
配置 GM-0003(MX 系列设备)
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,将命令复制并粘贴到 [edit]
层级的 CLI 中,然后从配置模式进入 commit
。
set interfaces xe-0/0/1 unit 0 family inet service input service-set GROUP_ID-0001 service-filter GroupVPN-KS set interfaces xe-0/0/1 unit 0 family inet service output service-set GROUP_ID-0001 service-filter GroupVPN-KS set interfaces xe-0/0/1 unit 0 family inet address 10.18.103.1/24 set interfaces xe-0/0/2 unit 0 family inet address 172.16.103.1/24 set interfaces ms-0/2/0 unit 0 family inet set security group-vpn member ike proposal PSK-SHA256-DH14-AES256 authentication-method pre-shared-keys set security group-vpn member ike proposal PSK-SHA256-DH14-AES256 dh-group group14 set security group-vpn member ike proposal PSK-SHA256-DH14-AES256 authentication-algorithm sha-256 set security group-vpn member ike proposal PSK-SHA256-DH14-AES256 encryption-algorithm aes-256-cbc set security group-vpn member ike policy SubSrv mode main set security group-vpn member ike policy SubSrv proposals PSK-SHA256-DH14-AES256 set security group-vpn member ike policy SubSrv pre-shared-key ascii-text "$ABC123$ABC123" set security group-vpn member ike gateway SubSrv ike-policy SubSrv set security group-vpn member ike gateway SubSrv server-address 10.17.101.1 set security group-vpn member ike gateway SubSrv server-address 10.17.102.1 set security group-vpn member ike gateway SubSrv server-address 10.17.103.1 set security group-vpn member ike gateway SubSrv server-address 10.17.104.1 set security group-vpn member ike gateway SubSrv local-address 10.18.103.1 set security group-vpn member ipsec vpn GROUP_ID-0001 ike-gateway SubSrv set security group-vpn member ipsec vpn GROUP_ID-0001 group 1 set security group-vpn member ipsec vpn GROUP_ID-0001 match-direction output set security group-vpn member ipsec vpn GROUP_ID-0001 tunnel-mtu 1400 set security group-vpn member ipsec vpn GROUP_ID-0001 df-bit clear set firewall family inet service-filter GroupVPN-KS term inbound-ks from source-address 10.17.101.1/32 set firewall family inet service-filter GroupVPN-KS term inbound-ks from source-address 10.17.102.1/32 set firewall family inet service-filter GroupVPN-KS term inbound-ks from source-address 10.17.103.1/32 set firewall family inet service-filter GroupVPN-KS term inbound-ks from source-address 10.17.104.1/32 set firewall family inet service-filter GroupVPN-KS term inbound-ks then skip set firewall family inet service-filter GroupVPN-KS term outbound-ks from destination-address 10.17.101.1/32 set firewall family inet service-filter GroupVPN-KS term outbound-ks from destination-address 10.17.102.1/32 set firewall family inet service-filter GroupVPN-KS term outbound-ks from destination-address 10.17.103.1/32 set firewall family inet service-filter GroupVPN-KS term outbound-ks from destination-address 10.17.104.1/32 set firewall family inet service-filter GroupVPN-KS term outbound-ks then skip set firewall family inet service-filter GroupVPN-KS term GROUP_ID-0001 from source-address 172.16.0.0/12 set firewall family inet service-filter GroupVPN-KS term GROUP_ID-0001 from destination-address 172.16.0.0/12 set firewall family inet service-filter GroupVPN-KS term GROUP_ID-0001 then service set services service-set GROUP_ID-0001 interface-service service-interface ms-0/2/0.0 set services service-set GROUP_ID-0001 ipsec-group-vpn GROUP_ID-0001
分步过程
下面的示例要求您在各个配置层级中进行导航。有关操作说明,请参阅 CLI 用户指南中的在配置模式下使用 CLI 编辑器。
要配置组 VPNv2 成员,请执行以下操作:
配置接口。
[edit interfaces] user@host# set xe-0/0/1 unit 0 family inet service input service-set GROUP_ID-0001 service-filter GroupVPN-KS user@host# set xe-0/0/1 unit 0 family inet service output service-set GROUP_ID-0001 service-filter GroupVPN-KS user@host# set xe-0/0/1 unit 0 family inet address 10.18.103.1/24 user@host# set xe-0/0/2 unit 0 family inet address 172.16.103.1/24 user@host# set ms-0/2/0 unit 0 family inet
配置 IKE 提议、策略和网关。
[edit security group-vpn member ike proposal PSK-SHA256-DH14-AES256] user@host# set authentication-method pre-shared-keys user@host# set dh-group group14 user@host# set authentication-algorithm sha-256 user@host# set encryption-algorithm aes-256-cbc [edit security group-vpn member ike policy SubSrv] user@host# set mode main user@host# set proposals PSK-SHA256-DH14-AES256 user@host# set pre-shared-key ascii-text "$ABC123$ABC123" [edit security group-vpn member ike gateway SubSrv] user@host# set ike-policy SubSrv user@host# set server-address 10.17.101.1 user@host# set server-address 10.17.102.1 user@host# set server-address 10.17.103.1 user@host# set server-address 10.17.104.1 user@host# set local-address 10.18.103.1
配置 IPsec SA。
[edit security group-vpn member ipsec vpn GROUP_ID-0001] user@host# set ike-gateway SubSrv user@host# set group 1 user@host# set match-direction output user@host# set tunnel-mtu 1400 user@host# set df-bit clear
配置服务筛选器。
[edit firewall family inet service-filter GroupVPN-KS] user@host# set term inbound-ks from source-address 10.17.101.1/32 user@host# set term inbound-ks from source-address 10.17.102.1/32 user@host# set term inbound-ks from source-address 10.17.103.1/32 user@host# set term inbound-ks from source-address 10.17.104.1/32 user@host# set term inbound-ks then skip user@host# set term outbound-ks from destination-address 10.17.101.1/32 user@host# set term outbound-ks from destination-address 10.17.102.1/32 user@host# set term outbound-ks from destination-address 10.17.103.1/32 user@host# set term outbound-ks from destination-address 10.17.104.1/32 user@host# set term outbound-ks then skip user@host# set term GROUP_ID-0001 from source-address 172.16.0.0/12 user@host# set term GROUP_ID-0001 from destination-address 172.16.0.0/12 user@host# set term GROUP_ID-0001 then service
配置服务集。
[edit services service-set GROUP_ID-0001] user@host# set interface-service service-interface ms-0/2/0.0 user@host# set ipsec-group-vpn GROUP_ID-0001
结果
在配置模式下,输入 show interfaces
、show security
、show services
和 show firewall
命令,以确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明,以便进行更正。
[edit] user@host# show interfaces xe-0/0/1 { unit 0 { family inet { service { input { service-set GROUP_ID-0001 service-filter GroupVPN-KS; } output { service-set GROUP_ID-0001 service-filter GroupVPN-KS; } } address 10.18.103.1/24; } } } xe-0/0/2 { unit 0 { family inet { address 172.16.103.1/24; } } } ms-0/2/0 { unit 0 { family inet; } } [edit] user@host# show security group-vpn { member { ike { proposal PSK-SHA256-DH14-AES256 { authentication-method pre-shared-keys; dh-group group14; authentication-algorithm sha-256; encryption-algorithm aes-256-cbc; } policy SubSrv { mode main; proposals PSK-SHA256-DH14-AES256; pre-shared-key ascii-text "$ABC123$ABC123"; ## SECRET-DATA } gateway SubSrv { ike-policy SubSrv; server-address [ 10.17.101.1 10.17.102.1 10.17.103.1 10.17.104.1 ]; local-address 10.18.103.1; } } ipsec { vpn GROUP_ID-0001 { ike-gateway SubSrv; group 1; match-direction output; tunnel-mtu 1400; df-bit clear; } } } } [edit] user@host# show services service-set GROUP_ID-0001 { interface-service { service-interface ms-0/2/0.0; } ipsec-group-vpn GROUP_ID-0001; } [edit] user@host# show firewall family inet { service-filter GroupVPN-KS { term inbound-ks { from { source-address { 10.17.101.1/32; 10.17.102.1/32; 10.17.103.1/32; 10.17.104.1/32; } } then skip; } term outbound-ks { from { destination-address { 10.17.101.1/32; 10.17.102.1/32; 10.17.103.1/32; 10.17.104.1/32; } } then skip; } term GROUP_ID-0001 { from { source-address { 172.16.0.0/12; } destination-address { 172.16.0.0/12; } } then service; } } }
如果完成设备配置,请从配置模式输入 commit
。
配置 GM-0004(MX 系列设备)
CLI 快速配置
要快速配置此示例,请复制以下命令,将其粘贴到文本文件中,删除所有换行符,更改详细信息,以便与网络配置匹配,将命令复制并粘贴到 [edit]
层级的 CLI 中,然后从配置模式进入 commit
。
set interfaces xe-0/0/1 unit 0 family inet service input service-set GROUP_ID-0001 service-filter GroupVPN-KS set interfaces xe-0/0/1 unit 0 family inet service output service-set GROUP_ID-0001 service-filter GroupVPN-KS set interfaces xe-0/0/1 unit 0 family inet address 10.18.104.1/24 set interfaces xe-0/0/2 unit 0 family inet address 172.16.104.1/24 set interfaces ms-0/2/0 unit 0 family inet set security group-vpn member ike proposal PSK-SHA256-DH14-AES256 authentication-method pre-shared-keys set security group-vpn member ike proposal PSK-SHA256-DH14-AES256 dh-group group14 set security group-vpn member ike proposal PSK-SHA256-DH14-AES256 authentication-algorithm sha-256 set security group-vpn member ike proposal PSK-SHA256-DH14-AES256 encryption-algorithm aes-256-cbc set security group-vpn member ike policy SubSrv mode main set security group-vpn member ike policy SubSrv proposals PSK-SHA256-DH14-AES256 set security group-vpn member ike policy SubSrv pre-shared-key ascii-text "$ABC123$ABC123" set security group-vpn member ike gateway SubSrv ike-policy SubSrv set security group-vpn member ike gateway SubSrv server-address 10.17.101.1 set security group-vpn member ike gateway SubSrv server-address 10.17.102.1 set security group-vpn member ike gateway SubSrv server-address 10.17.103.1 set security group-vpn member ike gateway SubSrv server-address 10.17.104.1 set security group-vpn member ike gateway SubSrv local-address 10.18.104.1 set security group-vpn member ipsec vpn GROUP_ID-0001 ike-gateway SubSrv set security group-vpn member ipsec vpn GROUP_ID-0001 group 1 set security group-vpn member ipsec vpn GROUP_ID-0001 match-direction output set security group-vpn member ipsec vpn GROUP_ID-0001 tunnel-mtu 1400 set security group-vpn member ipsec vpn GROUP_ID-0001 df-bit clear set firewall family inet service-filter GroupVPN-KS term inbound-ks from source-address 10.17.101.1/32 set firewall family inet service-filter GroupVPN-KS term inbound-ks from source-address 10.17.102.1/32 set firewall family inet service-filter GroupVPN-KS term inbound-ks from source-address 10.17.103.1/32 set firewall family inet service-filter GroupVPN-KS term inbound-ks from source-address 10.17.104.1/32 set firewall family inet service-filter GroupVPN-KS term inbound-ks then skip set firewall family inet service-filter GroupVPN-KS term outbound-ks from destination-address 10.17.101.1/32 set firewall family inet service-filter GroupVPN-KS term outbound-ks from destination-address 10.17.102.1/32 set firewall family inet service-filter GroupVPN-KS term outbound-ks from destination-address 10.17.103.1/32 set firewall family inet service-filter GroupVPN-KS term outbound-ks from destination-address 10.17.104.1/32 set firewall family inet service-filter GroupVPN-KS term outbound-ks then skip set firewall family inet service-filter GroupVPN-KS term GROUP_ID-0001 from source-address 172.16.0.0/12 set firewall family inet service-filter GroupVPN-KS term GROUP_ID-0001 from destination-address 172.16.0.0/12 set firewall family inet service-filter GroupVPN-KS term GROUP_ID-0001 then service set services service-set GROUP_ID-0001 interface-service service-interface ms-0/2/0.0 set services service-set GROUP_ID-0001 ipsec-group-vpn GROUP_ID-0001
分步过程
下面的示例要求您在各个配置层级中进行导航。有关操作说明,请参阅 CLI 用户指南中的在配置模式下使用 CLI 编辑器。
要配置组 VPNv2 成员,请执行以下操作:
配置接口。
[edit interfaces] user@host# set xe-0/0/1 unit 0 family inet service input service-set GROUP_ID-0001 service-filter GroupVPN-KS user@host# set xe-0/0/1 unit 0 family inet service output service-set GROUP_ID-0001 service-filter GroupVPN-KS user@host# set xe-0/0/1 unit 0 family inet address 10.18.104.1/24 user@host# set xe-0/0/2 unit 0 family inet address 172.16.104.1/24 user@host# set ms-0/2/0 unit 0 family inet
配置 IKE 提议、策略和网关。
[edit security group-vpn member ike proposal PSK-SHA256-DH14-AES256] user@host# set authentication-method pre-shared-keys user@host# set dh-group group14 user@host# set authentication-algorithm sha-256 user@host# set encryption-algorithm aes-256-cbc [edit security group-vpn member ike policy SubSrv] user@host# set mode main user@host# set proposals PSK-SHA256-DH14-AES256 user@host# set pre-shared-key ascii-text "$ABC123$ABC123" [edit security group-vpn member ike gateway SubSrv] user@host# set ike-policy SubSrv user@host# set server-address 10.17.101.1 user@host# set server-address 10.17.102.1 user@host# set server-address 10.17.103.1 user@host# set server-address 10.17.104.1 user@host# set local-address 10.18.104.1
配置 IPsec SA。
[edit security group-vpn member ipsec vpn GROUP_ID-0001] user@host# set ike-gateway SubSrv user@host# set group 1 user@host# set match-direction output user@host# set tunnel-mtu 1400 user@host# set df-bit clear
配置服务筛选器。
[edit firewall family inet service-filter GroupVPN-KS] user@host# set term inbound-ks from source-address 10.17.101.1/32 user@host# set term inbound-ks from source-address 10.17.102.1/32 user@host# set term inbound-ks from source-address 10.17.103.1/32 user@host# set term inbound-ks from source-address 10.17.104.1/32 user@host# set term inbound-ks then skip user@host# set term outbound-ks from destination-address 10.17.101.1/32 user@host# set term outbound-ks from destination-address 10.17.102.1/32 user@host# set term outbound-ks from destination-address 10.17.103.1/32 user@host# set term outbound-ks from destination-address 10.17.104.1/32 user@host# set term outbound-ks then skip user@host# set term GROUP_ID-0001 from source-address 172.16.0.0/12 user@host# set term GROUP_ID-0001 from destination-address 172.16.0.0/12 user@host# set term GROUP_ID-0001 then service
配置服务集。
[edit services service-set GROUP_ID-0001] user@host# set interface-service service-interface ms-0/2/0.0 user@host# set ipsec-group-vpn GROUP_ID-0001
结果
在配置模式下,输入 show interfaces
、show security
、show services
和 show firewall
命令,以确认您的配置。如果输出未显示预期的配置,请重复此示例中的说明,以便进行更正。
[edit] user@host# show interfaces xe-0/0/1 { unit 0 { family inet { service { input { service-set GROUP_ID-0001 service-filter GroupVPN-KS; } output { service-set GROUP_ID-0001 service-filter GroupVPN-KS; } } address 10.18.104.1/24; } } } xe-0/0/2 { unit 0 { family inet { address 172.16.104.1/24; } } } ms-0/2/0 { unit 0 { family inet; } } [edit] user@host# show security group-vpn { member { ike { proposal PSK-SHA256-DH14-AES256 { authentication-method pre-shared-keys; dh-group group14; authentication-algorithm sha-256; encryption-algorithm aes-256-cbc; } policy SubSrv { mode main; proposals PSK-SHA256-DH14-AES256; pre-shared-key ascii-text ""$ABC123$ABC123"; ## SECRET-DATA } gateway SubSrv { ike-policy SubSrv; server-address [ 10.17.101.1 10.17.102.1 10.17.103.1 10.17.104.1 ]; local-address 10.18.104.1; } } ipsec { vpn GROUP_ID-0001 { ike-gateway SubSrv; group 1; match-direction output; tunnel-mtu 1400; df-bit clear; } } } } [edit] user@host# show services service-set GROUP_ID-0001 { interface-service { service-interface ms-0/2/0.0; } ipsec-group-vpn GROUP_ID-0001; } [edit] user@host# show firewall family inet { service-filter GroupVPN-KS { term inbound-ks { from { source-address { 10.17.101.1/32; 10.17.102.1/32; 10.17.103.1/32; 10.17.104.1/32; } } then skip; } term outbound-ks { from { destination-address { 10.17.101.1/32; 10.17.102.1/32; 10.17.103.1/32; 10.17.104.1/32; } } then skip; } term GROUP_ID-0001 { from { source-address { 172.16.0.0/12; } destination-address { 172.16.0.0/12; } } then service; } } }
如果完成设备配置,请从配置模式输入 commit
。
验证
确认配置工作正常。
验证服务器群集操作
目的
验证服务器群集中的设备是否识别组中的对等服务器。确保服务器处于活动状态,并正确分配了群集中的角色。
操作
在操作模式下,在根服务器上输入 show security group-vpn server server-cluster
、 show security group-vpn server server-cluster detail
和 show security group-vpn server statistics
命令。
user@RootSrv> show security group-vpn server server-cluster Group: GROUP_ID-0001, Group Id: 1 Role: Root-server, Version Number: 2, Peer Gateway Peer IP Role Status SubSrv01 10.16.101.1 Sub-server Active SubSrv02 10.16.102.1 Sub-server Active SubSrv03 10.16.103.1 Sub-server Active SubSrv04 10.16.104.1 Sub-server Active
user@RootSrv> show security group-vpn server server-cluster detail Group: GROUP_ID-0001, Group Id: 1 Role: Root-server, Version Number: 2 Peer gateway: SubSrv01 Peer IP: 10.16.101.1, Local IP: 10.10.101.1, VR: default Role: Sub-server, Status: Active CLUSTER-INIT send: 0 CLUSTER-INIT recv: 1 CLUSTER-INIT success: 1 CLUSTER-INIT fail: 0 CLUSTER-INIT dup: 0 CLUSTER-INIT abort: 0 CLUSTER-INIT timeout: 0 CLUSTER-UPDATE send: 2 CLUSTER-UPDATE recv: 0 CLUSTER-UPDATE success: 2 CLUSTER-UPDATE fail: 0 CLUSTER-UPDATE abort: 0 CLUSTER-UPDATE timeout: 0 CLUSTER-UPDATE pending: 0 CLUSTER-UPDATE max retry reached: 0 DPD send: 677 DPD send fail: 0 DPD ACK recv: 677 DPD ACK invalid seqno: 0 IPsec SA policy mismatch: 0 IPsec SA proposal mismatch: 0 KEK SA proposal mismatch: 0 Peer gateway: SubSrv02 Peer IP: 10.16.102.1, Local IP: 10.10.102.1, VR: default Role: Sub-server, Status: Active CLUSTER-INIT send: 0 CLUSTER-INIT recv: 1 CLUSTER-INIT success: 1 CLUSTER-INIT fail: 0 CLUSTER-INIT dup: 0 CLUSTER-INIT abort: 0 CLUSTER-INIT timeout: 0 CLUSTER-UPDATE send: 2 CLUSTER-UPDATE recv: 0 CLUSTER-UPDATE success: 2 CLUSTER-UPDATE fail: 0 CLUSTER-UPDATE abort: 0 CLUSTER-UPDATE timeout: 0 CLUSTER-UPDATE pending: 0 CLUSTER-UPDATE max retry reached: 0 DPD send: 676 DPD send fail: 0 DPD ACK recv: 676 DPD ACK invalid seqno: 0 IPsec SA policy mismatch: 0 IPsec SA proposal mismatch: 0 KEK SA proposal mismatch: 0 user@RootSrv> show security group-vpn server statistics Group: GROUP_ID-0001, Group Id: 1 Stats: Pull Succeeded : 0 Pull Failed : 0 Pull Exceed Member Threshold : 0 Push Sent : 0 Push Acknowledged : 0 Push Unacknowledged : 0
在操作模式下,在每个子服务器上输入 show security group-vpn server server-cluster
、 show security group-vpn server server-cluster detail
和 show security group-vpn server statistics
命令。
user@SubSrv01> show security group-vpn server server-cluster Group: GROUP_ID-0001, Group Id: 1 Role: Sub-server, Version Number: 2, Peer Gateway Peer IP Role Status RootSrv 10.10.101.1 Root-server Active
user@SubSrv01> show security group-vpn server server-cluster detail Group: GROUP_ID-0001, Group Id: 1 Role: Sub-server, Version Number: 2 Peer gateway: RootSrv Peer IP: 10.10.101.1, Local IP: 10.16.101.1, VR: default Role: Root-server, Status: Active CLUSTER-INIT send: 1 CLUSTER-INIT recv: 0 CLUSTER-INIT success: 1 CLUSTER-INIT fail: 0 CLUSTER-INIT dup: 0 CLUSTER-INIT abort: 0 CLUSTER-INIT timeout: 0 CLUSTER-UPDATE send: 0 CLUSTER-UPDATE recv: 2 CLUSTER-UPDATE success: 2 CLUSTER-UPDATE fail: 0 CLUSTER-UPDATE abort: 0 CLUSTER-UPDATE timeout: 0 CLUSTER-UPDATE pending: 0 CLUSTER-UPDATE max retry reached: 0 DPD send: 812 DPD send fail: 0 DPD ACK recv: 812 DPD ACK invalid seqno: 0 IPsec SA policy mismatch: 0 IPsec SA proposal mismatch: 0 KEK SA proposal mismatch: 0 user@SubSrv01> show security group-vpn server statistics Group: GROUP_ID-0001, Group Id: 1 Stats: Pull Succeeded : 4 Pull Failed : 0 Pull Exceed Member Threshold : 0 Push Sent : 8 Push Acknowledged : 8 Push Unacknowledged : 0
验证 SA 是否已分发给成员
目的
验证子服务器是否已收到要分发给组成员的 SA,以及组成员是否已收到 SA。
操作
在操作模式下,在根服务器上输入 show security group-vpn server kek security-associations
和 show security group-vpn server kek security-associations detail
命令。
user@RootSrv> show security group-vpn server kek security-associations Index Life:sec Initiator cookie Responder cookie GroupId 738885 2888 5742c24020056c6a d6d479543b56404c 1
user@RootSrv> show security group-vpn server kek security-associations detail Index 738885, Group Name: GROUP_ID-0001, Group Id: 1 Initiator cookie: 5742c24020056c6a, Responder cookie: d6d479543b56404c Authentication method: RSA Lifetime: Expires in 2883 seconds, Activated Rekey in 2373 seconds Algorithms: Sig-hash : sha256 Encryption : aes256-cbc Traffic statistics: Input bytes : 0 Output bytes : 0 Input packets: 0 Output packets: 0 Server Member Communication: Unicast Retransmission Period: 10, Number of Retransmissions: 2 Group Key Push sequence number: 0 PUSH negotiations in progress: 0
在操作模式下,在每个子服务器上输入 show security group-vpn server kek security-associations
和 show security group-vpn server kek security-associations detail
命令。
user@SubSrv01> show security group-vpn server kek security-associations Index Life:sec Initiator cookie Responder cookie GroupId 738885 1575 5742c24020056c6a d6d479543b56404c 1
user@SubSrv01> show security group-vpn server kek security-associations detail Index 738879, Group Name: GROUP_ID-0001, Group Id: 1 Initiator cookie: 114e4a214891e42f, Responder cookie: 4b2848d14372e5bd Authentication method: RSA Lifetime: Expires in 4186 seconds, Activated Rekey in 3614 seconds Algorithms: Sig-hash : sha256 Encryption : aes256-cbc Traffic statistics: Input bytes : 0 Output bytes : 0 Input packets: 0 Output packets: 0 Server Member Communication: Unicast Retransmission Period: 10, Number of Retransmissions: 2 Group Key Push sequence number: 0 PUSH negotiations in progress: 0
在操作模式下,在每个组成员上输入 show security group-vpn member kek security-associations
和 show security group-vpn member kek security-associations detail
命令。
对于 SRX 系列防火墙或 vSRX 虚拟防火墙组成员:
user@GM-0001> show security group-vpn server kek security-associations Index Server Address Life:sec Initiator cookie Responder cookie GroupId 5455799 10.17.101.1 1466 5742c24020056c6a d6d479543b56404c 1 user@GM-0001> show security group-vpn server kek security-associations detail Index 5455799, Group Id: 1 Group VPN Name: GROUP_ID-0001 Local Gateway: 10.18.101.1, GDOI Server: 10.17.101.1 Initiator cookie: 5742c24020056c6a, Responder cookie: d6d479543b56404c Lifetime: Expires in 1464 seconds Group Key Push Sequence number: 0 Algorithms: Sig-hash : hmac-sha256-128 Encryption : aes256-cbc Traffic statistics: Input bytes : 0 Output bytes : 0 Input packets: 0 Output packets: 0 Stats: Push received : 0 Delete received : 0
对于 MX 群组成员:
user@GM-0003> show security group-vpn member kek security-associations Index Server Address Life:sec Initiator cookie Responder cookie GroupId 5184329 10.17.101.1 1323 5742c24020056c6a d6d479543b56404c 1 user@GM-0003> show security group-vpn member kek security-associations detail Index 5184329, Group Id: 1 Group VPN Name: GROUP_ID-0001 Local Gateway: 10.18.103.1, GDOI Server: 10.17.101.1 Initiator cookie: 5742c24020056c6a, Responder cookie: d6d479543b56404c Lifetime: Expires in 1321 seconds Group Key Push Sequence number: 0 Algorithms: Sig-hash : hmac-sha256-128 Encryption : aes256-cbc Traffic statistics: Input bytes : 0 Output bytes : 0 Input packets: 0 Output packets: 0 Stats: Push received : 0 Delete received : 0
验证服务器上的 IKE SA
目的
在服务器上显示 IKE 安全关联 (SA)。
操作
在操作模式下,在根服务器上输入 show security group-vpn server ike security-associations
和 show security group-vpn server ike security-associations detail
命令。
user@RootSrv> show security group-vpn server ike security-associations Index State Initiator cookie Responder cookie Mode Remote Address 738880 UP 2221001e980eb08b 5af00708f5da289c Main 10.16.104.1 738881 UP 59e8c1d328b1d9fd d63e823fb8be1f22 Main 10.16.101.1 738883 UP 9cb3a49c6771819e 8df3be8c9ddeb2a7 Main 10.16.102.1 738882 UP 9a8a75f05a1384c5 c6d58696c896b730 Main 10.16.103.1
user@RootSrv> show security group-vpn server ike security-associations detail IKE peer 10.16.101.1, Index 738881, Gateway Name: SubSrv01 Role: Responder, State: UP Initiator cookie: 59e8c1d328b1d9fd, Responder cookie: d63e823fb8be1f22 Exchange type: Main, Authentication method: Pre-shared-keys Local: 10.10.101.1:848, Remote: 10.16.101.1:848 Lifetime: Expires in 21890 seconds Peer ike-id: 10.16.101.1 Xauth user-name: not available Xauth assigned IP: 0.0.0.0 Algorithms: Authentication : hmac-sha256-128 Encryption : aes256-cbc Pseudo random function: hmac-sha256 Diffie-Hellman group : DH-group-14 Traffic statistics: Input bytes : 150112 Output bytes : 153472 Input packets: 1387 Output packets: 1387 Flags: IKE SA is created IKE peer 10.16.102.1, Index 738883, Gateway Name: SubSrv02 Role: Responder, State: UP Initiator cookie: 9cb3a49c6771819e, Responder cookie: 8df3be8c9ddeb2a7 Exchange type: Main, Authentication method: Pre-shared-keys Local: 10.10.102.1:848, Remote: 10.16.102.1:848 Lifetime: Expires in 21899 seconds Peer ike-id: 10.16.102.1 Xauth user-name: not available Xauth assigned IP: 0.0.0.0 Algorithms: Authentication : hmac-sha256-128 Encryption : aes256-cbc Pseudo random function: hmac-sha256 Diffie-Hellman group : DH-group-14 Traffic statistics: Input bytes : 149788 Output bytes : 153148 Input packets: 1384 Output packets: 1384 Flags: IKE SA is created
在操作模式下,在每个子服务器上输入 show security group-vpn server ike security-associations
和 show security group-vpn server ike security-associations detail
命令。
user@SubSrv01> show security group-vpn server ike security-associations Index State Initiator cookie Responder cookie Mode Remote Address 738878 UP 59e8c1d328b1d9fd d63e823fb8be1f22 Main 10.10.101.1
user@SubSrv01> show security group-vpn server ike security-associations detail IKE peer 10.10.101.1, Index 738878, Gateway Name: RootSrv Role: Initiator, State: UP Initiator cookie: 59e8c1d328b1d9fd, Responder cookie: d63e823fb8be1f22 Exchange type: Main, Authentication method: Pre-shared-keys Local: 10.16.101.1:848, Remote: 10.10.101.1:848 Lifetime: Expires in 20589 seconds Peer ike-id: 10.10.101.1 Xauth user-name: not available Xauth assigned IP: 0.0.0.0 Algorithms: Authentication : hmac-sha256-128 Encryption : aes256-cbc Pseudo random function: hmac-sha256 Diffie-Hellman group : DH-group-14 Traffic statistics: Input bytes : 181444 Output bytes : 178084 Input packets: 1646 Output packets: 1646 Flags: IKE SA is created
验证服务器和组成员上的 IPsec SA
目的
显示服务器和组成员上的 IPsec 安全关联 (SA)。
操作
在操作模式下,在根服务器上输入 show security group-vpn server ipsec security-associations
和 show security group-vpn server ipsec security-associations detail
命令。
user@RootSrv> show security group-vpn server ipsec security-associations Group: GROUP_ID-0001, Group Id: 1 Total IPsec SAs: 1 IPsec SA Algorithm SPI Lifetime GROUP_ID-0001 ESP:aes-256/sha256 dddef414 2773 user@RootSrv> show security group-vpn server ipsec security-associations detail Group: GROUP_ID-0001, Group Id: 1 Total IPsec SAs: 1 IPsec SA: GROUP_ID-0001 Protocol: ESP, Authentication: sha256, Encryption: aes-256 Anti-replay: D3P enabled SPI: dddef414 Lifetime: Expires in 1670 seconds, Activated Rekey in 1160 seconds Policy Name: 1 Source: 172.16.0.0/12 Destination: 172.16.0.0/12 Source Port: 0 Destination Port: 0 Protocol: 0
在操作模式下,在每个子服务器上输入 show security group-vpn server ipsec security-associations
和 show security group-vpn server ipsec security-associations detail
命令。
user@SubSrv01> show security group-vpn server ipsec security-associations Group: GROUP_ID-0001, Group Id: 1 Total IPsec SAs: 1 IPsec SA Algorithm SPI Lifetime GROUP_ID-0001 ESP:aes-256/sha256 dddef414 1520 user@SubSrv01> show security group-vpn server ipsec security-associations detail Group: GROUP_ID-0001, Group Id: 1 Total IPsec SAs: 1 IPsec SA: GROUP_ID-0001 Protocol: ESP, Authentication: sha256, Encryption: aes-256 Anti-replay: D3P enabled SPI: dddef414 Lifetime: Expires in 1518 seconds, Activated Rekey in 1230 seconds Policy Name: 1 Source: 172.16.0.0/12 Destination: 172.16.0.0/12 Source Port: 0 Destination Port: 0 Protocol: 0
在操作模式下,在每个组成员上输入 show security group-vpn member ipsec security-associations
和 show security group-vpn member ipsec security-associations detail
命令
对于 SRX 系列防火墙或 vSRX 虚拟防火墙组成员:
user@GM-0001> show security group-vpn member ipsec security-associations Total active tunnels: 1 ID Server Port Algorithm SPI Life:sec/kb GId lsys <>49152 10.17.101.1 848 ESP:aes-256/sha256-128 dddef414 1412/ unlim 1 root user@GM-0001> show security group-vpn member ipsec security-associations detail Virtual-system: root Group VPN Name: GROUP_ID-0001 Local Gateway: 10.18.101.1, GDOI Server: 10.17.101.1 Group Id: 1 Routing Instance: default Recovery Probe: Enabled DF-bit: clear Stats: Pull Succeeded : 1 Pull Failed : 0 Pull Timeout : 0 Pull Aborted : 0 Push Succeeded : 2 Push Failed : 0 Server Failover : 0 Delete Received : 0 Exceed Maximum Keys(4) : 0 Exceed Maximum Policies(10): 0 Unsupported Algo : 0 Flags: Rekey Needed: no List of policies received from server: Tunnel-id: 49152 Source IP: ipv4_subnet(any:0,[0..7]=172.16.0.0/12) Destination IP: ipv4_subnet(any:0,[0..7]=172.16.0.0/12) Direction: bi-directional, SPI: dddef414 Protocol: ESP, Authentication: sha256-128, Encryption: aes-256 Hard lifetime: Expires in 1409 seconds, Activated Lifesize Remaining: Unlimited Soft lifetime: Expires in 1193 seconds Mode: Tunnel, Type: Group VPN, State: installed Anti-replay service: D3P enabled
对于 MX 群组成员:
user@GM-0003> show security group-vpn member ipsec security-associations Total active tunnels: 1 ID Server Port Algorithm SPI Life:sec/kb GId lsys <>10001 10.17.101.1 848 ESP:aes-256/sha256-128 dddef414 1308/ unlim 1 root user@GM-0003> show security group-vpn member ipsec security-associations detail Virtual-system: root Group VPN Name: GROUP_ID-0001 Local Gateway: 10.18.103.1, GDOI Server: 10.17.101.1 Group Id: 1 Rule Match Direction: output, Tunnel-MTU: 1400 Routing Instance: default DF-bit: clear Stats: Pull Succeeded : 1 Pull Failed : 0 Pull Timeout : 0 Pull Aborted : 0 Push Succeeded : 2 Push Failed : 0 Server Failover : 0 Delete Received : 0 Exceed Maximum Keys(4) : 0 Exceed Maximum Policies(1): 0 Unsupported Algo : 0 Flags: Rekey Needed: no List of policies received from server: Tunnel-id: 10001 Source IP: ipv4_subnet(any:0,[0..7]=172.16.0.0/12) Destination IP: ipv4_subnet(any:0,[0..7]=172.16.0.0/12) Direction: bi-directional, SPI: dddef414 Protocol: ESP, Authentication: sha256-128, Encryption: aes-256 Hard lifetime: Expires in 1305 seconds, Activated Lifesize Remaining: Unlimited Soft lifetime: Expires in 1087 seconds Mode: Tunnel, Type: Group VPN, State: installed Anti-replay service: D3P enabled
验证组成员上的 IPsec 策略
目的
在 SRX 系列防火墙或 vSRX 虚拟防火墙组成员上显示 IPsec 策略。
此命令不适用于 MX 系列组成员。
操作
在操作模式下,在 SRX 系列防火墙或 vSRX 虚拟防火墙组成员上输入 show security group-vpn member policy 命令。
user@GM-0001> show security group-vpn member policy Group VPN Name: GROUP_ID-0001, Group Id: 1 From-zone: LAN, To-zone: WAN Tunnel-id: 49152, Policy type: Secure Source : IP <172.16.0.0 - 172.31.255.255>, Port <0 - 65535>, Protocol <0> Destination : IP <172.16.0.0 - 172.31.255.255>, Port <0 - 65535>, Protocol <0> Tunnel-id: 63488, Policy type: Fail-close Source : IP <0.0.0.0 - 255.255.255.255>, Port <0 - 65535>, Protocol <0> Destination : IP <0.0.0.0 - 255.255.255.255>, Port <0 - 65535>, Protocol <0>