Firewall Fortigate: (01-04) Thiết lập IP trên cổng giao tiếp WAN của Firewall Fortigate bằng CLI

By , 0 View

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 wan1
config system interface
    edit "wan1"
        set vdom "root"
        set mode dhcp
        set allowaccess ping https ssh http telnet
        set type physical
        set role wan
        set snmp-index 1
    next
end

FortiGate-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  enable   
fortilink   static   0.0.0.0 0.0.0.0  169.254.1.1 255.255.255.0  up   disable   aggregate  enable   
internal   static   0.0.0.0 0.0.0.0  192.168.1.99 255.255.255.0  up   disable   hard-switch  enable   
modem   pppoe   0.0.0.0 0.0.0.0  0.0.0.0 0.0.0.0  down   disable   physical  enable   
ssl.root   static   0.0.0.0 0.0.0.0  0.0.0.0 0.0.0.0  up   disable   tunnel  enable   
wan1   dhcp   0.0.0.0 0.0.0.0  192.168.100.72 255.255.255.0  up   disable   physical  enable   
wan2   dhcp   0.0.0.0 0.0.0.0  192.168.100.119 255.255.255.0  up   disable   physical  enable   

FortiGate-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 interface 
FortiGate-61E (interface) # edit wan2
FortiGate-61E (wan2) # set status down
FortiGate-61E (wan2) # end
FortiGate-61E # 

- Thiết lập IP trên cổng giao tiếp WAN1.
FortiGate-61E # config system interface 
FortiGate-61E (interface) # edit wan1
FortiGate-61E (wan1) # set mode static 
FortiGate-61E (wan1) # set ip 192.168.100.201 255.255.255.0
FortiGate-61E (wan1) # end
FortiGate-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  enable   
fortilink   static   0.0.0.0 0.0.0.0  169.254.1.1 255.255.255.0  up   disable   aggregate  enable   
internal   static   0.0.0.0 0.0.0.0  192.168.1.99 255.255.255.0  up   disable   hard-switch  enable   
modem   pppoe   0.0.0.0 0.0.0.0  0.0.0.0 0.0.0.0  down   disable   physical  enable   
ssl.root   static   0.0.0.0 0.0.0.0  0.0.0.0 0.0.0.0  up   disable   tunnel  enable   
wan1   static   0.0.0.0 0.0.0.0  192.168.100.201 255.255.255.0  up   disable   physical  enable   
wan2   dhcp   0.0.0.0 0.0.0.0  0.0.0.0 0.0.0.0  down   disable   physical  enable   

FortiGate-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 static 
FortiGate-61E (static) # edit 1
new entry '1' added
FortiGate-61E (1) # set status enable
FortiGate-61E (1) # set dst 0.0.0.0 0.0.0.0 
FortiGate-61E (1) # set gateway 192.168.100.254
FortiGate-61E (1) # set device wan1
FortiGate-61E (1) # set distance 1
FortiGate-61E (1) # end
FortiGate-61E # 

- Kiểm tra Default-Route bằng CLI.
FortiGate-61E # show router static 
config router static
    edit 1
        set gateway 192.168.100.254
        set distance 1
        set device "wan1"
    next
end

FortiGate-61E # 

FortiGate-61E # get router info routing-table static 
Routing table for VRF=0
S*      0.0.0.0/0 [1/0] via 192.168.100.254, wan1

FortiGate-61E # 

- Kiểm tra kết nối Internet trên Firewall Fortigate.
FortiGate-61E # execute ping 192.168.100.254
PING 192.168.100.254 (192.168.100.254): 56 data bytes
64 bytes from 192.168.100.254: icmp_seq=0 ttl=64 time=0.6 ms
64 bytes from 192.168.100.254: icmp_seq=1 ttl=64 time=1.0 ms
64 bytes from 192.168.100.254: icmp_seq=2 ttl=64 time=0.5 ms
64 bytes from 192.168.100.254: icmp_seq=3 ttl=64 time=0.4 ms
64 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 loss
round-trip min/avg/max = 0.4/0.5/1.0 ms

FortiGate-61E # 

FortiGate-61E # execute ping 8.8.4.4
PING 8.8.4.4 (8.8.4.4): 56 data bytes
64 bytes from 8.8.4.4: icmp_seq=0 ttl=118 time=25.9 ms
64 bytes from 8.8.4.4: icmp_seq=1 ttl=118 time=25.8 ms
64 bytes from 8.8.4.4: icmp_seq=2 ttl=118 time=26.2 ms
64 bytes from 8.8.4.4: icmp_seq=3 ttl=118 time=25.8 ms
64 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 loss
round-trip min/avg/max = 25.8/26.0/26.3 ms

FortiGate-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.

You Might Also Like

0 comments