Basic Fortigate Firewall Configuration: Content at A Glance
Basic Fortigate Firewall Configuration: Content at A Glance
Configuration
If you want to equip your network with an affordable firewall and easy administration, Fortigate is
a right choice for you. Fortigate firewall ranges from 20C to 5000 series with chassis for service
providers networks. For a medium company, a Fortigate 200B is powerful enough to handle up
are facts from my personal real tests, the CPU of the firewall went up to 85%, memory utilization
went up to 90%. Specs from Fortinet might be different because it is maximum capacity.
Anyway, this tutorial is to show you where the firewall resides within your network, and how to
basically configure it to work with your network. I will use a Fortigate 200B as the firewall in this
tutorial.
Content at a glance
Firewall basic knowledge
Where to place the firewall?
Connecting to Fortigate at the first time
Configuring network interfaces
Configuring Routing Table
Configuring Firewall Policy
Interface: where the firewall communicate with other devices in your network. This could
be internal LAN, extranet, or internet. Basically you will allocate IP addresses for these
interfaces.
Routing Table: where to send the packets to. You could see a routing table on almost
every network-supported devices, such as ADSL Router, wireless router, routers, firewall, and
even on your PC (Mac, Windows, Linux,…)
Firewall Policy: what type of traffic is allowed or denied to pass through the firewall. This
is the main part of a firewall where you could control the access per IP/subnet. On advanced
firewalls, you could find policy components where it is used to build firewall policy, such as
scheduler, bandwidth throttling, address, service, etc.
Operation Mode: NAT or Transparent. If you use the Fortigate as a firewall between
your private network and public network, NAT/Route is for this situation. If you place the firewall
behind another firewall or within your internal network, Transparent mode could be used.
Where to place the firewall?
There are some common topologies of placing firewall within a network. In this tutorial, I will use
a Dual-Homed Firewall topology.
In Dual-Homed topology, the firewall is configured to handle everything, from controlling clients
internet access to VPN Site-to-site with business vendors. A Fortigate 200B is a very good
candidate for this model. Or you could choose to use Juniper or Cisco Firewalls, it’s all your
decision.
The firewall is placed just right behind the ISP Router. In this example, I assume that you’re
using a managed internet service with an ISP provided router; therefore, the only thing you
received from the ISP is just the IP information. You have no access to the ISP Router in the
picture (even it is shipped and operated at your location). To access the internet, your network
must point the the IP of this ISP router and use it as the internet gateway or default gateway.
single port. This Ethernet switch has the default IP as 192.168.1.99/24. You will use this IP to
Leave Default Gateway and DNS Settings of your network connection empty. You don’t
need it for now.
Make sure you could PING the IP 192.168.1.99 from your computer
Connect to your new Fortigate by entering this website https://192.168.1.99
settings, Fortigate 200B Port 9 is not enabled HTTPS. You, still, could PING because PING is
enabled by default on management port (port 9). Execute these commands in your Serial
FG900A83901645649 (port9) # end
If you don’t want to use the IP 192.168.1.99 because you don’t want to change your computer’s
IP, you could change it to whatever IP address you want. Firstly, connect to Fortigate using Serial
Console, and change the default IP address to something else as you wish using Fortigate
command lines. The final step is to connect to the device using https.
Here are the commands that allow you to change the default IP address of Fortigate
For the dual-homed topology, Fortigate basically has only two interfaces. You need to configure
The first interface is External. You could name it as anything. If you want to use Port 10 as the
External interface, connect the RJ45 connector from your ISP Router to Port 10 of Fortigate.
About the IP address, it depends on your ISP Router. I assume you are assigned by your ISP a
range of public IP, for example 203.162.4.0/26. It means the usable IPs are
ISP Router interface. Fortigate’s External interface’s IP could be any of the leftover IPs. Let’s
With the IP 203.162.4.2, a public IP, my Fortigate is facing directly to the internet. The
firewall become a part of internet. The ISP managed router usually passes all traffic to the user-
Whenever you’re exposing your network to the internet, it means you’re exposing to unlimited
password scanning attack. Using a long-enough and strong password is a good practice to keep
your network secure. Moreover, you should rename the default username of your admin account.
To see how torename default admin account on Fortigate, see my previous post.
The second interface is Internal, where Fortigate connects to your local network. Assume that
your local network has the IP range as 192.168.100.0/24, the Fortigate internal interface’s IP
could be 192.168.100.254. Assign the IP 192.168.100.254 to Port 11 on Fortigate, and connect it
It’s time to test the connectivity between Fortigate and both External and Internal network. From
If both commands show replies, then your connectivity is good. You can move on.
Configuring Routing Table
Routing table is the knowledge base of Fortigate firewall. Fortigate firewall supports both static
routes and dynamic routes. You could modify static route manually by entering new routes into
Fortigate at the section Router –> Static Route. Fortigate supports RIP, OSPF, BGP as dynamic
routing protocols. In this tutorial, I will not touch the dynamic routing.
Basically, a firewall must have knowledge of all routes within your local network and the
The last processed routing entry in the routing table is always the default route. Default route
points to the gateway that the firewall will send all traffic out to that IP. Default route usually
points to a default gateway. In this case, default route points to 203.162.4.1, the IP of the ISP
Router. Routes to internet is default route because there are no specific routes for internet
addresses.
Follow these steps to configure Default Routes to point to 203.162.4.1. This route will bring all
You will see one default route right there as 0.0.0.0 0.0.0.0 and pointed to 192.168.1.99 as
There is no need to create a static route for your direct connected network
192.168.100.0/255.255.255.0. Fortigate will automatically add a connected route for this network
The next step is to create a new route to your local network. Destination should
the network .200 if you really have it, and the network .200 is not directly connected to
Fortigate.
Go to Router –> Static –> Static Route
Click Create New
Destination IP is 192.168.200.0 with subnet mask as 255.255.255.0
Device is port11
Gateway is 192.168.100.1, which is your internal Router’s interface
your network. With Firewall Policy, you could allocate how much bandwidth you want to assign
customized service definition. With these options, you could customize your network to match
your needs.
For advanced configuration, Fortigate could play as an IPS to protect your network by deeply scan
the content/pattern of the traffic packets. In this tutorials, I will not touch to these advanced
configuration.
By default, Fortigate has an implied policy that blocks everything from incoming and outgoing
from passing the box. In older FortiOS version 3.x, this implied policy are now shown up to end-
users. From version 4.0, Fortigate users could see this implied policy. Because of this implied
policy, Fortigate is not a plug-and-play firewall. To allow full internet access, at least, you must
With this configuration, all devices in your internal network are allowed to traverse the Fortigate to
internet. Please note since the Source address is all, any devices that have access to Fortigate
from Port 11 are allowed to pass the firewall. This is not recommended. For more specific, you
To allow a specific IP to access full internet, you need to create an Address object, and assign this
object to a firewall policy. Only machine with this specific IP would match the policy and be able to
access internet.
To create a new Address object on Fortigate, select Firewall –> Address –> Address
Click Create New
Address Name is any name you want. Do not use too special characters, such as /
or *. It could cause your Fortigate to go crazy.
Type: Subnet/IP Range
Subnet/IP Range: 192.168.100.10 (just type the IP, with no subnet mask)
Interface: Any
Click OK to finish the new address
Be careful with the subnet mask
When you create a new Address object on Fortigate, pay attention to the subnet mask of the IP. In
this case, if I want only the IP 192.168.100.10 with subnet mask 255.255.255.0 to access
internet, I enter only the IP 192.168.100.10. If you ever accidentally enter 192.168.100.10/24, it
means all of your 192.168.100.0/24 network are able to access internet. Fortigate
wrongly interprets the subnet mask right here. Fortigate doesn’t care about the .10. Fortigate sees
the /24, and automatically understands that the administrator wants to allow the who subnet.
Interesting.
Next step is to create a new Firewall Policy, and select Hao-PC as the Source Address
Go back to Firewall –> Policy –> Policy
Instead of clicking Create New button, you could right click on the section Port11 –>
Port10, select Insert from the pop-up menu. Fortigate will create a new firewall policy, and put
it above the current position of the firewall policy at your current mouse position.
Fortigate will put Port11 as Source Interface, and Port10 as Destination
Interface for you (because you just right click –> Insert)
Select Hao-PC as Source Address
Action: Allow
NAT: enabled
Click OK to finish the policy
to internet, or to be on the same Firewall Policy, then I need to create an Address Range on
Fortigate and use it as the Source Address. The key to create an IP range with Fortigate GUI is
the square brackets [ ]. The ranging numbers are typed within these brackets.
192.168.100.100.
Go to section Firewall –> Address –> Address
Click Create New
Enter the IP range as below, please note the square bracket is after the period “.”
You could define an address range with command line. Using command line is clearer, and
FG900A83901645649 (Range-40to100) # next