FortiGate (FortiOS) จัดการ VPN ผ่าน Web GUI / CLI การลบ VPN ขึ้นอยู่กับประเภท: SSL-VPN, IPsec Site-to-Site, Dial-up IPsec
วิธีลบ FortiClient VPN (Client Software)
- Windows: Settings → Apps → Installed Apps → FortiClient → Uninstall
- macOS: Applications → FortiClient → Move to Trash
- Linux:
sudo apt remove forticlient/sudo rpm -e forticlient
วิธีลบ IPsec VPN จาก FortiGate (GUI)
- Login FortiGate GUI → VPN → IPsec Tunnels
- หา Tunnel ที่ต้องการลบ → คลิก Edit (Pencil)
- หน้า Edit: คลิก Delete (ไอคอนถังขยะ) → OK
- หากลบไม่ได้ (Referenced): ตรวจสอบ Policy, Static Routes, SD-WAN, Zone ที่อ้างอิง Tunnel นี้ → ลบ Reference ก่อน
วิธีเพิ่ม VPN บน FortiGate (SSL-VPN)
- VPN → SSL-VPN Settings
- Listen on Interface: wan1 (หรือ WAN Interface)
- Listen Port: 10443 (Default 443 ชน Admin GUI)
- Restrict Access: Limit access to specific hosts (แนะนำ)
- Server Certificate: ใส่ Valid Cert (Let's Encrypt / Public CA)
- Authentication/Portal Mapping: สร้าง User Group → Map Portal
วิธีลบ VPN Tunnel บน FortiGate (CLI)
config vpn ipsec phase1-interface
edit "Tunnel_Name"
next
end
config vpn ipsec phase2-interface
edit "Tunnel_Name"
next
end
# ลบ Phase2 ก่อน Phase1
config vpn ipsec phase1-interface
delete "Tunnel_Name"
end
Debug IPsec Tunnel FortiGate
- ตรวจสอบ Physical: Cable, SFP, Link Light
- FortiGate LED: Status, HA, Disk
- Ping Peer IP (ICMP)
- ตรวจสอบ Interface: NAT/Route Mode, IP Address, MTU
- Security Policy: Allow IPsec Traffic (UDP 500, 4500, ESP)
- Static Routes: ถูกต้องสำหรับ Subnet Remote
- Debug Commands:
diagnose vpn ike log-filter dst-ip4 x.x.x.x diagnose debug application ike -1 diagnose debug enable
ต้องการ FortiClient VPN ไหม?
ต้องการหาก: บริษัทบังคับใช้ (Zero Trust Network Access - ZTNA), ต้องการ Endpoint Compliance Check (AV, Patch, Encryption), ใช้ FortiToken/2FA บังคับ ไม่ต้องการหาก: ใช้ VPN มาตรฐาน OpenVPN/WireGuard ได้
ลบ IPsec (Windows/Linux) ยังไง?
Windows: Registry → HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\RasMan\Parameters → New DWORD: ProhibitIpSec = 1 → Reboot
Linux: sudo ip xfrm state flush && sudo ip xfrm policy flush (Flush SA/SP)
Reset IPsec VPN Tunnel FortiGate
- Monitor → IPsec Monitor
- Filter: IPsec Site-to-Site / Dialup
- Select Tunnel → Right-click → Bring Down / Bring Up
- CLI:
execute vpn ipsec tunnel-down "Tunnel_Name"→execute vpn ipsec tunnel-up "Tunnel_Name"