Tài liệu học Fortinet từ cơ bản đến nâng cao
Mục lục
- Giới thiệu về Fortinet
- Cơ bản về FortiGate
- Cấu hình cơ bản
- Firewall Policies
- Routing
- VPN
- UTM Features
- High Availability
- Monitoring và Logging
- Troubleshooting
- Tính năng nâng cao
- Lab thực hành
Giới thiệu về Fortinet
Fortinet là gì?
Fortinet là công ty hàng đầu về bảo mật mạng, cung cấp các giải pháp bảo mật tích hợp thông qua nền tảng Fortinet Security Fabric. Các sản phẩm chính bao gồm:
- FortiGate: Next-Generation Firewall (NGFW)
- FortiAnalyzer: Giải pháp phân tích và báo cáo bảo mật
- FortiManager: Quản lý tập trung các thiết bị FortiGate
- FortiMail: Bảo mật email
- FortiWeb: Web Application Firewall
- FortiSandbox: Phân tích mã độc sandbox
Ưu điểm của Fortinet
- Hiệu suất cao với ASIC chuyên dụng
- Tích hợp nhiều tính năng bảo mật trong một thiết bị
- Interface quản lý trực quan
- Giá thành cạnh tranh
- Hỗ trợ kỹ thuật tốt
Cơ bản về FortiGate
Kiến trúc FortiGate
FortiGate sử dụng kiến trúc đa lõi với:
- Management Core: Quản lý hệ thống
- Network Processing Unit (NPU): Xử lý network traffic
- Content Processor (CP): Xử lý security functions
Các model FortiGate phổ biến
- Entry Level: FortiGate 60F, 80F, 100F
- Mid-Range: FortiGate 200F, 300F, 400F
- High-End: FortiGate 600F, 800F, 1000F+
- Virtual: FortiGate VM
FortiOS
FortiOS là hệ điều hành chạy trên FortiGate với:
- Kernel Linux tùy chỉnh
- Web-based GUI
- CLI interface
- REST API
Cấu hình cơ bản
Truy cập FortiGate lần đầu
- Kết nối Console: Sử dụng cable console để kết nối
- Default IP: 192.168.1.99 (port1)
- Default Account: admin/password trống
- Web GUI: https://192.168.1.99
Initial Setup
# Đổi mật khẩu admin
config system admin
edit "admin"
set password "YourStrongPassword"
next
end
# Cấu hình hostname
config system global
set hostname "FortiGate-01"
set timezone "Asia/Ho_Chi_Minh"
end
# Cấu hình NTP
config system ntp
set ntpsync enable
set type fortiguard
end
Cấu hình Interface
# Cấu hình WAN interface
config system interface
edit "wan1"
set mode static
set ip 203.0.113.10 255.255.255.0
set allowaccess ping https ssh
set role wan
next
end
# Cấu hình LAN interface
config system interface
edit "internal"
set mode static
set ip 192.168.1.1 255.255.255.0
set allowaccess ping https ssh http
set role lan
next
end
Cấu hình DNS
config system dns
set primary 8.8.8.8
set secondary 8.8.4.4
end
Firewall Policies
Khái niệm cơ bản
Firewall Policy là quy tắc điều khiển traffic giữa các zone/interface:
- Source: Nguồn traffic (interface, địa chỉ IP)
- Destination: Đích traffic (interface, địa chỉ IP)
- Service: Dịch vụ/port được phép
- Action: Accept/Deny
- Security Profiles: UTM features
Tạo Address Objects
# Tạo subnet object
config firewall address
edit "LAN_Subnet"
set subnet 192.168.1.0 255.255.255.0
next
edit "DMZ_Server"
set subnet 192.168.100.10 255.255.255.255
next
end
# Tạo address group
config firewall addrgrp
edit "Internal_Networks"
set member "LAN_Subnet"
next
end
Tạo Service Objects
# Tạo custom service
config firewall service custom
edit "HTTP_8080"
set tcp-portrange 8080
next
edit "HTTPS_8443"
set tcp-portrange 8443
next
end
# Tạo service group
config firewall service group
edit "Web_Services"
set member "HTTP" "HTTPS" "HTTP_8080"
next
end
Tạo Firewall Policy
# Policy cho phép LAN ra Internet
config firewall policy
edit 1
set name "LAN_to_WAN"
set srcintf "internal"
set dstintf "wan1"
set srcaddr "LAN_Subnet"
set dstaddr "all"
set service "ALL"
set action accept
set nat enable
set logtraffic all
next
end
Security Profiles
# Antivirus Profile
config antivirus profile
edit "AV_Profile"
config http
set archive-block exe
end
config ftp
set archive-block exe
end
next
end
# Web Filter Profile
config webfilter profile
edit "Web_Filter"
config ftgd-wf
config filters
edit 1
set category 26
set action block
next
end
end
next
end
Routing
Static Routing
# Default route
config router static
edit 1
set gateway 203.0.113.1
set device "wan1"
next
edit 2
set dst 10.0.0.0 255.0.0.0
set gateway 192.168.1.254
set device "internal"
next
end
Dynamic Routing - OSPF
config router ospf
set router-id 1.1.1.1
config area
edit 0.0.0.0
next
end
config network
edit 1
set prefix 192.168.1.0 255.255.255.0
set area 0.0.0.0
next
end
end
Policy-Based Routing
config router policy
edit 1
set input-device "internal"
set srcaddr "192.168.1.0/24"
set dstaddr "10.0.0.0/8"
set gateway 192.168.1.254
set output-device "wan2"
next
end
VPN
IPSec VPN Site-to-Site
# Phase 1 (IKE)
config vpn ipsec phase1-interface
edit "VPN_HQ"
set interface "wan1"
set keylife 86400
set peertype any
set proposal aes256-sha256
set remote-gw 203.0.113.20
set psksecret "YourPSK"
next
end
# Phase 2 (IPSec)
config vpn ipsec phase2-interface
edit "VPN_HQ"
set phase1name "VPN_HQ"
set proposal aes256-sha256
set keylifeseconds 3600
set src-subnet 192.168.1.0 255.255.255.0
set dst-subnet 192.168.2.0 255.255.255.0
next
end
# Static route cho VPN
config router static
edit 3
set dst 192.168.2.0 255.255.255.0
set device "VPN_HQ"
next
end
# Firewall policy cho VPN
config firewall policy
edit 10
set srcintf "internal"
set dstintf "VPN_HQ"
set srcaddr "LAN_Subnet"
set dstaddr "all"
set service "ALL"
set action accept
next
end
SSL VPN
# SSL VPN Settings
config vpn ssl settings
set port 10443
set source-interface "wan1"
set source-address "all"
set default-portal "tunnel-access"
end
# SSL VPN Portal
config vpn ssl web portal
edit "tunnel-access"
set tunnel-mode enable
set split-tunneling enable
set ipv4-split-tunnel-routing-address "SSL_VPN_Split"
next
end
# User cho SSL VPN
config user local
edit "vpnuser1"
set type password
set passwd "StrongPassword123"
next
end
# User Group
config user group
edit "SSL_VPN_Users"
set member "vpnuser1"
next
end
UTM Features
Antivirus
config antivirus profile
edit "default"
config http
set archive-block exe com bat
set emulator enable
end
config ftp
set archive-block exe com bat
end
config imap
set emulator enable
end
config pop3
set emulator enable
end
config smtp
set emulator enable
end
next
end
Intrusion Prevention System (IPS)
config ips sensor
edit "default"
config entries
edit 1
set sig-id all
set status enable
set action pass
set log enable
next
end
next
end
Application Control
config application list
edit "default"
config entries
edit 1
set category 6
set action block
set log enable
next
edit 2
set application 16920
set action block
set log enable
next
end
next
end
Web Filtering
config webfilter profile
edit "default"
config ftgd-wf
set options error-allow
config filters
edit 1
set category 26
set action block
next
edit 2
set category 61
set action block
next
end
end
next
end
High Availability (HA)
Active-Passive HA
# Trên Primary FortiGate
config system ha
set group-name "HA_Group"
set mode a-p
set hbdev "port3" 50
set session-pickup enable
set ha-mgmt-status enable
config ha-mgmt-interfaces
edit 1
set interface "port4"
set gateway 192.168.100.1
next
end
end
# Trên Secondary FortiGate
config system ha
set group-name "HA_Group"
set mode a-p
set hbdev "port3" 100
set priority 50
set override disable
end
Active-Active HA
config system ha
set group-name "HA_AA"
set mode a-a
set hbdev "port3" 50
set load-balance-all enable
set session-pickup enable
end
Monitoring và Logging
FortiView
FortiView cung cấp real-time monitoring:
- Top Sources/Destinations
- Top Applications
- Top Websites
- Bandwidth Usage
Log Configuration
# Memory logging
config log memory setting
set status enable
end
# Disk logging
config log disk setting
set status enable
set diskfull overwrite
end
# Syslog
config log syslogd setting
set status enable
set server "192.168.1.100"
set port 514
end
SNMP Configuration
config system snmp sysinfo
set status enable
set description "FortiGate Firewall"
set contact-info "IT Admin"
set location "Data Center"
end
config system snmp community
edit 1
set name "public"
set hosts "192.168.1.0/24"
next
end
Troubleshooting
Các lệnh Debug cơ bản
# Debug flow
diagnose debug flow filter addr 192.168.1.100
diagnose debug flow show function-name enable
diagnose debug flow trace start 100
diagnose debug enable
# Debug route
get router info routing-table all
# Debug VPN
diagnose vpn tunnel list
diagnose vpn ike gateway list
# Monitor session
get system session list
# Hardware info
get system status
get hardware status
Packet Capture
# Capture trên interface
diagnose sniffer packet wan1 'host 192.168.1.100' 4 100
# Capture với filter
diagnose sniffer packet any 'port 80' 6 0 a
Log Analysis
# Xem log real-time
execute log filter device disk
execute log filter category traffic
execute log display
# Xem log cụ thể
execute log filter field srcip 192.168.1.100
execute log display
Tính năng nâng cao
SD-WAN
# Cấu hình SD-WAN interface
config system sdwan
set status enable
config zone
edit "virtual-wan-link"
next
end
config members
edit 1
set interface "wan1"
set gateway 203.0.113.1
set priority 10
next
edit 2
set interface "wan2"
set gateway 203.0.114.1
set priority 20
next
end
config health-check
edit "ping-check"
set server "8.8.8.8"
set members 1 2
next
end
config service
edit 1
set name "Critical-Apps"
set mode priority
set src "all"
set dst "all"
set priority-members 1 2
next
end
end
Security Fabric
# Cấu hình Fabric Connector
config system csf
set status enable
set group-name "Security_Fabric"
set group-password "FabricPassword"
end
# Upstream FortiGate
config system csf
set upstream-ip 192.168.1.10
set upstream-port 8013
end
Automation (Fabric Connector)
# AWS Connector
config system sdn-connector
edit "aws-connector"
set type aws
set access-key "YOUR_ACCESS_KEY"
set secret-key "YOUR_SECRET_KEY"
set region "ap-southeast-1"
set update-interval 60
next
end
FortiGuard Services
# Cấu hình FortiGuard
config system fortiguard
set protocol https
set port 443
set update-server-location usa
set antispam-force-off disable
set antispam-cache enable
set antispam-expiration 86400
end
# License info
diagnose autoupdate versions
get system fortiguard
Lab thực hành
Lab 1: Cấu hình cơ bản
Mục tiêu: Cấu hình FortiGate từ đầu với basic connectivity
Bước thực hiện:
- Reset FortiGate về factory default
- Cấu hình WAN interface với IP tĩnh
- Cấu hình LAN interface
- Tạo basic firewall policy
- Test connectivity
Lab 2: VPN Site-to-Site
Mục tiêu: Kết nối 2 site qua IPSec VPN
Topology:
Site A (192.168.1.0/24) ---- Internet ---- Site B (192.168.2.0/24)
Cấu hình:
- Cấu hình Phase 1 trên cả 2 site
- Cấu hình Phase 2
- Tạo static route
- Tạo firewall policy
- Test connectivity
Lab 3: SSL VPN
Mục tiêu: Cấu hình SSL VPN cho remote access
Bước thực hiện:
- Cấu hình SSL VPN settings
- Tạo user và group
- Cấu hình portal
- Test kết nối từ client
Lab 4: UTM Features
Mục tiêu: Cấu hình và test các tính năng UTM
Bước thực hiện:
- Cấu hình Antivirus profile
- Cấu hình Web Filter
- Cấu hình Application Control
- Apply vào firewall policy
- Test blocking
Lab 5: High Availability
Mục tiêu: Cấu hình HA Active-Passive
Bước thực hiện:
- Chuẩn bị 2 FortiGate cùng model
- Cấu hình HA trên primary
- Cấu hình HA trên secondary
- Test failover
- Monitor HA status
Kết luận
Tài liệu này cung cấp kiến thức từ cơ bản đến nâng cao về Fortinet FortiGate. Để thành thạo, bạn cần:
- Thực hành thường xuyên với các lab scenario
- Đọc documentation chính thức từ Fortinet
- Tham gia training NSE (Network Security Expert)
- Theo dõi Fortinet blog và community
- Cập nhật kiến thức với các version mới
Tài liệu tham khảo
- Fortinet Documentation Library
- NSE Training Materials
- Fortinet Cookbook
- Community Forums
Certification Path
- NSE 1: Information Security Awareness
- NSE 2: The Evolution of Cybersecurity
- NSE 3: FortiGate Security
- NSE 4: FortiGate Security
- NSE 5: FortiAnalyzer
- NSE 6: FortiWeb
- NSE 7: Enterprise Firewall
- NSE 8: Written Exam
Chúc bạn học tập hiệu quả!
Nhận xét