Enable Inside and DMZ devices to reach the internet by configuring a static default route on the Fortinet firewall that points to the ISP router.
On Fortinet Firewall
● port1 (Untrust Zone): 192.168.100.1/24 → connected to Internet Router (192.168.100.254/24)
● Inside PC: IP: 192.168.1.10/24 → Gateway: 192.168.1.1
● DMZ Server: IP: 192.168.2.10/24 → Gateway: 192.168.2.1
From CLI:
! config router static edit 1 set dst 0.0.0.0 0.0.0.0 # Default route (all traffic) set gateway 192.168.100.254 # Internet Router's IP address set device port1 next end ! |
From the GUI:
1. Navigate to Network > Static Routes
2. Click Create New
● Destination IP/Mask: 0.0.0.0/0
● Gateway: 192.168.100.254
● Interface: port1
3. Click OK
This is essential for name resolution.
From CLI:
! config system dns set primary 8.8.8.8 set secondary 4.2.2.2 end ! |
Or from the GUI:
1. Go to Network > DNS
2. Select specify, and set:
● Primary DNS: 8.8.8.8
● Secondary DNS: 1.1.1.1
3. Click on Apply
1. Test from Fortinet CLI:
execute ping 8.8.8.8 # Should succeed if route is correct execute ping www.uninets.com # Should succeed if DNS is working |
2. Test from Inside PC:
Set DNS as 8.8.8.8 and 4.2.2.2 on the PC.
Use the command prompt:
ping 8.8.8.8 nslookup google.com |
If ping to 8.8.8.8 fails from the PC, NAT or security policies may be missing (which we'll configure in Lab 4).