Mục tiêu thực hành:
- Kiểm tra cấu hình mặc định trên cổng giao tiếp WAN của Firewall Fortigate bằng CLI.
- Thiết lập IP tĩnh trên cổng giao tiếp WAN của Firewall Fortigate bằng CLI.
- Cấu hình Default-Route trên Firewall Fortigate bằng CLI.
Các bước triển khai:
Kiểm tra cấu hình mặc định trên cổng giao tiếp WAN của Firewall Fortigate bằng CLI.
- Cổng giao tiếp WAN1 hiện đang kích hoạt tính năng DHCP Client tự động xin IP từ Router Modem.
FortiGate-61E # show system interface wan1config system interfaceedit "wan1"set vdom "root"set mode dhcpset allowaccess ping https ssh http telnetset type physicalset role wanset snmp-index 1nextendFortiGate-61E #
- Kiểm tra địa chỉ IP xin được trên cổng giao tiếp WAN1.
FortiGate-61E # show system interface ?name Name.dmz static 0.0.0.0 0.0.0.0 10.10.10.1 255.255.255.0 up disable physical enablefortilink static 0.0.0.0 0.0.0.0 169.254.1.1 255.255.255.0 up disable aggregate enableinternal static 0.0.0.0 0.0.0.0 192.168.1.99 255.255.255.0 up disable hard-switch enablemodem pppoe 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 down disable physical enablessl.root static 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 up disable tunnel enablewan1 dhcp 0.0.0.0 0.0.0.0 192.168.100.72 255.255.255.0 up disable physical enablewan2 dhcp 0.0.0.0 0.0.0.0 192.168.100.119 255.255.255.0 up disable physical enableFortiGate-61E # show system interface
Thiết lập IP tĩnh trên cổng giao tiếp WAN của Firewall Fortigate bằng CLI.
- Shutdown cổng giao tiếp WAN2 trước khi thiết lập IP trên cổng giao tiếp WAN1 vì Subnet của 2 Interface này đang bị Overlap.
FortiGate-61E # config system interfaceFortiGate-61E (interface) # edit wan2FortiGate-61E (wan2) # set status downFortiGate-61E (wan2) # endFortiGate-61E #
- Thiết lập IP trên cổng giao tiếp WAN1.
FortiGate-61E # config system interfaceFortiGate-61E (interface) # edit wan1FortiGate-61E (wan1) # set mode staticFortiGate-61E (wan1) # set ip 192.168.100.201 255.255.255.0FortiGate-61E (wan1) # endFortiGate-61E #
FortiGate-61E # show system interface ?name Name.dmz static 0.0.0.0 0.0.0.0 10.10.10.1 255.255.255.0 up disable physical enablefortilink static 0.0.0.0 0.0.0.0 169.254.1.1 255.255.255.0 up disable aggregate enableinternal static 0.0.0.0 0.0.0.0 192.168.1.99 255.255.255.0 up disable hard-switch enablemodem pppoe 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 down disable physical enablessl.root static 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 up disable tunnel enablewan1 static 0.0.0.0 0.0.0.0 192.168.100.201 255.255.255.0 up disable physical enablewan2 dhcp 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 down disable physical enableFortiGate-61E # show system interface
Cấu hình Default-Route trên Firewall Fortigate bằng CLI.
- Cấu hình Default-Route thông qua cổng giao tiếp WAN1.
FortiGate-61E # config router staticFortiGate-61E (static) # edit 1new entry '1' addedFortiGate-61E (1) # set status enableFortiGate-61E (1) # set dst 0.0.0.0 0.0.0.0FortiGate-61E (1) # set gateway 192.168.100.254FortiGate-61E (1) # set device wan1FortiGate-61E (1) # set distance 1FortiGate-61E (1) # endFortiGate-61E #
- Kiểm tra Default-Route bằng CLI.
FortiGate-61E # show router staticconfig router staticedit 1set gateway 192.168.100.254set distance 1set device "wan1"nextendFortiGate-61E #
FortiGate-61E # get router info routing-table staticRouting table for VRF=0S* 0.0.0.0/0 [1/0] via 192.168.100.254, wan1FortiGate-61E #
- Kiểm tra kết nối Internet trên Firewall Fortigate.
FortiGate-61E # execute ping 192.168.100.254PING 192.168.100.254 (192.168.100.254): 56 data bytes64 bytes from 192.168.100.254: icmp_seq=0 ttl=64 time=0.6 ms64 bytes from 192.168.100.254: icmp_seq=1 ttl=64 time=1.0 ms64 bytes from 192.168.100.254: icmp_seq=2 ttl=64 time=0.5 ms64 bytes from 192.168.100.254: icmp_seq=3 ttl=64 time=0.4 ms64 bytes from 192.168.100.254: icmp_seq=4 ttl=64 time=0.4 ms--- 192.168.100.254 ping statistics ---5 packets transmitted, 5 packets received, 0% packet lossround-trip min/avg/max = 0.4/0.5/1.0 msFortiGate-61E #
FortiGate-61E # execute ping 8.8.4.4PING 8.8.4.4 (8.8.4.4): 56 data bytes64 bytes from 8.8.4.4: icmp_seq=0 ttl=118 time=25.9 ms64 bytes from 8.8.4.4: icmp_seq=1 ttl=118 time=25.8 ms64 bytes from 8.8.4.4: icmp_seq=2 ttl=118 time=26.2 ms64 bytes from 8.8.4.4: icmp_seq=3 ttl=118 time=25.8 ms64 bytes from 8.8.4.4: icmp_seq=4 ttl=118 time=26.3 ms--- 8.8.4.4 ping statistics ---5 packets transmitted, 5 packets received, 0% packet lossround-trip min/avg/max = 25.8/26.0/26.3 msFortiGate-61E #
Tham khảo thêm các hướng dẫn thực hành Firewall Fortigate khác tại bài viết Tổng hợp các bài thực hành Firewall Fortigate trên Unetlab, các bạn có thể tham khảo Khóa học Chuyên đề Firewall Fortigate, hoặc liên hệ với mình thông qua kênh Zalo (Jade Bùi) 076.877.2021 để được giải đáp.
0 comments