飛塔防火墻配置
更新時間 2024-01-04 17:02:36
最近更新時間: 2024-01-04 17:02:36
分享文章
本文為您介紹飛塔防火墻如何在本地站點中加載VPN配置。
使用IPsec VPN建立站點到站點的連接時,在配置完天翼云VPN網關后,您還需在本地站點的網關設備中進行VPN配置。
前提條件
- 已經在天翼云VPC內創建了IPsec連接。
- 已經下載了IPsec連接的配置。
IPsec協議信息
配置 示例值 IKE 認證算法 SHA1 加密算法 AES-128 DH分組 Group5 IKE版本 IKEv1 生命周期 86400 協商模式 main PSK ct***Forti IPsec 認證算法 SHA1 加密算法 AES-128 PFS DH group5 生命周期 3600
網絡配置信息
| 配置項 | 示例值 |
|---|---|
| VPC | 待和本地IDC互通的私網網段。 |
| VPN網關 | 天翼云VPN網關的公網IP地址。 |
| 本地IDC | 待和天翼云VPC互通的私網網段。 |
| 本地IDC | 本地網關設備的公網IP地址。 |
操作步驟
- 以命令行方式登錄飛塔防火墻命令行。
- 添加IPsec VPN第一階段的IKE配置。
config vpn ipsec phase1-interface
edit "Fotri_ctyun"
set interface "wan"
set peertype any
set net-device disable
set proposal aes128-sha1
set dpd on-idle
set dhgrp 5
set keylife 86400
set remote-gw 121.***.***.152
set psksecret ct***Forti
next
end
- 添加IPsec VPN第二階段的IPsec配置。
config vpn ipsec phase2-interface
edit "Fotri_ctyun"
set phase1name "Fotri_ctyun"
set proposal aes128-sha1
set dhgrp 5
set keylifeseconds 3600
set auto-negotiate enable
set src-subnet 192.168.0.0 255.255.255.0
set dst-subnet 192.168.3.0 255.255.255.0
next
end
- 配置防火墻策略。
config firewall address
edit "Local_192.168.0.0/24"
set subnet 192.168.0.0 255.255.255.0
next
edit "Remote_192.168.3.0/24"
set subnet 192.168.3.0 255.255.255.0
next
edit "ctyun_VPN_Gateway"
set subnet 121.***.***.152 255.255.255.255
next
end
config firewall policy
edit 4
set srcintf "lan"
set dstintf "to_ctyun"
set action accept
set srcaddr "Local_192.168.0.0/24"
set dstaddr "Remote_192.168.3.0/24"
set schedule "always"
set service "ALL"
next
edit 5
set srcintf "to_ctyun"
set dstintf "lan"
set action accept
set srcaddr "Remote_192.168.3.0/24"
set dstaddr "Local_192.168.0.0/24"
set schedule "always"
set service "ALL"
next
end
- 配置訪問VPC的靜態路由。
config router static
edit 3
set dst 192.168.3.0 255.255.255.0
set device "to_ctyun"
next
edit 4
set dst 192.168.3.0 255.255.255.0
set distance 254
set blackhole enable
next
end
- 測試連通性。
您可以利用您的云主機和數據中心的主機進行連通性測試。