FortiGate Firewall Policy Best Practices: 12 Rules for a Secure Configuration
A firewall is only as good as its rules. Many real-world breaches happen not because the firewall was weak, but because the policies were too open, outdated, or poorly organized. Here are 12 best practices for building a clean, secure FortiGate policy set.
Menu names and defaults vary between FortiOS versions, so test on your own version, and back up your configuration before making changes.
1. Follow Least Privilege
Allow only the sources, destinations, and services that are actually needed. Avoid policies with all in every field.
2. Use Specific Services, Not "ALL"
Instead of allowing every service, choose only HTTP, HTTPS, DNS, and the ones your users need.
3. Put Specific Rules Above General Ones
FortiGate checks policies from top to bottom, and the first match wins. A broad rule near the top can hide every rule below it. Read the basics in What Is a Firewall?
4. Name and Comment Every Policy
Use clear names like LAN-to-Internet-Web and add a comment with the purpose and ticket or owner. Six months later, you will thank yourself.
5. Use Address Objects and Groups
Create named objects for servers and subnets instead of typing IPs everywhere. Changes then happen in one place.
6. Enable Logging on Important Policies
Log denied traffic and traffic to sensitive systems. Logs are what you need when something goes wrong. Be mindful of log volume and storage.
7. Apply Security Profiles
Attach antivirus, web filtering, application control, and IPS profiles to allow policies where appropriate. Plan SSL inspection carefully, since it adds visibility but also complexity and privacy considerations.
8. Review Hit Counts and Remove Unused Policies
Policies with zero hits over a long period are candidates for removal. Disable first, wait, then delete.
9. Segment Your Network
Use separate interfaces, VLANs, or zones for staff, servers, guests, and IoT. Then write policies between them, which limits how far an attacker can move. See VLANs Explained and What Is Zero Trust?
10. Use Schedules When Needed
For access that is only required at certain times, such as a vendor's maintenance window, use a schedule object.
11. Harden Administrator Access
- Never expose the admin interface to the internet.
- Restrict logins to trusted hosts.
- Use HTTPS and SSH only, and turn off unused management services.
- Use strong passwords with MFA, and individual admin accounts.
- Keep firmware updated.
config system admin
edit "your-admin"
set trusthost1 10.0.0.0 255.255.255.0
next
end
12. Back Up and Document Before Changing
Download the configuration before every significant change and record what you changed and why.
Sample Policy (CLI)
config firewall policy
edit 10
set name "LAN-to-Internet-Web"
set srcintf "port1"
set dstintf "wan1"
set srcaddr "LAN-Subnet"
set dstaddr "all"
set action accept
set schedule "always"
set service "HTTP" "HTTPS" "DNS"
set nat enable
set logtraffic all
set comments "Staff web access"
next
end
Interface and object names are examples, and depending on your FortiOS version you may also need to select inspection and security profile settings.
Frequently Asked Questions
Should the last rule be a deny-all? FortiGate already has an implicit deny. Many admins add an explicit deny-all with logging at the bottom so blocked traffic is visible.
How often should I review policies? At least quarterly, and after any major change in the environment.
Conclusion
Good firewall policy is mostly discipline: be specific, keep things tidy, log what matters, and review regularly. Next, build the foundation that makes segmentation possible: VLANs.

Join the conversation