Firewall

Fortinet 多個 WAN IP 到多個埠

  • October 10, 2013

我有 5 個公共 IP 地址範圍。(即:1.1.1.1 到 1.1.1.5)

我想以 VPN 路由器(RV082)可以通過它連接並透明響應的方式透明地將第一個分配給埠 1。

我想將 NAT 的其餘部分分配給每個後續埠。(即:埠 2. 1.1.1.2)

我怎麼能做到這一點?

編輯:

網路拓撲結構:

WAN 乙太網電纜插入配置為路由器的 Fortigate 100D 上的 WAN1,第一個 IP xx.xx.xx.1 具有 NAT

WAN 公共 IP 範圍由 5 個 IP 地址組成(xx.xx.xx.1 o 5)

我有一個 RV082,它使用 IP xx.xx.xx.1 作為網路路由器插入,但在收到 100D Fortigate 後,我將其插入網路的主要控制設備,以分配 5 個不同的 WAN ip 地址以某種方式透明地連接到不同的埠,例如 RV082 可以像以前一樣連接,同時 100D 上的其他埠可以與不同的 IP 一起使用

我假設您希望繼續在 IP 地址 1.1.1.1 上定址您的 VPN 網關,因為您不想更改每個客戶端配置。如果是這種情況,那麼您將不得不使用埠轉發將流量轉發到 VPN 設備。下面的範例用於轉發 IPsec (UDP/500),但您可以將其調整為轉發 SSL 等。請注意,您的 VPN 設備可能還需要啟用 NAT-T 以便 IKE 流量通過防火牆。

下面的範例假設您將 VPN 設備插入防火牆的內部交換機埠之一,但您可以根據需要調整介面名稱(我尚未測試此配置)。

介面配置

config system interface
   edit "wan1"
       set ip 1.1.1.1 255.255.255.248
       ...
   next
   ...
   edit "internal"
       set ip 192.168.1.254 255.255.255.0
       ...
   next
end

預設路由

config router static
   edit XX
       set device "wan1"
       set gateway 1.1.1.6 #your Internet gateway IP
   next
   ...
end

埠轉發 VIP

config firewall vip
   edit "VIP_IPsec"
       set extintf "wan1"
       set portforward enable
       set mappedip 192.168.1.1 #internal IP assigned to your RV082
       set protocol udp
       set extport 500
       set mappedport 500
   next
   ...
end

埠轉發防火牆策略

config firewall policy
   edit XX
       set srcintf "internal"
       set dstintf "wan1"
       set srcaddr "ip_192.168.1.1"
       set dstaddr "all"
       set action accept
       set schedule "always"
       set service "ALL"
       set nat enable
   next
   edit XX
       set srcintf "wan1"
       set dstintf "internal"
       set srcaddr "all"
       set dstaddr "VIP_IPsec"
       set action accept
       set schedule "always"
       set service "ALL"
   next
   ...
end

一旦你這樣做了,理論上防火牆會將 1.1.1.1:500 上的所有請求轉發到 VPN 設備,並且反向流量將從 1.1.1.1 NAT 出來。

看你怎麼處理。。

– ab1

PS 不確定您是否考慮過這一點,但您的 Fortigate 防火牆可以說具有比 Linksys 設備更先進的 VPN 功能,遷移可能更有意義。

引用自:https://serverfault.com/questions/544822