差異處

這裏顯示兩個版本的差異處。

連向這個比對檢視

兩邊的前次修訂版 前次修改
下次修改
前次修改
tech:fortigate_tips [2019/10/24 09:31] jonathan_tsaitech:fortigate_tips [2025/10/17 11:05] (目前版本) – [設定 HA] jonathan
行 80: 行 80:
     * ++點這裡看參考畫面|{{:tech:2018060501.png}}++     * ++點這裡看參考畫面|{{:tech:2018060501.png}}++
 </note> </note>
 +
 +===== 防止暴力登入 SSL VPN 方式 =====
 +  * 參考 - https://community.fortinet.com/t5/FortiGate/Technical-Tip-How-to-limit-SSL-VPN-login-attempts-and-block/ta-p/194229?externalID=FD48714
 +  * 當 Log & Report 的 VPN Events 出現大量 ssl-login-fail , sslvpn_login_unknown_user 狀況
 +  * 設定當 SSL VPN 登入失敗超過 x 次就鎖定 n 秒, 來降低嘗試暴力登入的狀況 Exp. 失敗超過 3 次, 就鎖 3600 秒<cli>
 +config vpn ssl settings
 +    set login-attempt-limit 3
 +    set login-block-time 3600
 +end
 +</cli>
 +
 +===== 當出現 CPU 100% 時釐清問題方式 =====
 +  - 看哪個服務造成 <cli>diagnose sys top -d 3</cli> Exp. <cli>
 +FortiGate # diagnose sys top -d 3
 +Run Time:  443 days, 19 hours and 44 minutes
 +17U, 0N, 3S, 80I; 1838T, 1135F
 +         sslvpnd    10073      R      93.2     1.5
 +          newcli    24900      R       1.4     1.0
 +       ipsengine      158      S <     0.0     4.0
 +Run Time:  443 days, 19 hours and 44 minutes
 +26U, 0N, 3S, 71I; 1838T, 1135F
 +         sslvpnd    10073      S      92.2     1.5
 +          httpsd    24886      S       3.9     1.5
 +          httpsd    23905      S       1.3     1.6
 + 
 +FortiGate #  
 +</cli>釐清是 sslvpnd 造成
 +  - 先刪除這程序 <cli>diagnose sys kill 11 {pid}</cli>Exp. <cli>diagnose sys kill 11 10073</cli>
 +  - 針對這程序進行處理, Exp. 遭受攻擊 : 找出並封鎖攻擊來源
  
 ===== IPSec - L2TP 用戶撥入 VPN 設定 ===== ===== IPSec - L2TP 用戶撥入 VPN 設定 =====
行 95: 行 124:
 </code> </code>
   * 可以在外部 192.168.1.140 的 Windows 10 PC 執行 ping 與 tracert , 只要有經過 Fortigate 就會顯示流量訊息   * 可以在外部 192.168.1.140 的 Windows 10 PC 執行 ping 與 tracert , 只要有經過 Fortigate 就會顯示流量訊息
-    * ping 範例 ++PC 端 |<xtermrtf>+    * ping 範例 ++PC 端 |<cli>
 C:\Users\jonathan>ping 192.168.0.250 C:\Users\jonathan>ping 192.168.0.250
  
行 102: 行 131:
 回覆自 192.168.0.250: 位元組=32 時間=41ms TTL=62 回覆自 192.168.0.250: 位元組=32 時間=41ms TTL=62
  
-</xtermrtf> ++ ++Fortigate 端 |<xtermrtf>+</cli> ++ ++Fortigate 端 |<cli>
 TPFortiGate40C-1 # diag debug reset TPFortiGate40C-1 # diag debug reset
  
行 122: 行 151:
 0 packets dropped by kernel 0 packets dropped by kernel
  
-</xtermrtf>++ +</cli>++ 
-    * tracert 範例 ++PC 端 |<xtermrtf>+    * tracert 範例 ++PC 端 |<cli>
 C:\Users\jonathan>tracert 192.168.0.250 C:\Users\jonathan>tracert 192.168.0.250
  
行 133: 行 162:
  
 追蹤完成。 追蹤完成。
-</xtermrtf>++  ++Fortigate 端 |<xtermrtf>+</cli>++  ++Fortigate 端 |<cli>
 TPFortiGate40C-1 # diagnose sniffer packet any "host 192.168.0.250 and icmp" 4 TPFortiGate40C-1 # diagnose sniffer packet any "host 192.168.0.250 and icmp" 4
 interfaces=[any] interfaces=[any]
行 167: 行 196:
 27 packets received by filter 27 packets received by filter
 0 packets dropped by kernel 0 packets dropped by kernel
-</xtermrtf>+++</cli>++
  
 ===== FortiGate 60D 特別設定 ===== ===== FortiGate 60D 特別設定 =====
 ==== 端對端 VPN 使用 traceroute 非預期出現 DMZ IP ==== ==== 端對端 VPN 使用 traceroute 非預期出現 DMZ IP ====
-  * 參考 - http://kb.fortinet.com/kb/microsites/search.do?cmd=displayKC&docType=kc&externalId=FD36799&sliceId=1&docTypeID=DT_KCARTICLE_1_1&dialogID=116930985&stateId=0%200%20116932943 <xtermrtf>+  * 參考 - http://kb.fortinet.com/kb/microsites/search.do?cmd=displayKC&docType=kc&externalId=FD36799&sliceId=1&docTypeID=DT_KCARTICLE_1_1&dialogID=116930985&stateId=0%200%20116932943 <cli>
 traceroute 192.168.1.5 traceroute 192.168.1.5
  
行 178: 行 207:
   60-248-245-172.HINET-IP.hinet.net (60.248.245.172)  14.593 ms  14.556 ms  14.483 ms   60-248-245-172.HINET-IP.hinet.net (60.248.245.172)  14.593 ms  14.556 ms  14.483 ms
   192.168.1.5 (192.168.1.5)  20.283 ms  20.285 ms  20.261 ms   192.168.1.5 (192.168.1.5)  20.283 ms  20.285 ms  20.261 ms
-</xtermrtf+</cli
-  * 只要設定 VPN 虛擬介面的 IP 即可解決 Exp. 192.168.101.254 ++看畫面|{{:tech:2018082301.png}}++ <xtermrtf>+  * 只要設定 VPN 虛擬介面的 IP 即可解決 Exp. 192.168.101.254 ++看畫面|{{:tech:2018082301.png}}++ <cli>
 traceroute 192.168.1.5 traceroute 192.168.1.5
 traceroute to 192.168.1.5 (192.168.1.5), 30 hops max, 60 byte packets traceroute to 192.168.1.5 (192.168.1.5), 30 hops max, 60 byte packets
行 185: 行 214:
   192.168.101.254 (192.168.101.254)  15.170 ms  15.092 ms  13.887 ms   192.168.101.254 (192.168.101.254)  15.170 ms  15.092 ms  13.887 ms
   192.168.1.5 (192.168.1.5)  16.199 ms  16.203 ms  16.184 ms   192.168.1.5 (192.168.1.5)  16.199 ms  16.203 ms  16.184 ms
-</xtermrtf>+</cli>
  
 ===== FortiGate 40C 特別設定 ===== ===== FortiGate 40C 特別設定 =====
行 193: 行 222:
 ==== 建立 VLAN ==== ==== 建立 VLAN ====
   * http://kb.fortinet.com/kb/viewContent.do?externalId=FD33738   * http://kb.fortinet.com/kb/viewContent.do?externalId=FD33738
 +  * https://community.fortinet.com/t5/FortiGate/Technical-Tip-How-to-create-a-VLAN-tagged-interface-802-1q-on-a/ta-p/193893
  
 ==== 設定 HA ==== ==== 設定 HA ====
行 212: 行 242:
   * 預計設定的 HA 架構與模式   * 預計設定的 HA 架構與模式
     * 設定 HA 的模式 : FGCP Active-Active HA (這模式最多可以設定到四台 FortiGate((fortigate-ha-56.pdf Page.24)))     * 設定 HA 的模式 : FGCP Active-Active HA (這模式最多可以設定到四台 FortiGate((fortigate-ha-56.pdf Page.24)))
-    * ++配置架構圖 |<ditaa name=env_desc>+    * 配置架構圖 
 + 
 +<mermaid> 
 +graph TD 
 +    Internet["Internet"
 +    Router["VDSL Router"
 +    FG1["Fortigate 40c<br/>ichiayi-01-FG40C"
 +    FG2["Fortigate 40c<br/>ichiayi-02-FG40C"
 +    Switch["Internal Switch"
 +    PC1["PC or NB"] 
 +    AP["Wi-Fi AP"] 
 +    PC2["PC or NB"] 
 +     
 +    Internet <-->|"WAN"| Router 
 +    Router -->|"Static IP (wan1)"| FG1 
 +    Router -->|"Static IP (wan1)"| FG2 
 +    FG1 <-->|"wan2 HA 連線"| FG2 
 +    FG1 -->|"Internal"| Switch 
 +    FG2 -->|"Internal"Switch 
 +    Switch --> PC1 
 +    Switch --> AP 
 +    Switch --> PC2 
 +     
 +    style Internet fill:#e1f5ff,stroke:#333,stroke-width:3px 
 +    style Router fill:#fff4e1,stroke:#333,stroke-width:2px 
 +    style FG1 fill:#cce5ff,stroke:#333,stroke-width:2px 
 +    style FG2 fill:#d4f1d4,stroke:#333,stroke-width:2px 
 +    style Switch fill:#ffe1e1,stroke:#333,stroke-width:2px 
 +    style PC1 fill:#f0f0f0,stroke:#333,stroke-width:2px 
 +    style AP fill:#fff0cc,stroke:#333,stroke-width:2px 
 +    style PC2 fill:#f0f0f0,stroke:#333,stroke-width:2px 
 +</mermaid>
  
-                                        /---------------\ 
-                                        |               | 
-                                        |   Internet    | 
-                                        |               | 
-                                        \-------^-------/ 
-                                                | 
-                                                v 
-                                        +-------+-------+  
-                                        |               | 
-                                        |  VDSL Router  | 
-                                        |               | 
-                                        +----+-----+----+ 
-                                    Static IP^     ^Static IP 
-                                                 | 
-                            +----------------+     +-----------------+ 
-                        wan1|                                        |wan1 
-                            v                                        v 
-        +----------------------+                                  +----------------------+ 
-        |cBLU                  |wan2                          wan2|                      | 
-        | Fortigate 40c        |<---------------==--------------->| Fortigate 40c        | 
-        |    ichiayi-01-FG40C  |                                  |    ichiayi-02-FG40C  | 
-        |                      |                                  |             cGRE     | 
-        +-------------------^--+                                  +--^-------------------+ 
-                    Internal|                                        |Internal 
-                            +----------------+      +----------------+ 
-                                                  | 
-                                                  v 
-                                    +------------------------+ 
-                                    |                        | 
-                                    |    Internal Switch     | 
-                                    |                        | 
-                                    +---^-------^-------^----+ 
-                                        |             | 
-                               +--------+             +--------+ 
-                                              |                | 
-                                              |                v 
-                    +-------------+                     +--------------+ 
-                    |                                              |  
-                    |   +------------+      +-------+       +--------------+ 
-                    |              |      | Wi-Fi |                    | 
-                    |    PC or NB  |      |  AP          PC or NB    |    
-                    +---|            |      +-------+     +---|              | 
-                        +------------+                        +--------------+ 
-</ditaa>++ 
   * 設定方式   * 設定方式
     - 每一台都登入啟用 HA ++CLI 語法|<code sh>     - 每一台都登入啟用 HA ++CLI 語法|<code sh>
行 439: 行 456:
   * http://cookbook.fortinet.com/redundant-internet-connections-54/   * http://cookbook.fortinet.com/redundant-internet-connections-54/
   * http://kb.fortinet.com/kb/documentLink.do?externalID=FD33338   * http://kb.fortinet.com/kb/documentLink.do?externalID=FD33338
- 
-<html><a href="https://www.everplast.com.tw/product/machine/extruder-machine/">Everplast – 
-Extruder Machine</a></html> 
  
 {{tag>firewall fortigate}} {{tag>firewall fortigate}}
  • tech/fortigate_tips.1571880662.txt.gz
  • 上一次變更: 2019/10/24 09:31
  • jonathan_tsai