If you've spent any time configuring user authentication on... Full Story
By Manny Fernandez
January 21, 2019
Enhancing the security TO the Fortigate, not just THROUGH it.
The IPS policies on the Fortigate are defined and assigned to policies. This means that the packets match the packets flowing THROUGH the firewall. In some cases, you may want to block traffic TO the firewall. Fortinet Fortigates do a good job via the Trusted Hosts whereby the Administrative Access is ONLY allowed from these hosts.
Trusted Hosts

This is defined on each Interface of the Fortigate (Physical, VLAN, Loopback, etc)

NOTE: If you have a user like the one above “admin” that has ‘Trusted Hosts’ configured on it and NO OTHER admin accounts, you will not be able to connect to the Firewall on ANY interface for management via HTTP, HTTPS, and even PING unless it is coming from that ‘Trusted Host’. HOWEVER, if you have this admin and any other administrative account WITHOUT the ‘Trusted Hosts’ configured, the HTTPS, HTTP, Ping etc will be accessible from ANY IP address. In other words, make sure you lock down ALL the administrative accounts with Trusted Hosts.
Local-In Policies
In the case where you need to have NO ‘trusted hosts’ configured but still want to limit certain access to the firewall itself, here is the next option for you.
The local-in policies define traffic TO the Fortigate. There is no GUI configuration for these policies save a snap-in on the GUI that shows you the default ‘Local-In’ policies. To manually configure these policies, you will need to go to the “Ugly Black Screen” as I like to call it, although I love, love, love, the CLI.
The following is an example I have configured in my lab
config firewall local-in-policy
edit 1
set intf "port1"
set srcaddr "all"
set dstaddr "300E-Public"
set service "SIP"
set schedule "always"
set comments "Block SIP to Fortigate 300E"
next
edit 2
set intf "port1"
set srcaddr "Blocked-Countries"
set dstaddr "300E-Public"
set service "ALL"
set schedule "always"
set comments "Block Bad Countries"
next
end
On policy 1, we can see that the interface is port1, source all, destination 300E-Public (which is my public IP), the Service is SIP and the schedule is Always.
On policy 2, we are blocking all traffic destined to the firewall’s public IP source from any network in my Blocked-Countries Address group.
These policies are not logged by default, and as such, you need to configure the firewall to log local traffic. This is done under the Log & Report, Local Traffic.

Above, you can see traffic that has been dropped destined to my public IP.
You can modify the behavior by changing the settings under…

Interface Policies
The other optional configuration I like to do is ‘Interface Policies’. With Interface Policies, you can apply security profiles to traffic destined to the Firewall itself.
config firewall interface-policy
edit 1
set logtraffic all
set interface "port1"
set srcaddr "all"
set dstaddr "300E-Public"
set service "ALL"
set ips-sensor-status enable
set ips-sensor "Interface-Firewall-Sensor"
next
end
Above, you can see that I have enabled the IPS profile of all_default destined to the public IP of the Fortigate.
After enabling this policy, I immediately picked up a signature from a China site trying to run some exploits against my Fortigate.
Disclaimer: I configured this IPS policy BEFORE I configured the Blocked-Countries Local-in policy.

Here we can see that Minute Ago I saw this attack and the firewall subsequently dropped the packet.

Here we can see some of the specifics of the attack such as source, destination, etc.

NOTE: Beware of the excessive logging, since I do not have to pay for FAZ storage or GB per day, it is fine for me, but your mileage may vary.
Recent posts
-
-
DNS is one of those technologies that quietly underpins... Full Story
-
BGP issues on FortiGate firewalls usually trace back to... Full Story
-
Every time your laptop talks to your router, a... Full Story
-
If you've spent any time configuring NAT on a... Full Story
-
If you have spent any time configuring firewall policies... Full Story
-
High availability on FortiGate is one of those features... Full Story
-
If you've configured SD-WAN on a FortiGate, you've almost... Full Story
-
FortiLink is the management protocol that turns a FortiSwitch... Full Story
-
FortiSwitches are pretty rock solid from Mean Time Between... Full Story
-
This is a quicky tip. Have you ever gone... Full Story
-
DNS is one of those quiet pieces of internet... Full Story
-
This article is an updated version of the previous... Full Story
-
You will add ns2 as a secondary (slave) BIND9... Full Story
-
In the process of deploying my lab, I needed... Full Story
-
RFC 8805, used to be known as Self-Correcting IP... Full Story
-
Years back, I wrote an article about certificate pinning. ... Full Story
-
FortiGates have the ability to send alerts to Microsoft... Full Story
-
In this post, I am going to walk through... Full Story
-
Troubleshooting VoIP on a FortiGate can feel like trying... Full Story
-
Prior to FortiOS 7.0, there were three commands to... Full Story
-
In this post, I am going to go over... Full Story
-
What we are going to do: We are going... Full Story
-
Choosing between FGCP (FortiGate Clustering Protocol) and FGSP (FortiGate... Full Story
-
Creating a VLAN on macOS (The "Pro" Move) A... Full Story
-
This blog post explores the logic behind how macOS... Full Story
-
Pretty Fly for a Wi-Fi Tell My Wi-Fi Love... Full Story
-
Part of my daily gig is creating BoMs (Bill-of-Materials)... Full Story
-
ICMP introduces several security risks, but careful filtering, rate... Full Story
-
The command diag debug application dhcps -1 enables full... Full Story
-
In the world of FortiOS, execute tac report is... Full Story
-
LLDP; What is it The Link Layer Discovery Protocol... Full Story
-
What it actually does When you run diagnose fdsm... Full Story
-
Monkey Bites are bite-sized, high-impact security insights designed for... Full Story
-
I have run macOS in macOS with Parallels but... Full Story
-
Don't be confused with my other FortiNAC posts where... Full Story
-
This is the third session in a multi-part article... Full Story
-
Today I was configuring key-based authentication on a FortiGate... Full Story
-
Netcat, often called the "Swiss Army knife" of networking,... Full Story
-
At its core, IEEE 802.1X is a network layer... Full Story
-
In case you did not see the previous FortiNAC... Full Story
-
This is our 5th session where we are going... Full Story
-
Now that we have Wireshark installed and somewhat configured,... Full Story
-
The Philosophy of Packet Analysis Troubleshooting isn't about looking... Full Story
-
1. High-Level Overview The FortiGate Wireless Intrusion Detection System... Full Story
-
What MIMO Actually Does Multiple Input, Multiple Output (MIMO)... Full Story
-
A practitioner's tour of the diagnose, test, and fnsysctl... Full Story