更新时间:2024-10-11 GMT+08:00
示例:Fortinet飞塔防火墙VPN配置
操作场景
用户数据中心的出口防火墙选用飞塔设备,用户数据中心存在多个互联网出口,用户在华为云购买VPN网关,需要创建VPN连接连通本地网络到VPC子网。
拓扑连接
如图 多出口客户网络通过VPN接入VPC连接拓扑所示,用户数据中心存在多个互联网出口,当前指定11.11.11.11的物理接口和华为云的VPC建立VPN连接,本地子网网段为10.10.0.0/16,华为云VPC子网为172.16.0.0/24。假设您在华为云购买的VPN网关IP为22.22.22.22,现通过创建VPN连接方式来连通本地网络到VPC子网。
华为云端的VPN连接资源策略配置按照缺省信息配置,详见图2。
配置步骤
本实例以华为云端VPN配置信息为基础,详细介绍用户侧飞塔防火墙设备的VPN配置。
配置验证
- 本地VPN状态正常。
- 云端VPN状态正常。
命令行配置
- 物理接口配置
config system interface edit "port1" set vdom "root" set ip 11.11.11.11 255.255.255.0 set type physical next edit "IPsec" //隧道接口配置信息 set vdom "root" set type tunnel set interface "port1" //隧道绑定的物理接口 next end
- 接口划分区域配置
config system zone edit "trust" set intrazone allow set interface "A1" next edit "untrust" set intrazone allow set interface "port1 " next end
- 地址对象配置
config firewall address edit "hw-172.16.0.0/24" set uuid f612b4bc-5487-51e9-e755-08456712a7a0 set subnet 172.16.0.0 255.255.255.0 //云端地址网段 next edit "local-10.10.0.0/16" set uuid 9f268868-5489-45e9-d409-5abc9a946c0c set subnet 10.10.0.0 255.255.0.0 //本地地址网段 next
- IPsec配置
config vpn IPsec phase1-interface //一阶段配置 edit "IPsec" set interface "port1" set nattraversal disable set proposal aes128-sha1 set comments "IPsec" set dhgrp 5 set remote-gw 22.22.22.22 set psksecret ENC dmFyLzF4tRrIjV3T+lSzhQeU2nGEoYKC31NaYRWFJl8krlwNmZX5SfwUi5W5RLJqFu82VYKYsXp5+HZJ13VYY8O2Sn/vruzdLxqu84zbHEIQkTlf5n/63KEru1rRoNiHDTWfh3A3ep3fKJmxf43pQ7OD64t151ol06FMjUBLHgJ1ep9d32Q0F3f3oUxfDQs21Bi9RA== next end config vpn IPsec phase2-interface //二阶段配置 edit "IP-TEST" set phase1name "IPsec " set proposal aes128-sha1 set dhgrp 5 set keylifeseconds 3600 set src-subnet 10.10.0.0 255.255.0.0 set dst-subnet 172.16.0.0 255.255.255.0 next end
- 访问策略配置
config firewall policy edit 15 //策略编号15,流入至内网策略,未启用NAT set uuid 4f452870-ddb2-51e5-35c9-38a987ebdb6c set srcintf "IPsec" set dstintf "trust" set srcaddr "hw-172.16.0.0/24" set dstaddr "local-10.10.0.0/16" set action accept set schedule "always" set service "ALL" set logtraffic all next edit 29 //策略编号29,流出至云端策略,未启用NAT set uuid c2d0ec77-5254-51e9-80dc-2813ccf51463 set srcintf "trust" set dstintf "IPsec" set srcaddr "local-10.10.0.0/16" set dstaddr "hw-172.16.0.0/24" set action accept set schedule "always" set service "ALL" set logtraffic all next
- 路由配置
config router static edit 24 //路由编号24,访问云端静态路由 set dst 172.16.0.0 255.255.255.0 set gateway 11.11.11.1 set distance 10 set device "port1" config router policy edit 2 //策略路由编号2,云下访问云端策略路由 set input-device "A1" set src "10.10.00/255.255.0.0" set dst "172.16.0.0/255.255.255.0" set gateway 11.11.11.1 set output-device "port1"
父主题: 站点入云VPN经典版