FortiGate 6.0 與 Sonicwall 防火牆建立 Site to Site VPN

  最近子公司借測一台新的 Fortigate,連上去後先檢查一下韌體版本,結果又是大版本異動,原先為 5.6,這次是 6.0,每一次的版本異動,在與我的 Sonicwall 建立 Site to Site VPN 時,都讓我吃足苦頭,這次不意外的也是沒有一次搞定,因此又有了這篇文章的誕生,不過相較前兩次,這次的除錯過程相對順利很多。

先回顧一下歷史:
FortiGate 4.X 與 Sonicwall 防火牆建立 Site to Site VPN:連結
FortiGate 5.6 與 Sonicwall 防火牆建立 Site to Site VPN:連結

這次的做法跟 5.6 大同小異,主要在於 Fortigate 要連到 Sonicwall 的 Policy 設定裡,NAT 要關閉 (預設是開啟的),如果沒關閉,就遇到跟 5.6 同樣的問題 (Sonicwall 可以 ping 到 Fortigate,反之不行),而 5.6 的 Blackhole routing 設定問題依然存在,必須要設對才行。


 

雙方環境如下:

Sonicwall NSA 4600 FortiGate 100E
韌體:6.5.4.4 韌體:6.0.6
Lan:
192.168.1.0/24
192.168.2.0/24

Wan:
203.1.2.3

Lan:
192.168.100.0/24
 

Wan:
203.4.5.6

【Sonicwall 設定】
1.建 Object
「Network」->「Address Objects」
Name: FortiGate_network
Zone Assignment: VPN
Type: Network
Network: 192.168.100.0
Netmask: 255.255.255.0
OK

2.設定 VPN Tunnel
「VPN」
Enable VPN
Add
–General tab
IPSec Keying Mode: IKE using Preshared Secret.
Name: FortiGate_network
IPSec primary Gateway Name or Address: 203.4.5.6
Shared Secret: 設一組密碼
Local IKE ID: IP Address (保留空白)
Peer IKE ID: IP Address (保留空白)

–Network tab
Local Network:LAN Primary Subnet(192.168.1.0/24、192.168.2.0/24)
Destination Networks:FortiGate_network(192.168.100.0/24)

–Proposals tab
IKE (Phase1) Proposal
Exchange: IKEv2 Mode
DH Group: Group 2
Encryption: 3DES
Authentication: SHA1
Life Time: 28800

IKE (Phase2) Proposal
Protocol: ESP
Encryption: 3DES
Authentication: SHA1
DH Group: Group 2
Life Time: 28800

OK

【FortiGate 設定】
1.設定 VPN
「VPN」->「IPsec Tunnels」
「Create New」
Name: SonicWall
Template Type: Custom

–Network
Remote Gateway: Static IP
IP Address: 203.1.2.3
Interface: Wan1

–Authentication
Authentication Method: Preshared Key
Pre-shared Key: 同上面Sonicwall設定的密碼
IKE Version: 2

–Phase 1 Proposal
Encryption: AES128
Authentication: SHA1
DH Group: 2
Keylife: 28800

–Phase 2 Selectors
設定第一個網段(192.168.1.0)
Name: SonicWall-192.168.1.0
Local Address: 192.168.100.0/24
Remote Address: 192.168.1.0/24

設定第二個網段(192.168.2.0)
Name: SonicWall-192.168.2.0
Local Address: 192.168.100.0/24
Remote Address: 192.168.2.0/24

–Advanced
Encryption: 3DES
Authentication: SHA1
不勾選Enable perfect forward secrecy(PFS)
Keylife: 28800

2.建立路由
設定 192.168.1.0 路由
「Network」->「Static Routes」
Create New
Destination: 192.168.1.0/24
Interface: SonicWall
Administrative Distance: 10
-Advanced Options
Priority: 3 (要大於 Blackhole 預設的 0)
OK

設定 192.168.2.0 路由
「Network」->「Static Routes」
Create New
Destination: 192.168.2.0/24
Interface: SonicWall
Administrative Distance: 10
-Advanced Options
Priority: 3 (要大於 Blackhole 預設的 0)
OK

設定 192.168.1.0 Blackhole
「Network」->「Static Routes」
Create New
Destination: 192.168.1.0/24
Interface: Blackhole
Administrative Distance: 12 (要大於一般路由預設的 10)
OK

設定 192.168.2.0 Blackhole
「Network」->「Static Routes」
Create New
Destination: 192.168.2.0/24
Interface: Blackhole
Administrative Distance: 12 (要大於一般路由預設的 10)
OK

3.設定防火牆規則
「Policy & Objects」->「IPv4 Policy」
Create New
Name: Forti2Sonicwall
Source Interface: Port 1(192.168.100.0 所在的port)
Outgoing Interface: SonicWall
Source: FortiGate_network
Destination: SonicWall_network
Schedule: always
Service: ALL
Action: Accept
關閉 NAT(這版韌體的主要問題就在此處不能開啟)
OK

Create New
Name: Sonicwall2Forti
Source Interface: SonicWall
Outgoing Interface: Port 1(192.168.100.0 所在的port)
Source: SonicWall_network
Destination: FortiGate_network
Schedule: always
Service: ALL
Action: Accept
OK

Leave a Comment

Please note: Comment moderation is enabled and may delay your comment. There is no need to resubmit your comment.