本文讨论如何连接IPsec站点与高可用性(HA)配置中的FortiGate设备到Cato Cloud。
本文假设您在一个FortiGate连接到互联网的环境中操作,具有两个WAN链路,我们将建立IPsec连接到两个Cato PoPs。
可以通过从Cato管理应用程序中Network > IP分配分配新的IP地址(或使用旧地址)来获取Cato PoP IP。 我们建议选择最接近站点的 PoP 位置的主要 IP ,以及来自不同 PoP 位置的次要 IP。
注意: 本文中的配置在固件版本 7.0.8 中进行了测试。
本节解释如何配置FortiGate设备为Cato IPsec IKEv2站点,并由Cato发起路由。
请使用管理员账号通过SSH连接到您的FortiGate设备。
要配置 FortiGate 设备以连接到 IKEv2 上传站点:
-
输入IPsec阶段1的设置:
config vpn ipsec phase1-interface edit "CATO_IPSECV2-1" #[主要 VPN 名称] set interface "wan1" #[本地 FGT 站点网络 WAN 接口] set ike-version 2 set keylife 19800 set peertype any set net-device disable set proposal aes256gcm-prfsha512 set comments "主要上传 CATO 云 XCATD01" set dhgrp 16 set remote-gw #[Cato POP 1 IP] set psksecret #[主要 Cato 配置 PSK] next end config vpn ipsec phase1-interface edit "CATO_IPSECV2-2" #[次要 VPN 名称] set interface "wan2" #[次要 FGT 站点网络 WAN 接口 - 如果不可用则使用相同的 WAN 接口] set ike-version 2 set keylife 19800 set peertype any set net-device disable set proposal aes256gcm-prfsha512 set comments "次要上传 CATO 云 XCATD01" set dhgrp 16 set remote-gw #[Cato POP 2 IP] set psksecret #[次要 Cato 配置 PSK] next end -
输入IPsec阶段2的设置:
config vpn ipsec phase2-interface edit "CATO_IPSECV2-1" #[VPN 阶段 2 名称] set phase1name "CATO_IPSECV2-1" #[VPN 阶段 1 名称] set proposal aes256gcm set dhgrp 16 set keylifeseconds 3600 next edit "CATO_IPSECV2-2" #[VPN 阶段 2 名称] set phase1name "CATO_IPSECV2-2" #[VPN 阶段 1 名称] set proposal aes256gcm set dhgrp 16 set keylifeseconds 3600 next end -
通过 VPN 隧道将流量路由到 Cato Cloud。
您可以使用静态路由或动态 BGP 路由来完成此操作。 在这个示例中,我们使用静态路由。
config router static edit #[本地 FGT 唯一路由 ID] set dst 172.101.0.0 255.255.255.0 #[远程 Cato Networks 子网] set distance 1 set device "CATO_IPSECV2-1" next edit #[本地 FGT 唯一路由 ID] set dst 172.101.0.0 255.255.255.0 #[远程 Cato Networks 子网] set priority 10 set distance 1 set device "CATO_IPSECV2-2" next edit #[本地 FGT 唯一路由 ID] set dst 172.101.0.0 255.255.255.0 #[否则发送至黑洞 - 远程 Cato Networks 子网] set blackhole enable set distance 254 next end -
(可选) 创建一个区域,这样在创建新规则或需要更改VPN名称时会更容易。
config system zone edit "Cato-Cloud-S2S" #[区域名称] set intrazone allow set interface "CATO_IPSECV2-1" "CATO_IPSECV2-2" #[2 个 IPSEC VPN] next警告! 此区域配置可能会在某些版本的 FortiOS 操作系统上引起问题。
-
使用允许流量通过隧道的规则配置防火墙策略。
config firewall policy edit #[本地 FGT 规则 ID] set name "CATO 防火墙" set srcintf "虚拟局域网" #[本地 FGT 站点网络接口] set dstintf "Cato-Cloud-S2S"#[远程 Cato Networks VPN 区域或 VPN 接口] set action accept set srcaddr "全部" #[最佳实践 - 按本地地址/组进行过滤] set dstaddr "全部" #[最佳实践 - 按 Cato 地址/组进行过滤] set schedule "始终" set service "全部" next end
本节解释如何配置FortiGate设备为Cato IPsec IKEv1站点,其中路由由FortiGate设备启动,以支持WAN流量的动态公共IP地址。
注意: 本文中的配置在固件版本 7.0.8 中进行了测试。
要配置 FortiGate 设备以连接到 IKEv1 防火墙启动站点:
-
输入IPsec阶段1的设置:
config vpn ipsec phase1-interface edit "CATO_Cloud_M1" #[主要 VPN 名称] set interface "wan1" #[本地 FGT 站点网络 WAN 接口] set keylife 19800 set mode aggressive set peertype any set net-device disable set proposal aes256-sha512 set localid "<site_name>.<acc_name>" #[设置本地 ID - 可从站点配置 -> IPsec 菜单中获取] set dhgrp 16 set remote-gw #[Cato 主 POP IP] set psksecret #[主要 Cato 配置 PSK] next edit "CATO_Cloud_M2" #[次要 VPN 名称] set interface "wan2" #[次要 FGT 站点网络 WAN 接口 - 如果不可用则使用相同的 WAN 接口] set keylife 19800 set mode aggressive set peertype any set net-device disable set proposal aes256-sha512 set localid "<site_name>.<acc_name>" #[设置本地 ID - 可从站点配置 -> IPsec 菜单中获取] set dhgrp 16 set remote-gw #[Cato 次要 POP IP] set psksecret #[次要 Cato 配置 PSK] next -
输入IPsec阶段2的设置:
config vpn ipsec phase2-interface edit "CATO_Cloud_M1" #[VPN 阶段 2 名称] set phase1name "CATO_Cloud_M1" #[VPN 阶段 1 名称] set proposal aes256-sha256 set dhgrp 16 set auto-negotiate enable set comments "阶段2" set keylifeseconds 3600 next edit "CATO_Cloud_M2" #[VPN 阶段 2 名称] set phase1name "CATO_Cloud_M2" #[VPN 阶段 1 名称] set proposal aes256-sha256 set dhgrp 16 set auto-negotiate enable set comments "阶段2" set keylifeseconds 3600 next -
通过 VPN 隧道将流量路由到 Cato Cloud。
您可以使用静态路由或动态 BGP 路由来完成此操作。 在这个示例中,我们使用静态路由。
edit #[本地 FGT 唯一路由 ID] set dst 10.254.254.0 255.255.255.0 #[远程 Cato Networks 子网] set distance 1 set device "CATO_Cloud_M1" next edit #[本地 FGT 唯一路由 ID] set dst 10.254.254.0 255.255.255.0 #[远程 Cato Networks 子网] set distance 1 set priority 20 #[这将是备用连接,因此需要更高优先级] set device "CATO_Cloud_M2" next edit #[本地 FGT 唯一路由 ID] set dst 10.254.254.0 255.255.255.0 #[否则发送至黑洞 - 远程 Cato Networks] set blackhole enable set distance 254 next -
(可选) 创建一个区域,这样在创建新规则或需要更改 VPN 名称时会更容易。
config system zone edit "Cato-Cloud-Dial-up" #[区域名称] set intrazone allow set interface " CATO_Cloud_M1" " CATO_Cloud_M2" #[2 个 IPSEC VPN] next警告! 此区域配置可能会在某些版本的FortiOS操作系统上引起问题。
-
配置防火墙访问权限策略,允许隧道内的流量。
config firewall policy edit #[本地 FGT 规则 ID] set name "CATO 防火墙" set srcintf "虚拟局域网" #[本地 FGT 站点网络接口] set dstintf "Cato-Cloud-Dial-up"#[远程 Cato Networks VPN 区域或 VPN 接口] set action accept set srcaddr "全部" #[最佳实践 - 按本地地址/组进行过滤] set dstaddr "全部" #[最佳实践 - 按 Cato 地址/组进行过滤] set schedule "始终" set service "全部" next end
本部分解释如何配置 FortiOS VS3 为 Cato IPsec IKEv1 站点支持 WAN 流量的动态公网 IP 地址。
要配置 FortiOS VS 3 以连接到 IPsec IKEv1 站点:
-
输入设置来定义IPsec阶段1:
config vpn ipsec phase1 edit "Cato" set interface "wan1" set localid "<site_name>.<acc_name>" #[设置本地 ID - 可从站点配置 -> IPsec 菜单获取] set nattraversal enable set proposal aes256-sha1 set keylife 86400 set mode aggressive set add-gw-route enable set remote-gw <ip> #[Cato PoP 次要 IP] set psksecret #[主要 Cato 配置 PSK] next end -
输入设置来定义IPsec阶段2:
config vpn ipsec phase2 edit "Cato" set keepalive enable set pfs enable set phase1name "Cato" set proposal aes256-sha1 set replay enable set keylifeseconds 3600 set src-subnet 10.230.230.0 255.255.255.0 next -
配置防火墙规则:
edit <name> #[防火墙规则名称] set srcintf "internal" set dstintf "wan1" set srcaddr "全部" set dstaddr "全部" set action ipsec set schedule "始终" set service "ANY" set logtraffic enable set inbound enable set outbound enable set vpntunnel "Cato" next -
为站点配置路由:
config router static edit X set device "Cato" #[ipsec 名称] set dst 10.230.230.0 255.255.255.0 #[远程 Cato Networks 子网] next end config router static edit Y set blackhole enable set dst 10.230.230.0 255.255.255.0 #[远程 Cato Networks 子网] set distance 254 next end
本部分解释如何配置 FortiOS 为仅响应者的 Cato IPsec IKEv2 站点支持 WAN 流量的动态公网 IP 地址。 本文的这一部分解释基于路由的VPN配置。
此配置已在FortiOS 6.0.X和FortiOS 7.0.X上进行测试。
首先在 CMA 中创建 IKEv2 站点,并在 IPsec 设置中选择连接模式为 仅响应者。 这样Cato将不会发起连接。
将出现一个新子菜单,您可以选择一个身份验证标识符。 在这里选择选项KEY_ID。 系统将继续并以以下形式生成本地 ID:[XXXXXXXX].[SiteID]。 配置PSK和DH组为16。
要配置 FortiOS 的 IPsec 设置:
-
输入设置来定义IPsec阶段1:
config vpn ipsec phase1-interface 编辑 "CATO_Cloud_MK21" #[主要 VPN 名称] 设置 接口 "wan1" #[本地 FGT 站点网络 WAN 接口] 设置 ike-version 2 设置 keylife 19800 设置 peertype 任何 设置 mode-cfg 已禁用 设置 proposal aes256gcm-prfsha512 设置 本地 ID "[XXXXXXXX].[站点ID]" #[设置本地 ID - 可从 站点配置 -> IPsec 菜单获取] 设置 备注 "主要 IPSEC 2 Cato 防火墙启动" 设置 dhgrp 16 设置 nattraversal forced 设置 remote-gw #[Cato PoP 主要 IP] 设置 预共享密钥 #[主要 Cato 已配置 PSK] next 编辑 "CATO_Cloud_MK22" #[次要 VPN 名称] 设置 接口 "wan2" #[次要 FGT 站点网络 WAN 接口 – 如不适用,使用相同 WAN 接口] 设置 ike-version 2 设置 keylife 19800 设置 peertype 任何 设置 mode-cfg 已禁用 设置 proposal aes256gcm-prfsha512 设置 本地 ID "[XXXXXXXX].[站点ID]" #[设置本地 ID - 可从 站点配置 -> IPsec 菜单获取] 设置 备注 "次要 IPSEC 2 Cato 防火墙启动备份" 设置 dhgrp 16 设置 remote-gw #[Cato PoP 次要 IP] 设置 预共享密钥 #[次要 Cato 已配置 PSK] next -
输入设置来定义IPsec阶段2:
config vpn ipsec phase2-interface edit "CATO_Cloud_MK22" #[VPN 阶段 2 名称] set phase1name "CATO_Cloud_MK22" #[VPN 阶段 1 名称] set proposal aes256-sha512 set dhgrp 16 set auto-negotiate enable set keylifeseconds 3600 next edit "CATO_Cloud_MK21" #[VPN 阶段 2 名称] set phase1name "CATO_Cloud_MK21" #[VPN 阶段 1 名称] set proposal aes256-sha512 set dhgrp 16 set auto-negotiate enable set keylifeseconds 3600 next -
通过VPN隧道将流量路由到Cato Cloud:
config router static edit X #[本地 FGT 唯一路由 ID] set dst 10.254.254.0 255.255.255.0 #[远程 Cato Networks 子网 - 根据需要替换] set device "CATO_Cloud_MK21" next edit Y #[本地 FGT 唯一路由 ID] set dst 10.254.254.0 255.255.255.0 #[远程 Cato Networks 子网 - 根据需要替换] set priority 10 #[这将是备用连接,因此需要更高优先级] set device "CATO_Cloud_MK22" next edit Z #[本地 FGT 唯一路由 ID] set dst 10.254.254.0 255.255.255.0 #[否则发送至黑洞 - 远程 Cato Networks] set distance 254 set blackhole enable next -
配置防火墙访问权限策略,允许隧道内的流量。
config firewall policy edit #[本地 FGT 规则 ID] set name "From_Cato_Primary_IPsec" set srcintf "CATO_Cloud_MK21" #[远程 Cato Networks VPN 区域或 VPN 接口] set dstintf "internal_LAN" #[本地 FGT 站点网络接口或接口] set srcaddr "全部" #[最佳实践 - 按 Cato 地址/组进行过滤] set dstaddr "全部" #[最佳实践 - 按本地地址/组进行过滤] set action accept set schedule "始终" set service "全部" set logtraffic all set fsso disable #[在较新 FortiOS 版本中不需要] set comments "来自 Cato 主 IPSec 的流量" next edit #[本地 FGT 规则 ID] set name "To_Cato_Primary_IPsec" set srcintf "internal_LAN" #[本地 FGT 站点网络接口或接口] set dstintf "CATO_Cloud_MK21" #[远程 Cato Networks VPN 区域或 VPN 接口] set srcaddr "全部" #[最佳实践 - 按本地地址/组进行过滤] set dstaddr "全部" #[最佳实践 - 按 Cato 地址/组进行过滤] set action accept set schedule "始终" set service "全部" set logtraffic all set fsso disable #[在较新 FortiOS 版本中不需要] set comments "来自本地网络到 Cato 主 IPSec 的流量" next edit #[本地 FGT 规则 ID] set name "From_Cato_Secondary_IPsec" set srcintf "CATO_Cloud_MK22" #[远程 Cato Networks VPN 区域或 VPN 接口] set dstintf "internal_LAN" #[本地 FGT 站点网络接口或接口] set srcaddr "全部" #[最佳实践 - 按 Cato 地址/组进行过滤] set dstaddr "全部" #[最佳实践 - 按本地地址/组进行过滤] set action accept set schedule "始终" set service "全部" set logtraffic all set fsso disable #[在较新 FortiOS 版本中不需要] set comments "来自 Cato 次要 IPSec 的流量" next edit #[本地 FGT 规则 ID] set name "To_Cato_Secondary_IPsec" set srcintf "internal_LAN" #[本地 FGT 站点网络接口或接口] set dstintf "CATO_Cloud_MK22" #[远程 Cato Networks VPN 区域或 VPN 接口] set srcaddr "全部" #[最佳实践 - 按本地地址/组进行过滤] set dstaddr "全部" #[最佳实践 - 按 Cato 地址/组进行过滤] set action accept set schedule "始终" set service "全部" set logtraffic all set fsso disable #[在较新 FortiOS 版本中不需要] set comments "来自本地网络到 Cato 次要 IPSec 的流量" next end
要通过 GUI 配置 FortiOS 以连接到 IPsec IKEv2 FW 启动站点:
- 配置 FortiOS IPsec 设置:
-
进入 VPN > IPsec 向导,输入 VPN 名称并选择模板名称 – 自定义。 点击 下一步。
-
在下一个屏幕中按以下方式配置:
-
-
配置访问策略设置:
创建一个访问策略以允许来自和发送到 Cato IPsec 站点的流量。 进入策略 > 对象 > 防火墙策略,然后点击 创建新的。 我们建议允许来自所有防火墙网络的所有流量,但您可以根据需要选择源 / 目标 / 服务。
注意: 通常,您不需要对流量进行 NAT。
-
配置静态路由:
最后,从网络 > 静态路由 > 创建新的中添加路由。 使用您希望通过 IPsec 连接访问的 Cato IP 范围进行编译。
- 要创建备份隧道,请重复操作(1。 IPsec 连接创建使用不同的 Cato PoP IP / 2。 新 IPsec 的 FW 策略创建,当达到路由阶段时将优先级/管理距离设置为更高的数字。
-
在 Cato 管理应用程序中为站点配置动态路由设置。 为站点的主隧道和次要隧道定义私有 IP。
如果您希望在环境中配置动态路由,则必须跳过第 4 步。
-
为站点配置主要和次要 BGP 设置。
- 在 FortiGate GUI 中配置动态路由设置。
-
将每个接口与 Cato 和 FortiGate 私有 IP 配置,并启用 Ping 管理访问:
-
进入网络 > BGP 然后创建两个新的邻居镜像 Cato 配置:
-
使用与 Cato 管理应用程序相同的设置配置本地 AS:
-
点击 保存 。
您将在 Cato 管理应用程序中看到两个隧道都已上线,在站点配置 > BGP 中,状态为 通过传入连接建立 在两个 IPsec 连接上:
-
0 条评论
请登录写评论。