Fortinet · security

Fortinet NSE4 FortiGate Security

FortiGate firewall configuration, security policies, VPN, authentication, and network protection fundamentals.

10Modules
30 hoursDuration
intermediateLevel

Course Modules

🔨
Module 1
FortiGate Introduction & System Setup
2 lessons
NSE4 begins with the appliance itself: FortiOS as the unified OS, the SPU/NP/CP ASIC offload story, and the two deployment shapes — NAT/Route (default L3 gateway) vs Transparent (L2 bridge that slips inspection into an existing topology without renumbering). Initial setup means admin profiles, trusted hosts, interface roles, and a working FortiGuard reach via DNS + NTP.
1.1 FortiGate Platform Overview

Every NSE4 platform question is really one of two decisions: which deployment mode does this site need, and will the traffic actually hit the ASIC. The feature list matters far less than knowing that NAT/Route is a routed hop while Transparent is a bridge you can insert without renumbering anything, and that the moment you attach inspection to a session, the NP fast path stops being part of the story.

Key Concepts

  • ASIC-based architecture: FortiGate appliances leverage Fortinet's custom SPU (Security Processing Unit) chips, including the NP (Network Processor) for hardware-accelerated packet forwarding and the CP (Content Processor) for offloading IPS, encryption, and content inspection tasks, delivering significantly higher throughput than software-only firewalls.
  • FortiOS operating system: The proprietary operating system running on all FortiGate devices provides a unified management interface for firewall, VPN, UTM, and SD-WAN features. FortiOS configuration is stored in a hierarchical text-based format and can be managed via the GUI, CLI, or REST API.
  • Deployment modes — NAT/Route vs Transparent: In NAT/Route mode the FortiGate acts as a Layer 3 gateway performing routing and address translation, which is the most common deployment. In Transparent mode it operates as a Layer 2 bridge, inserting security inspection into the network without requiring IP address changes on existing infrastructure.
  • FortiGate models and licensing: Fortinet offers appliances ranging from desktop units (FortiGate 40F/60F) to chassis-based data-center models (FortiGate 7000 series) and virtual machines (FortiGate-VM). FortiGuard subscription licenses enable services such as antivirus, IPS, web filtering, and application control signature updates.
  • Security Fabric integration: FortiGate serves as the core of the Fortinet Security Fabric, communicating with FortiAnalyzer, FortiManager, FortiSwitch, FortiAP, and other Fabric-connected devices to provide centralized visibility, coordinated threat response, and unified policy management across the entire network infrastructure.
Exam tip: Understand the difference between NP and CP processors and which traffic types each accelerates. Know that NAT/Route mode is the default and when to choose Transparent mode (e.g., inserting a FortiGate without changing the existing network topology).

💻 Concrete example — the FG-60F that halved its throughput the day IPS was enabled

Ticket: A branch FG-60F benchmarked at near line rate during acceptance testing. A week after the security team attached an IPS profile to the outbound policy, users report slow transfers and the dashboard shows CPU pinned at 80% — with no change in traffic volume.

Walk: 1) Nothing is broken: acceptance testing measured plain forwarding, which the NP offloads in hardware, and the new profile moved those sessions onto the CPU/CP path. 2) Confirm it rather than assume it — diagnose sys session list on an affected flow shows the session no longer carrying an offload state, because a session handed to IPS or a proxy cannot be NP-offloaded end to end. 3) The fix is scoping, not disabling: inspect what deserves inspection. Keep IPS on the policies carrying user web and server traffic, and let bulk, already-encrypted, internal backup traffic match a separate policy with no profile so it stays on the fast path.

Verify: Re-run the transfer and watch get system performance status: CPU drops back and the inspected policies still log UTM events. The datasheet number you were benchmarking against was the firewall throughput figure — the IPS and "threat protection" figures on the same datasheet are several times lower, and those are the ones that apply now.

Key takeaway: NAT/Route is the default L3 gateway mode; Transparent is the L2 bridge you choose when the requirement says "without changing the existing addressing". NP offload accelerates forwarding, CP accelerates crypto and content work — but a session under IPS or proxy inspection leaves the pure NP fast path, which is why firewall throughput and threat-protection throughput are different numbers on the same box.
1.2 Initial Configuration

Initial configuration is where most real FortiGates get locked, bricked or silently unlicensed. The exam frames it as a hardening checklist, but the two items that actually bite are trusted hosts (an allow-list that will happily exclude you) and the firmware upgrade path (which is not optional and not always a single hop).

Key Concepts

  • Administrative access and profiles: FortiGate supports multiple admin accounts with role-based access profiles (super_admin, prof_admin, custom profiles). Access can be restricted by trusted hosts, and two-factor authentication via FortiToken can be enforced for administrative logins via GUI (HTTPS) or CLI (SSH/console).
  • Interface configuration: Each FortiGate interface is assigned an IP address, administrative access protocols (HTTPS, SSH, ping, SNMP), and a role (LAN, WAN, DMZ, undefined). Interfaces can be physical ports, VLAN sub-interfaces, aggregate links (802.3ad), or software switches that bridge multiple ports into a single broadcast domain.
  • Dashboard and system settings: The FortiOS dashboard provides real-time widgets for system resources, license status, security alerts, and traffic statistics. System-level settings include hostname, time zone, DNS servers (essential for FortiGuard connectivity), and NTP configuration for accurate log timestamps.
  • Firmware management: Firmware upgrades follow a supported upgrade path documented in the Fortinet release notes. Administrators should always back up the configuration before upgrading, and the FortiGate supports dual firmware partitions so a previous firmware version can be booted if the upgrade causes issues.
Exam tip: Remember that the default admin account has no password and should be secured immediately. Know how trusted hosts restrict management access by source IP, and always verify the supported upgrade path before performing firmware updates.

🛡 Scenario — initial FortiGate setup from factory default

Task: A new FG-100F arrives factory-fresh. You need to set the management IP, change the admin password, set hostname, configure NTP, and verify connectivity before deploying in production.

Walk: 1) Connect a laptop to port1 (default management: 192.168.1.99). Access https://192.168.1.99. Login: admin / (no password). 2) System → Settings → change hostname to FW-HQ-01, set timezone, enable NTP (time.google.com). 3) System → Administrators → change admin password to a strong passphrase. 4) Network → Interfaces → set port1 IP to 10.0.0.1/24 (management VLAN). 5) execute ping 8.8.8.8 from CLI to verify WAN. 6) Backup config: System → Configuration → Backup.

NSE4 exam point: The default management IP is 192.168.1.99/24 on port1. Always change the admin password on first login. Factory reset via CLI: execute factoryreset.

Key takeaways
  • NAT/Route is the default (L3, doing routing + NAT); pick Transparent when you must drop a FortiGate into an existing L2 segment without IP changes. The exam pins this choice to "minimum disruption" wording.
  • Restrict admin access with trusted hosts (per-account source-IP allow-list) + role profiles (super_admin, prof_admin, custom) + FortiToken 2FA — never leave the default admin with no password.
  • FortiGuard needs DNS + NTP working before signatures + license features come online; broken DNS is the #1 reason a fresh FortiGate shows "license inactive" in the dashboard.
⚡ Mini-quiz — Drill NAT/Route vs Transparent triggers, NP/CP offload, trusted hosts, and FortiGuard prerequisites.
Quick quiz →
🛡️
Module 2
Firewall Policies
3 lessons
Firewall policies are the heart of the FortiGate. Each policy matches on source / destination / service / schedule / users, applies an action (Accept / Deny / IPsec / SSL VPN), and chains security profiles for deep inspection. Order matters — policies are evaluated top-down and the first match wins, so the implicit deny at the bottom never fires when a broader rule sits above it.

💻 Concrete example — a trusted-host entry that locks the admin out of a live firewall

Ticket: You harden a new FG-100F by restricting the admin account to your laptop only: trusthost1 10.20.5.34/32. It works. Next morning the laptop has pulled a new DHCP lease, 10.20.5.61, and the GUI now times out from every machine in the building. No one can log in.

Walk: 1) Understand what happened: trusted hosts are evaluated per admin account against the source IP of the management connection. A /32 pinned to a DHCP address is a time bomb, and there is no second account — the recovery path is physical. 2) Console in (RJ-45/USB console, 9600 8N1) — console access is never filtered by trusted hosts. 3) Widen the entry to the management network rather than a host: config system admin → edit admin → set trusthost1 10.20.5.0 255.255.255.0 → end. 4) Then fix the real gap — create a second admin account with its own trusted hosts, so the next mistake costs a login instead of a site visit.

Verify: From a host inside 10.20.5.0/24 the GUI answers again; from anywhere else it does not respond at all (a trusted-host mismatch drops the connection rather than returning a login failure, which is itself the diagnostic tell). Back the config up — System → Configuration → Backup — before touching firmware, and check the release-notes upgrade path: FortiOS will not always let you jump straight from 6.4 to 7.2, and the dual firmware partitions are what let you boot back if it does go wrong.

Key takeaway: Trusted hosts filter management access by source IP per admin account — scope them to a management subnet, keep a second admin account, and remember the console is the unfilterable way back in. Before any firmware change: back up the config and follow the documented upgrade path, because the supported path is version-to-version, not latest-and-hope.
2.1 Policy Types & Matching

A firewall policy is an AND across every field — interface pair, source, destination, service, schedule, user — and the table is an ordered first-match list. Almost every "but the rule is right there" ticket comes from one of those two facts: one field silently fails to match, or a broader policy above it already answered. Knowing which object types match dynamically is what separates the two cases.

Key Concepts

  • Firewall policy components: Each policy is defined by incoming interface, outgoing interface, source address/user/group, destination address, schedule, and service. Traffic must match all criteria in a single policy to be permitted; if no policy matches, the implicit deny rule at the bottom of the policy list drops the traffic silently.
  • Address objects and groups: FortiGate uses address objects (subnet, IP range, FQDN, geography-based, ISDB) as building blocks for policies. Address groups aggregate multiple objects for easier policy management. FQDN objects resolve dynamically using DNS, and Internet Service Database (ISDB) objects identify well-known cloud services by IP range.
  • Schedules and services: Schedules define when a policy is active (one-time or recurring), allowing time-based access control. Service objects define protocols and ports (predefined services like HTTP/HTTPS, or custom TCP/UDP/SCTP definitions) that the policy will match.
  • Policy lookup and matching logic: FortiGate evaluates policies from top to bottom and uses the first match. The policy table can be viewed in sequence mode (ordered list) or interface pair mode (grouped by interface pairs). Understanding lookup order is critical for troubleshooting traffic that is unexpectedly allowed or denied.
Exam tip: The implicit deny policy at the end of the policy list has logging disabled by default. For troubleshooting, enable logging on the implicit deny to see what traffic is being dropped. Remember that policies are matched top-down and the first match wins.

💻 Concrete example — the FQDN address object that works for half the users

Ticket: Finance needs access to a SaaS portal. You create an FQDN address object for portal.vendor.example, reference it as the destination in a narrow allow policy, and it works from your test PC. Finance reports it works "sometimes" — and for some users, never.

Walk: 1) An FQDN object resolves on the FortiGate, using the FortiGate's own DNS, and caches the answer for the record TTL. The SaaS is behind a CDN handing out different addresses per client and per region, so the address your firewall learned is frequently not the address the client connected to. 2) Confirm the shape of the failure before changing anything: the denied sessions land on the implicit deny, which does not log by default — turn on violation-traffic logging and the drops appear, all to addresses your object never resolved. 3) Replace the FQDN object with the ISDB (Internet Service Database) entry for that service where one exists: it carries the vendor's full published ranges and is updated by FortiGuard instead of by one DNS answer. If there is no ISDB entry, an address group of the vendor's documented prefixes beats a single FQDN.

Verify: Every finance user reaches the portal, and the implicit-deny log stops filling with that destination. Re-check the other three match fields while you are there: a schedule still in the old time zone and a custom service pinned to the wrong port produce exactly the same "the policy exists but nothing matches" symptom.

Key takeaway: Traffic must satisfy every field of one policy, and evaluation stops at the first match. FQDN objects resolve from the FortiGate's own DNS with TTL caching, so they are a poor fit for CDN-fronted services — use ISDB objects for well-known cloud services. The implicit deny does not log by default; enable violation logging before you conclude the traffic never arrived.
2.2 Policy Actions & Inspection

Accept is not inspection. A policy with ACCEPT and no profiles attached is a routing rule with logging — the antivirus, IPS and web-filter engines only run on the policies you explicitly bolt them to. The second decision is flow vs proxy mode, and it changes more than throughput: it changes what the engine can see and what the user is shown when something is blocked.

Key Concepts

  • Accept action with security profiles: When a policy action is set to ACCEPT, traffic is forwarded and can optionally be inspected by attaching security profiles (antivirus, web filter, IPS, application control, DNS filter, etc.). Without security profiles, accepted traffic passes through without deep inspection.
  • Deny action behavior: The DENY action drops matching traffic. Unlike the implicit deny, an explicit deny policy can have logging enabled and can be placed strategically in the policy order to block specific traffic before broader allow rules are reached.
  • Inspection modes — flow-based vs proxy-based: Flow-based inspection examines packets as they stream through the FortiGate using pattern matching, offering higher throughput with lower latency. Proxy-based inspection buffers and reconstructs the full content (files, web pages) before scanning, providing deeper inspection capabilities such as content replacement and more thorough malware detection.
  • Security profile groups: Instead of attaching individual security profiles to each policy, administrators can create profile groups that bundle multiple security profiles together. This simplifies policy configuration and ensures consistent protection across multiple policies.
Exam tip: Know the trade-offs between flow-based and proxy-based inspection. Flow-based is faster and the default for most deployments, while proxy-based offers deeper inspection at the cost of performance. Security profiles have no effect unless explicitly attached to a policy.

💻 Concrete example — a blocked download that looks like a network outage

Ticket: Helpdesk escalates: "the file-share site just times out, there is no block page, so it must be the ISP." The security team insists antivirus is working. Both are right.

Walk: 1) Check the UTM logs first — the AV engine did fire and blocked the file. What the user did not get was an explanation. 2) That is the flow-vs-proxy difference: flow-based inspection scans the stream as it passes and, when it has to stop a transfer mid-flight, the connection dies in a way browsers render as a timeout or reset. Proxy-based inspection buffers and reconstructs the object first, so it can cleanly return a replacement message — the branded "blocked by your administrator" page. 3) There is a detection difference too, and it points the same way: only proxy mode extracts archives, so a zipped sample that flow mode streams past gets caught once the file is reassembled. 4) Switch the inspection mode to proxy on that policy — the user-facing web and mail paths — and leave high-volume internal traffic in flow mode.

Verify: Repeat the download: the browser now shows the FortiGuard replacement page naming the detection, the UTM log entry carries the same policy ID, and support stops receiving "the internet is broken" tickets for blocked content. Bundle the profiles you just settled on into a security profile group so the next policy inherits the same posture instead of drifting.

Key takeaway: Security profiles do nothing until attached to a policy. Flow-based inspection is faster and the sensible default for bulk traffic; proxy-based buffers the whole object, which is what makes archive extraction, sandbox submission and user-visible replacement pages possible. "No block page, just a timeout" is a classic flow-mode symptom, not a network fault.
2.3 Policy Ordering & Best Practices

Order is policy logic. Because evaluation is top-down and stops at the first match, a rule can be perfectly written, enabled, and completely dead — shadowed by something broader above it. The exam tests this as theory; in practice you find it with two things: the hit counter and the policy lookup tool. A policy with zero hits is either unused or unreachable, and those are very different problems.

Key Concepts

  • Top-down processing order: Policies are evaluated sequentially from top to bottom. More specific rules must be placed above more general rules to prevent the general rule from matching first. Moving a policy to the wrong position can inadvertently open or block access to services.
  • Policy IDs and sequence numbers: Each policy has a unique, immutable policy ID assigned at creation and a separate sequence number that determines its position in the evaluation order. Moving a policy changes its sequence number but not its ID; log entries reference the policy ID for correlation.
  • Logging and traffic shaping: Each policy can log traffic at session start, session end, or both, with UTM log entries generated by security profiles. Traffic shaping policies apply bandwidth limits (guaranteed and maximum) and priority queuing (high, medium, low) per policy, enabling QoS controls for critical applications.
  • Policy optimization tips: Regularly review policy hit counts to identify unused or shadow policies. Use the policy lookup tool (diagnose firewall proute list / policy match) to verify which policy a specific flow will hit. Consolidate overlapping policies and remove stale rules to maintain a clean, auditable rule base.
Exam tip: Use the diagnose firewall iprope lookup CLI command to test which policy matches specific traffic parameters. Zero-hit-count policies should be reviewed and removed if no longer needed. Always place more specific policies above general ones.

🛡 Scenario — creating an outbound internet access policy

Task: LAN users (192.168.10.0/24 on port2) need internet access through WAN (port1). Create the permitting policy with NAT, enable logging, and verify.

Walk: 1) Policy & Objects → Firewall Policy → Create New. 2) Incoming Interface: port2 (LAN); Outgoing Interface: port1 (WAN). Source: LAN_SUBNET. Destination: all. Service: ALL. Action: ACCEPT. 3) Enable NAT (Use Outgoing Interface Address). 4) Enable Log Allowed Traffic → All Sessions (for troubleshooting) or Security Events. 5) Enable an Application Control or Web Filter profile if needed. Click OK. 6) Verify: diag debug flow filter addr 192.168.10.10 then diag debug flow show function-name enable while pinging from a client — confirm the policy matches.

NSE4 exam point: Policies are matched top-down; first match wins. Always order specific rules before broad ones. The implicit deny at the bottom blocks everything not explicitly permitted.

Key takeaways
  • Top-down first-match evaluation: put the most specific policies on top, broad allows on the bottom. The implicit deny is the safety net, not the strategy.
  • A policy that allows traffic but applies no security profile is just a router rule — the inspection (AV, IPS, WebFilter) only happens when you attach the relevant profile.
  • Use policy ID + sequence grouping in FortiOS 7.x to keep large rule bases readable; the GUI hides this behind drag-and-drop but the CLI config firewall policy + move commands are the exam answer.
⚡ Mini-quiz — Drill policy match order, security-profile attachment, action types, and the implicit-deny behavior.
Quick quiz →
🔄
Module 3
Network Address Translation
2 lessons
NAT splits cleanly into Source NAT (translate the source on the way out — internal to internet, IP-pool or interface-IP-overload) and Destination NAT (translate the destination on the way in — VIPs publish an internal service on a public IP). Central NAT decouples NAT from policy; per-policy NAT is the default and easier to read.

💻 Concrete example — a contractor block rule that has never once fired

Ticket: After an audit finding, you add a policy blocking peer-to-peer and remote-desktop services for the contractor VLAN, and put it at the bottom of the table where new rules go. A month later the audit re-tests and contractors are still using both.

Walk: 1) Look at the hit count on the new policy: zero. Not "rarely used" — never reached. 2) Scan upward for the culprit: a broad "corporate LAN → WAN, service ALL, ACCEPT" rule sits above it, and the contractor VLAN is inside the supernet that rule uses as its source. First match wins, so evaluation never gets as far as your block. 3) Prove it instead of guessing — the policy lookup tool (GUI Policy & Objects → Policy Lookup, or the CLI diagnose firewall iprope lookup) takes an interface pair, source, destination, protocol and port and tells you the exact policy ID that flow will hit. It returns the broad rule's ID. 4) Move the specific rule above the general one. The policy ID never changes when you reorder — only its sequence position does — so your logs, reports and audit references stay valid.

Verify: Re-run the lookup with the same parameters: it now returns the block policy's ID, its hit counter starts climbing, and the deny entries appear in the traffic log. Make the zero-hit sweep routine — it finds both shadowed rules like this one and stale rules that should be deleted.

Key takeaway: Specific above general, always: first match wins, so a broader rule above yours makes it unreachable no matter how correct it is. Policy IDs are immutable and survive reordering (sequence numbers do not), and a zero hit count means "investigate" — use the policy lookup tool to find which rule is actually catching the flow.
3.1 Source NAT

Source NAT is chosen by what the far end needs to see, not by what is convenient locally. Overload (PAT) behind the outgoing interface address is right for ordinary internet traffic and wrong the moment a partner allow-lists you, an application needs a stable source, or a regulator wants a session traced back to one internal host. The four IP pool types exist to answer those cases.

Key Concepts

  • Overload IP pool (PAT): The default source NAT method translates multiple internal addresses to a single external IP using port address translation. FortiGate dynamically assigns source ports from a pool, allowing thousands of concurrent sessions to share one public IP. This is the most common NAT method for internet-bound traffic.
  • One-to-one IP pool: Maps each internal source IP to a unique external IP from the pool on a first-come, first-served basis. Unlike overload, the source port is preserved when possible. This is useful when external servers or applications require a consistent source IP-to-port mapping.
  • Fixed port range IP pool: Allocates a fixed block of ports per internal IP from the IP pool, ensuring deterministic NAT mappings. This method is required for carrier-grade NAT (CGNAT) scenarios and simplifies log correlation because each internal host always maps to the same external IP and port range.
  • Port block allocation: An extension of fixed port range that assigns a specific block size of ports (e.g., 128 ports) to each internal host. When the block is exhausted, a new block is allocated. This provides better traceability for ISPs and large enterprises that need to map sessions back to specific internal users.
  • Central SNAT vs per-policy NAT: FortiGate supports two SNAT configuration approaches. Per-policy NAT configures NAT settings directly within each firewall policy. Central SNAT uses a dedicated NAT table that is evaluated separately from the policy table, providing more granular and reusable NAT rules independent of security policies.
Exam tip: Know the four IP pool types and when to use each. Overload is the default; one-to-one preserves source ports; fixed port range provides deterministic mappings; port block allocation adds traceability. Central SNAT is configured under Policy & Objects > Central SNAT.

💻 Concrete example — a partner SFTP that allow-lists one IP while you have two WAN links

Ticket: A payments partner allow-lists your primary WAN address, 203.0.113.10. Nightly SFTP uploads succeed for weeks, then start failing intermittently — always with a connection refused at their end, never a local error. Your site gained a second WAN link and SD-WAN load balancing a fortnight ago.

Walk: 1) The general outbound policy NATs to the outgoing interface address, so whichever WAN link SD-WAN picks decides the source IP. Half the uploads now leave as 198.51.100.10 and the partner drops them. 2) Do not solve this by pinning all traffic to one link — that throws away the second circuit. Solve it for that one flow. 3) Create a one-to-one IP pool holding 203.0.113.10 (one-to-one maps the internal host to a dedicated external address and preserves the source port, rather than overloading many hosts onto one address). 4) Add a narrow policy — source = the SFTP server object, destination = the partner's address, service = SSH/SFTP, NAT = that IP pool — and place it above the general outbound rule, or first-match sends it straight back down the old path.

Verify: Log & Report → Forward Traffic shows the upload session with the translated source reading 203.0.113.10 on every run, and the partner's failures stop. For the wider audit question — "which internal host was behind this public IP and port at 02:14?" — overload PAT makes that hard, which is exactly what fixed port range and port block allocation pools are for: deterministic, traceable mappings per internal host.

Key takeaway: Match the SNAT method to the requirement: overload/PAT for general internet, one-to-one when the far end needs a consistent source address, fixed port range or port block allocation when sessions must be traceable back to one internal host. A NAT policy only applies if it is reached — put the specific NAT rule above the general one. Central SNAT is the alternative when NAT decisions need to live independently of the policy table.
3.2 Destination NAT

The single fact that explains most DNAT tickets: the destination is translated before the policy is evaluated. That is why the policy must name the VIP object, never the real internal IP — by the time matching happens, the packet is already addressed to the server. The same ordering explains why internal users often cannot reach a service that the whole internet can.

Key Concepts

  • Virtual IPs (VIPs): A VIP maps an external IP address (and optionally a port) to an internal server's IP address. When traffic arrives at the FortiGate destined for the VIP's external IP, DNAT translates the destination to the mapped internal address before the firewall policy is evaluated. VIPs must be referenced in a firewall policy to allow the traffic.
  • Port forwarding: VIPs support port forwarding, which maps a specific external port (or port range) to a different internal port. For example, external port 8443 can be mapped to internal port 443, allowing public access to an internal HTTPS server on a non-standard external port.
  • VIP load balancing: FortiGate VIPs support server load balancing by mapping a single external IP to multiple internal servers. Load-balancing methods include static (round-robin, weighted), dynamic (least connections, least sessions), and HTTP host/URL-based distribution. Health monitors ensure traffic is only sent to responsive servers.
  • DNAT and firewall policy interaction: DNAT via VIP occurs before policy matching, so the firewall policy must use the VIP object as the destination address (not the internal server IP). The policy's destination interface should be the interface where the internal server resides. This two-step process (DNAT then policy check) is a common source of misconfiguration.
Exam tip: Remember that DNAT happens before the policy lookup. Always use the VIP object as the destination in your firewall policy, not the real internal server IP. If traffic is being dropped, verify that the policy references the VIP and that the correct interfaces are specified.

🛡 Scenario — DNAT to publish an internal web server

Task: An internal web server at 192.168.10.50:80 must be reachable from the internet on the FortiGate's WAN IP port 80.

Walk: 1) Policy & Objects → Virtual IPs → Create New. Name: VIP-WebServer. External Interface: port1 (WAN). External IP: WAN_IP. Mapped IP: 192.168.10.50. Enable Port Forwarding: External Port 80 → Map to Port 80. 2) Firewall Policy → Create New. Incoming: port1; Outgoing: port2; Source: all; Destination: VIP-WebServer; Service: HTTP; Action: ACCEPT. Enable logging. 3) Test: curl http://<WAN_IP> from an external host — should reach the internal server.

NSE4 exam point: VIPs are used for DNAT (inbound). For outbound NAT, use the NAT checkbox in the policy (SNAT). VIPs must be referenced in a policy destination to take effect — creating a VIP alone doesn't open traffic.

Key takeaways
  • SNAT modes: Use Outgoing Interface Address (PAT to the WAN IP — simplest), Dynamic IP Pool (overload / one-to-one / fixed-port), Static IP Pool (1:1 mapping). Pick by source-port preservation + public-IP availability.
  • DNAT via VIP object: configure once, then reference in policies. port-forward on the VIP narrows it to a specific external/internal port pair; without it, all ports forward.
  • Central NAT is a per-VDOM switch: enable it and NAT rules become independent of firewall policies. Off by default — the exam asks you to recognize when it's appropriate (NAT for multiple policies = central; NAT for one policy = per-policy).
⚡ Mini-quiz — Drill SNAT pool types, VIP/DNAT port-forwarding, and central vs per-policy NAT.
Quick quiz →
👤
Module 4
Firewall Authentication
2 lessons
Auth on FortiGate runs locally (built-in user db) or remote (LDAP, RADIUS, TACACS+, FSSO). Users get identified per session through a captive portal, transparent FSSO (Single Sign-On with AD), or explicit cert auth. Once identified, policies can match on user/group — turning a flat IP-based firewall into an identity-aware policy engine.

💻 Concrete example — the published web server that everyone can reach except the staff inside

Ticket: A VIP publishes an internal web server on the WAN address and external customers reach it fine. Staff on the LAN, following the same public hostname as everyone else, get a timeout — and the marketing site's own embedded links are broken for internal users only.

Walk: 1) Internal DNS resolves the public hostname to the public IP, so an internal client sends traffic destined for the WAN address into the FortiGate from the LAN side. This is hairpin NAT (NAT loopback), and nothing about the existing WAN → DMZ policy covers it: that policy matches an incoming interface of port1. 2) Add a second policy for the internal path — incoming interface LAN, outgoing interface DMZ, destination = the same VIP object, service HTTPS, ACCEPT — and enable NAT on it. The SNAT is not optional here: without it the server replies directly to the client's real LAN address, the client sees a reply from an IP it never contacted, and the handshake never completes. 3) The tidier alternative, where you control the internal resolver, is split-brain DNS: hand internal clients the private address and let them skip the firewall entirely.

Verify: curl -v https://www.example.com from a LAN client completes, and the traffic log shows the session matching the new LAN → DMZ policy with both the destination translated to the server and the source translated to the FortiGate. Remember the shape of the original mistake too: if you had written the policy destination as the server's real internal IP instead of the VIP, it would never have matched at all.

Key takeaway: DNAT happens before policy lookup, so firewall policies must reference the VIP object as the destination — a VIP alone opens nothing. Internal users reaching a published service by its public name need a hairpin policy with NAT enabled, or split-brain DNS. Port forwarding narrows a VIP to one port pair; without it, all ports forward.
4.1 Local & Remote Authentication

Choosing an authentication source is really choosing where identity already lives and what you need back from the server. LDAP validates a credential and tells you group membership; RADIUS adds authorization attributes and accounting and carries the challenge that makes token-based 2FA work; TACACS+ encrypts the whole payload and separates authorization per command. Local users are for guests and break-glass, not for staff.

Key Concepts

  • Local user accounts: FortiGate can store user credentials locally with passwords hashed in the device configuration. Local users are suitable for small deployments or guest access but do not scale well for enterprise environments. Each local user can optionally be assigned a FortiToken for two-factor authentication.
  • LDAP authentication: FortiGate integrates with LDAP directories (Active Directory, OpenLDAP) by querying the directory server to validate user credentials. The LDAP server object specifies the server IP, port (389/636), bind DN, base DN, and search filter. Secure LDAP (LDAPS on port 636) encrypts the authentication exchange.
  • RADIUS and TACACS+ authentication: RADIUS is widely used for network access authentication and supports attribute-value pairs for assigning user groups, VLANs, and other parameters. TACACS+ provides separate authentication, authorization, and accounting streams and encrypts the entire payload (unlike RADIUS, which only encrypts the password). Both protocols can be used as remote authentication servers in firewall policies.
  • FortiToken two-factor authentication: FortiToken (hardware or mobile app) generates time-based one-time passwords (TOTP) that are validated by the FortiGate. FortiToken Mobile uses push notifications for a streamlined user experience. Two-factor authentication can be enforced for admin access, VPN logins, and firewall policy authentication.
Exam tip: Understand the difference between RADIUS (encrypts only the password, uses UDP) and TACACS+ (encrypts the entire packet, uses TCP). Know that LDAP is used for credential validation while RADIUS/TACACS+ can also pass authorization attributes back to the FortiGate.

💻 Concrete example — an LDAP group that authenticates users but matches no policy

Ticket: You add an Active Directory LDAP server and a remote user group mapped to CN=VPN-Users. Test users authenticate successfully — the login is accepted — but the identity-based policy never matches and they get no access. Other users in the same OU work.

Walk: 1) Separate the two halves: authentication (does the password check out?) and group lookup (is this user in the group the policy names?). The first is clearly fine. 2) Test them together from the CLI with diagnose test authserver ldap <server> <user> <password>, which returns both the auth result and the group memberships the FortiGate actually sees. The failing users come back authenticated, with VPN-Users absent. 3) The cause is nested groups: those users are members of CN=Branch-Staff, which is itself a member of VPN-Users. A plain member lookup does not walk the chain. 4) Fix it in the LDAP server object — either point the group match at the nested structure AD exposes for recursive membership, or flatten the membership so the users are direct members. While you are in there, check the bind type and base DN: a regular bind with too narrow a base DN produces the same empty-group result.

Verify: Re-run diagnose test authserver ldap: the group now appears in the returned list, and the policy matches on the next login. Move the server to LDAPS on 636 if it is still on 389 — a simple bind on 389 sends the credential in the clear — and add FortiToken 2FA for anything reachable from outside.

Key takeaway: LDAP checks credentials and returns group membership; RADIUS returns authorization attributes and supports challenge-based 2FA (UDP, password encrypted only); TACACS+ encrypts the entire packet over TCP and splits authentication, authorization and accounting. When a user authenticates but no identity policy matches, the failure is group lookup, not the password — prove it with diagnose test authserver ldap.
4.2 Authentication Policies & Methods

The real distinction is active vs passive: active authentication interrupts the user with a captive portal, passive authentication (FSSO) learns the identity from a domain logon event they already completed. FSSO is the better experience and the bigger troubleshooting surface, because it depends on something happening off-box — a logon the collector agent has to witness and map to an IP.

Key Concepts

  • Active authentication (captive portal): When a user's traffic matches a policy requiring authentication, the FortiGate redirects the user to a captive portal login page. The user must enter credentials before the firewall permits traffic. Active authentication supports local, LDAP, and RADIUS authentication and can be customized with branded portal pages.
  • Passive authentication with FSSO: Fortinet Single Sign-On (FSSO) monitors domain controller security event logs (or uses a DC agent/polling) to detect user logon events and automatically maps usernames to IP addresses. This eliminates the need for users to authenticate again at the firewall, providing a seamless experience while still enabling identity-based policies.
  • Guest portals and user groups: FortiGate supports guest user management with temporary accounts, sponsorship workflows, and self-registration portals. User groups can be local, remote (LDAP/RADIUS), or FSSO-based, and are referenced directly in firewall policies to enforce access control by identity rather than just IP address.
  • Authentication timeouts and exemptions: Authenticated sessions have configurable idle and hard timeouts. Exempt lists can be defined to bypass authentication for specific sources, destinations, or services (e.g., allowing Windows Update traffic without requiring user login). The diagnose firewall auth list command shows currently authenticated users and their groups.
Exam tip: FSSO is the preferred method in Active Directory environments because it requires no user interaction. Know the three FSSO detection methods: DC agent mode, polling mode (agentless via WMI/WinSecLog), and collector agent mode. Use diagnose debug authd fsso list to verify FSSO user mappings.

🛡 Scenario — captive portal for guest Wi-Fi authentication

Task: Guest users on VLAN 100 must authenticate through a captive portal before getting internet access. Use local users for simplicity.

Walk: 1) User & Authentication → User Definition → Create New → create a local user guest01 with a password. 2) User & Authentication → User Groups → Create New → group GuestUsers, add guest01. 3) Policy & Objects → Firewall Policy → on the guest outbound policy, set Security Mode = Captive Portal, Portal type = Authentication, User Groups = GuestUsers. 4) Guest opens browser → redirected to FortiGate captive portal → enters credentials → internet access granted for the session timeout period.

NSE4 exam point: Active authentication (captive portal, dialog) requires the user to explicitly provide credentials. Passive authentication (FSSO, RSSO) uses existing domain login events — no second prompt.

Key takeaways
  • FSSO = transparent SSO from AD via the FSSO Collector Agent (polled DC security logs) or DC Agent (push). No client install; great UX. Captive portal is the fallback when FSSO can't resolve a user.
  • LDAP for directory lookups + group memberships, RADIUS for AAA (auth + account + audit) including 2FA via RADIUS-challenge, TACACS+ for command-level admin authorization (Cisco shops).
  • Match a policy on user/group instead of source IP for true identity-based rules — the policy logs then show who initiated the session, not just where from.
⚡ Mini-quiz — Drill FSSO modes, LDAP vs RADIUS vs TACACS+ use-cases, and identity-based policy matching.
Quick quiz →
🔐
Module 5
SSL VPN
2 lessons
SSL VPN gives remote users tunnel-mode (full L3 like IPsec, requires FortiClient) or web-mode (bookmarks in the browser, no client install — but limited to web/RDP/SSH bookmarks). Pick by what the user must do once inside: full network access → tunnel; specific apps → web. Authentication piggybacks on the same LDAP/RADIUS stack as policies.

💻 Concrete example — the FSSO user who still gets prompted after a clean domain logon

Ticket: FSSO is deployed and works for most staff. One team — all on a shared Remote Desktop host — keeps hitting the captive portal, and when one of them authenticates, a colleague on the same server briefly inherits their access.

Walk: 1) Check what the FortiGate believes: diagnose debug authd fsso list shows the current user-to-IP mappings. The RDS host appears once, with a single user bound to the whole server address. 2) That is the entire problem. FSSO maps one user to one IP, and on a terminal server every session shares that IP — so the mapping is a coin flip and the access bleeds between users. 3) The answer is the Terminal Server agent, which allocates each session its own source port range and reports user-to-IP-plus-port, giving the FortiGate a per-session identity. Deploy it on the RDS host and register it with the collector agent. 4) For the ordinary desktops, remember why FSSO can miss a user at all: the collector learns from domain controller security logs, so a user who logged on before the collector started, or who authenticated against a DC the collector does not poll, has no mapping — which is exactly when the captive portal should catch them as the fallback.

Verify: diagnose debug authd fsso list now shows distinct entries for the RDS sessions, and each user gets only their own policy set. Tighten the rest while you are here: set sane idle and hard authentication timeouts, and add an exempt entry so machine traffic such as Windows Update is never waiting behind a login prompt that no human will ever see.

Key takeaway: Active authentication (captive portal) prompts; passive authentication (FSSO/RSSO) reuses an existing domain logon. FSSO learns mappings from DC security logs via DC agent, polling, or collector agent modes — and maps user to IP, which breaks on shared-IP terminal servers unless you add the TS agent. diagnose debug authd fsso list is the first command; exempt machine traffic from authentication.
5.1 SSL VPN Modes

Pick the SSL VPN mode by answering one question: what must the user actually do once they are inside? A handful of published applications is web mode — clientless, nothing installed, safe on a device you do not manage. Anything that needs a real network adapter (thick clients, SMB shares, tooling that opens its own sockets) is tunnel mode. Realms are what let one FortiGate serve both populations without one portal becoming the lowest common denominator.

Key Concepts

  • Web mode: SSL VPN web mode provides clientless remote access through a web browser. Users authenticate via the SSL VPN portal and access internal resources (HTTP/HTTPS, RDP, SSH, SMB, FTP, VNC) through application bookmarks rendered in the browser. No client software installation is required, making it ideal for unmanaged devices and contractors.
  • Tunnel mode: SSL VPN tunnel mode creates a full network-layer VPN tunnel using the FortiClient application. The FortiGate assigns a virtual IP address from a configured pool to the client, and all traffic (or only specified traffic in split-tunnel mode) is routed through the encrypted tunnel, providing full network access as if the device were on the LAN.
  • Realms: SSL VPN realms allow a single FortiGate to host multiple SSL VPN portals on different URL paths, each with its own user groups, authentication settings, and portal design. This is useful for organizations that need separate VPN access for different departments, user types, or tenants.
  • Bookmarks and portal customization: Web-mode bookmarks define the internal resources available to users (URLs, RDP hosts, SSH servers, file shares). Portals can be customized with organization branding, and different portals can be assigned to different user groups to control which bookmarks, tunnel options, and widgets each group sees.
Exam tip: Web mode is clientless but limited to specific protocols through the portal; tunnel mode requires FortiClient but provides full Layer 3 network access. Know that tunnel mode uses a virtual adapter (ssl.root) on the FortiGate and requires a firewall policy from ssl.root to the internal interface.

💻 Concrete example — contractors and employees who need very different doors on the same IP

Ticket: The company hires a contractor team for a six-month project. They need one internal ticketing web app and nothing else, on their own unmanaged laptops. Employees already use the existing full-access tunnel portal. The quick answer — add the contractors to the existing group — would hand them a routed path into the corporate LAN.

Walk: 1) Give them a separate door, not a separate box. Create a portal with web mode only, tunnel mode disabled, carrying a single HTTPS bookmark to the ticketing app. 2) Expose it as its own realm so the URL path itself distinguishes the two populations (https://vpn.example.com/contractors) while both share one public IP and listening port. 3) Map the contractor group to the contractor portal in the authentication/portal mapping — the mapping, not the login page, is what decides which portal a user lands in. 4) Write the firewall policy from ssl.root to the app server only, sourced on the contractor group. Web mode still needs a policy; "clientless" limits the protocols, not the need for a rule.

Verify: A contractor logging in at the realm URL sees one bookmark and can reach one host; the same account at the employee realm is rejected. An employee is unaffected. Because nothing was installed on the contractor machines, offboarding is deleting the group membership — there is no client left behind holding a configuration profile.

Key takeaway: Web mode is clientless through a browser portal and limited to published bookmarks (HTTP/HTTPS, RDP, SSH, SMB, FTP, VNC); tunnel mode needs FortiClient and gives full Layer 3 access via a virtual adapter and an IP from the pool. Realms host multiple portals on one IP, each with its own groups and bookmarks. Either mode still requires a firewall policy from ssl.root to the internal interface.
5.2 SSL VPN Configuration

Two things account for most SSL VPN tickets, and neither is the VPN settings page. The first is the missing policy from ssl.root — the tunnel comes up and nothing works. The second is routing: split tunnelling means the client decides locally what goes down the tunnel, and a client whose home network overlaps yours will make that decision against you.

Key Concepts

  • Portal design and tunnel settings: SSL VPN configuration involves defining the listening interface, port (default 443), server certificate, and authentication method. Portal settings control whether tunnel mode, web mode, or both are enabled, along with the IP pool range for tunnel-mode clients and DNS server assignments.
  • Split tunneling vs full tunneling: Split tunneling routes only traffic destined for the corporate network through the VPN, while all other traffic (internet browsing) goes directly through the client's local connection. Full tunneling routes all traffic through the VPN for maximum security and visibility. Split tunnel is configured by defining specific routing entries pushed to the client.
  • Client integrity checking and host checks: FortiGate can enforce host-check policies that verify the remote device's security posture before granting VPN access. Checks include verifying that antivirus software is installed and running, the OS is up to date, specific registry keys exist, or custom software is present. Non-compliant devices can be denied access or placed into a restricted portal.
  • Authentication and access control: SSL VPN authentication can use local users, LDAP, RADIUS, SAML, or client certificates. Firewall policies must be created from the SSL VPN interface (ssl.root) to internal network interfaces, with source user/group matching to enforce identity-based access. Multi-factor authentication should always be enabled for SSL VPN access.
Exam tip: A common misconfiguration is forgetting to create the firewall policy from ssl.root to the internal interface. SSL VPN requires both the VPN settings configuration and matching firewall policies. Use diagnose vpn ssl list to view active SSL VPN sessions and troubleshoot connectivity.

🛡 Scenario — configuring SSL-VPN web mode for remote access

Task: Remote employees need to access an internal RDP server at 192.168.10.100 via a browser-based SSL VPN portal — no client software required.

Walk: 1) VPN → SSL-VPN Portals → Edit "full-access" (or create a new portal). Enable Web Mode. Add a bookmark: Type = RDP, Name = "Internal RDP", Remote Host = 192.168.10.100. 2) VPN → SSL-VPN Settings: Enable SSL-VPN on WAN interface, set Listen Port (default 443 or 10443), Authentication/Portal Mapping: map SSLVPNUsers group to full-access portal. 3) Create a firewall policy: ssl.root → LAN; Source = SSLVPNUsers group + SSL-VPN tunnel range; Destination = 192.168.10.100; Service = RDP; Action = ACCEPT. 4) Test: browse to https://<WAN_IP>:10443, log in, click the RDP bookmark.

NSE4 exam point: Web mode = browser only (portal). Tunnel mode = FortiClient installs a virtual adapter — gives full network access to the internal subnet, not just published bookmarks.

Key takeaways
  • Tunnel mode = L3 access, needs FortiClient + a routable IP from the SSL VPN pool. Web mode = portal with bookmarks (HTTP, RDP via HTML5, SSH), no client install, far more restricted.
  • Split tunneling controls what traffic enters the VPN: on = only corporate subnets (saves bandwidth, breaks DLP), off = everything (full inspection at HQ, hairpins internet via WAN). The exam asks you to match the choice to the constraint.
  • SSL VPN realms let one FortiGate host multiple portal experiences (employees / contractors / partners) on the same IP, each with its own auth + bookmark set, addressed via URL path.
⚡ Mini-quiz — Drill tunnel vs web mode triggers, split tunneling trade-offs, and realm scoping.
Quick quiz →
🔒
Module 6
IPsec VPN
3 lessons
IPsec is the site-to-site workhorse: IKE negotiates the SAs in two phases, ESP carries the encrypted payload. Phase 1 establishes the secure channel (main vs aggressive mode), Phase 2 sets up the actual data SAs (proxy IDs / selectors). NSE4 tests the dial-up shape too — branches with dynamic IPs initiating to a static HQ.

💻 Concrete example — a tunnel that connects but cannot reach the subnet it was built for

Ticket: A remote user connects successfully — FortiClient shows the tunnel up and an assigned IP — but cannot reach the 192.168.1.0/24 server subnet. Everyone else is fine. The user is working from a home router that also uses 192.168.1.0/24.

Walk: 1) Rule out the usual suspect first: diagnose vpn ssl list confirms the session exists and the ssl.root → LAN policy is present and matching for other users, so this is not the classic missing-policy case. 2) The collision is on the client. With split tunnelling, the FortiGate pushes routes for the corporate subnets and the client routes everything else locally — but the laptop already has a directly-connected route for 192.168.1.0/24 to its own Wi-Fi. A connected interface route wins over a pushed route, so the traffic never enters the tunnel. 3) There is no client-side fix worth deploying at scale. The durable answers are: re-address the corporate subnet off the RFC1918 ranges that consumer routers ship with (192.168.0.0/24 and 192.168.1.0/24), or switch that portal to full tunnel so the default route moves into the VPN. 4) Full tunnel also buys you inspection of the user's internet traffic at HQ — at the cost of hairpinning all of it through the WAN link.

Verify: After the corporate subnet is renumbered (or full tunnel enabled), route print on the client shows the corporate prefix pointing at the virtual adapter, and internal hosts answer. Two things to keep in place regardless of mode: multi-factor authentication on every SSL VPN login, and a host check so an unpatched or AV-less machine lands in a restricted portal rather than on the LAN.

Key takeaway: The two classic SSL VPN faults: no firewall policy from ssl.root to the internal interface (tunnel up, nothing reachable), and a client subnet that overlaps the corporate one under split tunnelling (the local connected route wins). Split tunnel saves bandwidth and loses visibility; full tunnel is the reverse. diagnose vpn ssl list shows the live sessions.
6.1 IPsec Fundamentals

IPsec is two negotiations, and knowing which one failed halves the troubleshooting. Phase 1 authenticates the peers and builds the IKE SA; Phase 2 uses that channel to agree the data SAs and, critically, the traffic selectors. "Phase 1 up, phase 2 down" and "nothing comes up at all" are different bugs with different causes, and the IKE debug tells you which you have within seconds.

Key Concepts

  • IKEv1 vs IKEv2: Internet Key Exchange version 1 uses either Main Mode (6 messages for identity protection) or Aggressive Mode (3 messages, faster but less secure) for Phase 1 negotiation. IKEv2 simplifies the exchange to 4 messages, supports MOBIKE for seamless roaming, built-in NAT traversal, and is more resilient to denial-of-service attacks. FortiGate supports both versions.
  • Phase 1 negotiation: Phase 1 establishes the IKE Security Association (SA) by negotiating encryption algorithm (AES-128/256), authentication method (pre-shared key or certificate), hash algorithm (SHA-256/512), Diffie-Hellman group (DH group 14, 19, 20, 21), and SA lifetime. The result is a secure channel used to negotiate Phase 2 parameters.
  • Phase 2 negotiation: Phase 2 uses the IKE SA from Phase 1 to negotiate the IPsec SA parameters, including the encryption and authentication algorithms for data traffic, PFS (Perfect Forward Secrecy) DH group, SA lifetime, and the proxy IDs (source and destination subnets). Each Phase 2 SA defines a bidirectional tunnel for a specific traffic selector.
  • ESP and AH protocols: Encapsulating Security Payload (ESP, IP protocol 50) provides confidentiality (encryption), integrity, and optional authentication, and is the protocol used in virtually all modern IPsec deployments. Authentication Header (AH, IP protocol 51) provides integrity and authentication but not encryption and is rarely used. ESP in tunnel mode encapsulates the entire original IP packet inside a new IP header.
  • NAT Traversal (NAT-T): When IPsec peers are behind NAT devices, ESP packets cannot pass through NAT because there are no port numbers. NAT-T encapsulates ESP inside UDP port 4500, allowing the traffic to traverse NAT devices. FortiGate enables NAT-T automatically when it detects a NAT device in the path during IKE negotiation.
Exam tip: Know the message exchange counts: IKEv1 Main Mode = 6 messages, Aggressive Mode = 3 messages, IKEv2 = 4 messages (IKE_SA_INIT + IKE_AUTH). Understand that PFS in Phase 2 generates new keys independent of Phase 1, providing stronger security at a slight performance cost.

💻 Concrete example — a tunnel that authenticates and then dies at phase 2

Ticket: A new tunnel to a partner's non-Fortinet firewall shows the IKE gateway established, then never passes traffic. The partner insists their side is configured "exactly as agreed". The IPsec monitor shows the phase 1 up and no phase 2 selectors.

Walk: 1) Run the one command that matters: diagnose debug application ike -1 with diagnose debug enable, then bounce the tunnel. 2) Read the failure text rather than guessing — a proposal problem reports no matching SA proposal, and it names the phase, so you immediately know phase 1 succeeded and phase 2 did not. 3) The mismatch is PFS: your phase 2 has Perfect Forward Secrecy on with DH group 14, theirs has PFS off. PFS is negotiated in phase 2 and generates fresh keying material independent of phase 1, so it must match exactly on both ends — and it is easy to miss because phase 1 already worked. 4) Agree one setting and apply it on both sides. If the debug had instead shown mismatched selectors, the fix would be the other phase 2 classic: proxy IDs, where one peer proposes the specific subnets and the other proposes 0.0.0.0/0 — the tunnel comes up and drops traffic that falls outside the agreed selector.

Verify: diagnose vpn tunnel list shows a phase 2 SA with incrementing encryption and decryption counters in both directions — counters moving one way only is its own diagnosis, pointing at the return path or a missing mirror policy. Turn the debug back off with diagnose debug disable; an IKE debug left running on a busy device is a real load.

Key takeaway: Phase 1 authenticates the peers and negotiates the IKE SA (IKEv1 main mode = 6 messages, aggressive = 3; IKEv2 = 4); phase 2 negotiates the data SAs, PFS and traffic selectors. Mismatched PFS or proxy IDs fail in phase 2 only — a working phase 1 proves nothing about phase 2. ESP (IP protocol 50) carries the encrypted payload and NAT-T wraps it in UDP 4500 when a NAT device sits in the path.
6.2 Site-to-Site VPN

Route-based is the default answer and worth understanding as a routing decision, not a VPN one: the tunnel becomes a virtual interface in the routing table, so everything you know about routes, metrics, failover and dynamic protocols applies. That is the strength — and the trap, because a tunnel that goes down leaves a route behind that other routes have to be prepared for.

Key Concepts

  • Route-based vs policy-based VPN: Route-based VPNs create a virtual IPsec interface and use static routes or dynamic routing protocols to direct traffic into the tunnel, offering greater flexibility for complex topologies. Policy-based VPNs define the tunnel within the firewall policy itself and do not create a virtual interface, making them simpler but less flexible. Route-based is the recommended approach in most scenarios.
  • Redundant VPN configurations: FortiGate supports multiple Phase 1 configurations to the same or different remote gateways for failover. Dead peer detection (DPD) monitors tunnel health and triggers failover to a backup tunnel when the primary peer is unreachable. Priority-based or weighted ECMP routing can distribute traffic across multiple active tunnels.
  • ADVPN (Auto-Discovery VPN): ADVPN enables dynamic, on-demand spoke-to-spoke tunnels in a hub-and-spoke topology. Initial traffic flows through the hub, which triggers the spokes to negotiate a direct tunnel between them, reducing latency and hub bandwidth consumption. ADVPN uses shortcut routes advertised by the hub via dynamic routing protocols (typically BGP or OSPF).
  • VPN overlays and SD-WAN integration: IPsec VPN tunnels are commonly used as SD-WAN overlay members. FortiGate SD-WAN rules can steer application traffic across multiple VPN tunnels based on performance SLAs (latency, jitter, packet loss), providing application-aware path selection across site-to-site connections.
Exam tip: Route-based VPN creates a virtual interface (e.g., vpn_phase1_name) that appears in the routing table and can participate in dynamic routing. Policy-based VPN does not create an interface and encrypts traffic based solely on the policy match. Always prefer route-based for production deployments.

💻 Concrete example — a tunnel failover that sends branch traffic out to the internet in clear

Ticket: A branch has a primary IPsec tunnel to HQ and a backup tunnel over a second circuit. During a planned failover test, internal 10.0.0.0/8 traffic does not switch to the backup — it leaves via the branch's default route toward the internet, where it is dropped by the upstream ISP. The traffic was meant to be encrypted.

Walk: 1) The static route pointing 10.0.0.0/8 at the primary tunnel interface is withdrawn when the tunnel drops, which is correct behaviour. With that route gone, the next best match for 10.0.0.0/8 is the default route. 2) Two things are missing. Add a route for 10.0.0.0/8 over the backup tunnel interface with a higher distance, so it only installs when the primary route is gone. 3) Add a blackhole route for 10.0.0.0/8 with a distance higher still. Now, if both tunnels are down, internal traffic is discarded locally instead of following the default route out of the building — the difference between an outage and a data leak. 4) Make failure detection active: enable DPD (dead peer detection) so the tunnel is declared down promptly rather than staying nominally up with a dead peer behind it.

Verify: Re-run the test: get router info routing-table all shows the 10.0.0.0/8 route move to the backup interface within the DPD interval, traffic keeps flowing encrypted, and with both tunnels administratively down it hits the blackhole and stops. A policy-based VPN could not have been built this way — with no virtual interface there is nothing to route over, which is the practical reason route-based is the production default.

Key takeaway: Route-based VPN creates a virtual interface that participates in routing, so failover is ordinary route preference — back up the tunnel route with a higher-distance alternative and a blackhole route, or traffic silently falls through to the default route. DPD detects a dead peer and triggers the switch. Policy-based VPN creates no interface and cannot do this; ADVPN builds spoke-to-spoke shortcuts on demand in a hub-and-spoke design.
6.3 Dial-up VPN & Troubleshooting

Dial-up inverts the usual assumption: the remote peer's IP is unknown, so it cannot be the thing that identifies them. Everything about dial-up configuration follows from that one constraint — how the FortiGate picks which phase 1 a connection belongs to, why aggressive mode exists, and why peer IDs or certificates stop being optional the moment you have a second dial-up peer.

Key Concepts

  • Dial-up IPsec VPN: Dial-up VPN allows remote clients (FortiClient, third-party IPsec clients) to connect to the FortiGate without requiring a static IP address. The FortiGate Phase 1 configuration uses "Dialup User" as the remote gateway type, and mode-config assigns virtual IP addresses, DNS servers, and split-tunnel routes to connecting clients.
  • FortiClient configuration: FortiClient is Fortinet's endpoint VPN client that supports both IPsec and SSL VPN connections. Administrators can deploy pre-configured VPN profiles via FortiClient EMS (Enterprise Management Server) or export VPN settings from the FortiGate. FortiClient supports certificate-based authentication, XAuth, and two-factor authentication.
  • IKE debug and troubleshooting: The primary troubleshooting command is diagnose debug application ike -1 (with diagnose debug enable), which outputs real-time IKE negotiation messages. Common failure causes include mismatched Phase 1/2 proposals, incorrect pre-shared keys, proxy ID mismatches, and NAT issues. The diagnose vpn ike gateway list and diagnose vpn tunnel list commands show SA status and traffic counters.
  • VPN monitoring and logs: The FortiGate IPsec Monitor (under VPN > IPsec Monitor in the GUI) displays tunnel status, uptime, incoming/outgoing bytes, and Phase 2 selectors. VPN event logs record tunnel establishment, rekeying, and failure events. SNMP traps can be configured to alert on tunnel state changes for integration with network management systems.
Exam tip: When troubleshooting IPsec, always start with diagnose debug application ike -1 and look for proposal mismatch, authentication failure, or proxy ID mismatch errors. Verify that Phase 1 proposals (encryption, hash, DH group) and Phase 2 proposals (encryption, hash, PFS) match on both peers exactly.

🛡 Scenario — site-to-site IPsec VPN between two FortiGates

Task: Connect HQ (192.168.1.0/24) to Branch (10.10.10.0/24) via IPsec VPN. Both sites have FortiGate firewalls with static public IPs.

Walk (HQ side): 1) VPN → IPsec Wizard → Site to Site. Remote gateway: Branch WAN IP. Authentication: Pre-Shared Key S3cur3Phr4se!. Local subnet: 192.168.1.0/24. Remote subnet: 10.10.10.0/24. 2) Wizard creates the Phase 1, Phase 2, and route automatically. 3) Add a firewall policy: LAN → Branch-IPsec interface; Source = HQ LAN; Destination = Branch LAN; Action = ACCEPT (and reverse). Repeat mirror config on Branch FortiGate. 4) Verify: get vpn ipsec tunnel summary → tunnel should show "up". Ping 10.10.10.1 from HQ LAN client.

NSE4 exam point: Phase 1 = IKE negotiation (authentication + encryption parameters). Phase 2 = defines the traffic selectors (which subnets). If the tunnel stays down, check that Phase 1 and Phase 2 parameters match on both ends.

Key takeaways
  • Phase 1 = authenticate the peers (PSK or cert) + agree on encryption/hash/DH group. Phase 2 = define the actual traffic selectors (which subnets) + their crypto. Mismatched proxy-IDs are the #1 "tunnel up but no traffic" cause.
  • Main mode (6 packets, identity-protected, requires fixed IPs both sides) vs aggressive mode (3 packets, identity in clear, supports dial-up). Use aggressive only when one peer has a dynamic IP.
  • Dial-up uses an FGT-as-server with multiple dial-up clients connecting; identify them by FQDN or peer ID since the source IP can't be a selector. Pre-shared key per peer or X.509 cert.
⚡ Mini-quiz — Drill IKE phase 1 vs 2, main vs aggressive triggers, dial-up identification, and proxy-ID mismatch symptoms.
Quick quiz →
🛡
Module 7
Security Profiles
3 lessons
Security profiles are where FortiGate stops being a router. Bundle them onto a policy: Antivirus (flow vs proxy mode), IPS (signatures + anomaly), Web Filter (FortiGuard categories + URL filter), Application Control (signature-matched app IDs), DNS Filter (block at name resolution). Each profile attaches independently — combine to taste.

💻 Concrete example — two dynamic-IP branches where only one tunnel ever comes up

Ticket: HQ terminates dial-up tunnels from branches on consumer broadband. Branch A works. You add Branch B with its own phase 1 and its own pre-shared key, and now the two fight: whichever connects first works and the other fails authentication, apparently at random.

Walk: 1) Ask what HQ has to work with at the moment a connection arrives. The source IP is dynamic and useless as a selector, so the FortiGate walks its dial-up phase 1 entries looking for a match — and with nothing else to distinguish them, it can settle on the wrong one, whose PSK then does not verify. 2) Give each peer an identity. In aggressive mode, the initiator sends its peer ID (local ID) in the first exchange, early enough for the responder to select the right phase 1 and therefore the right key. Set a distinct local ID on each branch and the matching peer ID on the corresponding HQ phase 1. 3) Understand the trade you just made: aggressive mode completes in three messages and sends identity in the clear, where main mode's six messages protect it — but main mode needs a fixed IP to identify the peer, which is precisely what you do not have. 4) The better long-term answer for a growing estate is certificates: the peer is identified by its certificate subject, which scales past the point where per-branch pre-shared keys become unmanageable.

Verify: diagnose vpn ike gateway list shows both gateways up with distinct peer identities, and both survive a simultaneous restart. If a branch still fails, go back to diagnose debug application ike -1 and read the phase it names — on dial-up the three recurring causes are peer-ID mismatch, PSK mismatch, and a NAT device in front of the branch that requires NAT-T (UDP 4500) to be permitted end to end.

Key takeaway: Dial-up peers have no fixed IP, so identity comes from a peer/local ID or a certificate — which is why aggressive mode (identity in the first exchange, sent in the clear) is used where main mode cannot be. Mode-config hands the client its virtual IP, DNS and split-tunnel routes. Start every dial-up investigation with diagnose debug application ike -1 and let the error name the phase.
7.1 Antivirus & IPS

Antivirus and IPS fail in opposite directions, and the exam leans on both. AV fails open when the engine cannot see inside what it is scanning — an archive in flow mode, a file past the oversize limit, a protocol on a port the profile does not inspect. IPS fails closed, blocking legitimate traffic that resembles an exploit. Knowing which way each one breaks tells you where to look.

Key Concepts

  • Flow-based antivirus scanning: In flow-based mode, the FortiGate inspects file content as it streams through the device using pattern matching against the FortiGuard antivirus signature database. This approach offers high performance and low latency but cannot reconstruct files for full emulation. It detects malware signatures, grayware, and known malicious file hashes in real time.
  • Proxy-based antivirus scanning: Proxy-based AV buffers the entire file before scanning, enabling full file reconstruction, archive extraction (zip, rar, tar), and sandbox submission for zero-day threat analysis. This mode supports file size limits, replacement messages for blocked content, and external scanning via FortiSandbox integration for advanced threat detection.
  • Intrusion Prevention System (IPS): The FortiGate IPS engine matches network traffic against thousands of signatures that detect known exploits, protocol anomalies, and vulnerability-based attacks. IPS signatures are classified by severity (critical, high, medium, low, info) and can be configured to monitor, block, or reset offending sessions. Custom IPS signatures can be written for organization-specific threats.
  • Protocol options and inspection ports: Protocol options profiles define which protocols (HTTP, FTP, SMTP, POP3, IMAP, CIFS) the FortiGate inspects and on which ports. Non-standard ports can be added to ensure that traffic running on unusual ports still receives inspection. Oversized files and sessions exceeding buffer limits can be passed, blocked, or logged based on profile configuration.
Exam tip: Flow-based AV is faster but cannot extract archives or submit files to a sandbox. Proxy-based AV provides deeper analysis at the cost of latency. IPS signatures with action set to "default" will use the vendor-recommended action (monitor or block) for each signature.

💻 Concrete example — an IPS signature that takes a production application offline

Ticket: Ten minutes after IPS is enabled on the server policy, an internal line-of-business application stops working for everyone. The instinct in the room is to remove the IPS profile and investigate later.

Walk: 1) Do not disable IPS estate-wide to fix one application — you would trade a single broken app for an unprotected network. Find the signature first. 2) Log & Report → Intrusion Prevention, filtered to the application server, names the exact signature, its severity, and the policy ID that triggered it. It is a high-severity signature for an exploit against a product you do not run, matching a pattern this app's own protocol happens to produce — a textbook false positive. 3) Narrow the exception to the smallest thing that works. Best: an exempt entry for that signature scoped to the application server's source/destination, so the signature stays active everywhere else. Acceptable while you confirm: set that single signature's action to monitor. Never: strip the profile from the policy. 4) Note what the signature action default means for the rest — each signature uses the vendor-recommended action, which is why a freshly enabled profile can block without you choosing to block anything.

Verify: The application recovers, the IPS log keeps recording the pattern for the exempted pair without acting on it, and every other signature is untouched. Apply the same "narrow the exception" reflex to AV: if a large legitimate file trips the oversize limit, adjust that limit in protocol options for that policy rather than turning scanning off — and remember to add any non-standard ports there, or the traffic passes uninspected without ever appearing as a block.

Key takeaway: IPS false positives are fixed by exempting the one signature for the affected hosts (or setting it to monitor), never by removing the profile; signature action "default" uses the vendor-recommended action. Flow-based AV cannot extract archives or submit to a sandbox — proxy-based can. Protocol options decide which protocols and ports get inspected and how oversized files are handled.
7.2 Web Filtering

Web filtering is a precedence question. FortiGuard categories are the broad policy; the local URL filter is the exception mechanism, and it is evaluated before the category rating, which is what makes targeted allow and block entries possible at all. Most "my exception did not work" tickets are not precedence problems — they are pattern-matching problems.

Key Concepts

  • FortiGuard category-based filtering: FortiGuard maintains a cloud-based URL database with over 80 categories (social networking, gambling, malware, phishing, adult content, etc.). The FortiGate queries FortiGuard in real time to classify URLs and enforces allow, block, monitor, warn, or authenticate actions per category. Category ratings can be overridden locally.
  • Static URL filters: Administrators can define explicit URL filter entries that override category-based decisions. URL filters support simple URLs, wildcard patterns, and regular expressions. An explicit block or allow entry for a specific URL takes precedence over the FortiGuard category rating, enabling fine-grained exceptions.
  • Content filters and safe search: Web filtering profiles can block pages containing specific words or patterns through web content filters. Safe search enforcement forces search engines (Google, Bing, YouTube) to use their restricted modes, filtering out explicit content from search results. FortiGuard search engine options can enforce this via DNS or header injection.
  • Web filter quotas and overrides: Quota-based filtering allocates a time or data allowance per category per user (e.g., 30 minutes of social media per day). Once the quota is exhausted, access is blocked until the next reset period. Administrators can also define override groups that allow authorized users to bypass specific category blocks after re-authenticating.
Exam tip: FortiGuard web filter requires an active subscription license and DNS connectivity for category lookups. The local URL filter is checked before the FortiGuard category rating, so explicit allow/block entries always take priority. Know the difference between "warn" (user can proceed after acknowledgment) and "block" (access denied).

💻 Concrete example — a wildcard exception that quietly matches nothing

Ticket: Marketing needs one social platform that the Social Networking category blocks. You add a URL filter allow entry for *.facebook.com, type Wildcard, action Allow. The block page still appears when users go to facebook.com.

Walk: 1) Precedence is not the issue: the URL filter is consulted before the FortiGuard category rating, so a matching allow entry would win. The entry is simply not matching. 2) *.facebook.com matches subdomains — www.facebook.com, static.facebook.com — and not the bare apex facebook.com that users type. Add both the apex and the wildcard, or use a pattern that covers both. 3) Scope the exception rather than granting it globally: put the allow entry in a web filter profile attached only to the marketing policy, so the category block stays in force for everyone else. 4) If the requirement is "access, but not all day", reach for a quota instead of an allow — a per-category time or volume allowance per user, blocking on exhaustion until the period resets.

Verify: A marketing user reaches the site by both names; a user outside that policy still gets the block page. Two related behaviours worth getting right at the same time: warn lets a user proceed after acknowledging a notice while block does not, and category lookups need an active FortiGuard subscription plus working DNS — when FortiGuard is unreachable, check the profile's behaviour for unrated traffic before assuming the filter is simply off.

Key takeaway: The local URL filter is evaluated before the FortiGuard category rating, so explicit allow/block entries override categories — but *.domain.com does not match the bare apex, which is why most exceptions "fail". Scope exceptions to a profile on one policy; use quotas for time-limited access; "warn" is bypassable by the user and "block" is not.
7.3 Application Control & DNS Filtering

Application control and DNS filtering exist because ports stopped meaning anything. Both identify traffic by what it is rather than where it is going — but they see different parts of the connection, and that difference decides which one can stop a given application. App control needs payload visibility to be precise; DNS filtering works before any encrypted session exists at all.

Key Concepts

  • Application signatures and categories: FortiGate application control uses deep packet inspection to identify over 4,000 applications regardless of port, protocol, or encryption. Applications are organized into categories (collaboration, cloud IT, social media, P2P, video/audio, VPN, etc.) with actions of allow, monitor, block, or traffic shape. Signature updates are delivered via FortiGuard.
  • Internet Service Database (ISDB): The ISDB is a built-in database of well-known internet services (Office 365, AWS, Google Workspace, Salesforce, etc.) defined by IP ranges and ports. ISDB entries can be used directly in firewall policies as destination objects, enabling precise control over cloud service access without manually maintaining IP lists that change frequently.
  • SSL deep inspection for application control: Many applications use HTTPS encryption, which prevents the FortiGate from identifying them via payload inspection. SSL deep inspection decrypts the traffic, applies application control signatures, and re-encrypts it before forwarding. Without deep inspection, application control relies on the SSL certificate's Common Name (CN) or SNI for identification, which is less granular.
  • DNS filter profiles: DNS filtering inspects DNS queries passing through the FortiGate and blocks resolution of domains categorized as malicious, phishing, botnet C&C, or other undesirable categories. DNS filtering works even for HTTPS traffic without requiring SSL inspection, since it blocks at the DNS resolution stage before any encrypted connection is established.
Exam tip: Application control needs SSL deep inspection to identify encrypted applications by payload. Without it, identification falls back to certificate CN/SNI. DNS filtering is effective against encrypted threats because it blocks domains at the DNS layer, before the encrypted session begins. Know that ISDB objects simplify policy creation for cloud services.

🛡 Scenario — blocking malware downloads with an AV + Web Filter profile

Task: Users are downloading executable files from file-sharing sites. Configure a security profile combination to block these and log the events.

Walk: 1) Security Profiles → AntiVirus → Create New. Enable scanning for HTTP, HTTPS (requires SSL inspection). Set action on virus = Block. 2) Security Profiles → Web Filter → Create New. Enable FortiGuard category blocking. Block categories: Malicious Websites, Hacking, Peer-to-Peer. Block URLs matching *.torrent. 3) Apply both profiles to the LAN → WAN firewall policy (edit the policy, attach AV profile and Web Filter profile). 4) Verify: attempt to browse to a blocked category → FortiGate returns a block page. Attempt to download an EICAR test file → blocked by AV.

NSE4 exam point: Security profiles (AV, Web Filter, IPS, App Control, DNS Filter) are only active when attached to a firewall policy. Creating a profile without attaching it does nothing.

Key takeaways
  • Flow mode AV/IPS scans as packets pass (lower latency, lower detection); proxy mode buffers and reconstructs (higher accuracy, higher latency). Default is flow; pick proxy when you need full file scanning.
  • Web Filter categorizes by FortiGuard's URL database; you can override a category for a specific URL via the static URL filter. App Control matches on protocol behavior, not port — that's how it catches apps tunneled over 443.
  • DNS Filter blocks at the resolver layer — fast, low-overhead, and stops the connection before it even forms. Pair it with Web Filter for defense in depth: DNS blocks the lookup, Web Filter blocks if a hard-coded IP bypasses DNS.
⚡ Mini-quiz — Drill flow vs proxy AV, Web Filter override, App Control vs port-based rules, and DNS Filter placement.
Quick quiz →
🔎
Module 8
SSL Inspection
2 lessons
TLS hides what your other profiles want to scan. Two inspection modes: Certificate Inspection (read the SNI/cert only — light, no MITM, can't see payload) vs Deep Inspection (full MITM — re-sign every cert with the FortiGate CA so endpoints must trust it). Deep is required for AV / IPS on HTTPS traffic; cert-only is enough for URL filtering.

💻 Concrete example — a tunnelling app that survives every port-based block

Ticket: A consumer VPN app is being used to bypass web filtering. It runs entirely over TCP 443, so it is indistinguishable from HTTPS to any port-based rule, and blocking the published server IPs achieves nothing because the list changes daily.

Walk: 1) Enable application control and block the relevant Proxy/VPN category. It helps, but not completely — without decryption, app control can only identify the session from the certificate CN or the SNI in the Client Hello, and an app that omits or randomises those slips past. 2) Add SSL deep inspection on that policy so the engine sees the payload and can match the application signature properly rather than guessing from the handshake. 3) Add a DNS filter as the cheap outer layer: it blocks resolution of the app's domains before any TLS session is negotiated, needs no decryption at all, and costs almost nothing in CPU. 4) Close the last gap with an ISDB destination object where one exists for the service, so the FortiGuard-maintained ranges do the work instead of a hand-kept IP list you would have to update daily.

Verify: The application stops connecting, and the app-control and DNS-filter logs show the attempts with the matched signature and domains. The layering is the point: DNS filtering catches the lookup, app control with deep inspection catches a hard-coded IP that skipped DNS, and the ISDB object catches the rest — no single layer covers all three paths.

Key takeaway: Application control identifies apps by signature regardless of port; without SSL deep inspection it can only go on certificate CN/SNI, which is far less reliable for encrypted apps. DNS filtering blocks at resolution, before any encrypted session forms, so it works without decryption. ISDB objects give policies the FortiGuard-maintained IP ranges for well-known cloud services.
8.1 Certificate Inspection vs Deep Inspection

Deep inspection is a deliberate man-in-the-middle, and every consequence follows from that. It is the only way AV, IPS and DLP see inside HTTPS — and it requires that every endpoint trust the FortiGate CA, and it will break any application that deliberately refuses to trust a substituted certificate. Certificate inspection is the lighter option that reads the SNI and certificate metadata without decrypting, which is enough for category filtering and nothing more.

Key Concepts

  • Certificate inspection mode: In certificate inspection mode the FortiGate examines only the server certificate metadata (Common Name, Subject Alternative Name, issuer, validity) and the SNI in the TLS Client Hello, without decrypting the session payload. This allows URL filtering and application identification based on the domain name while preserving end-to-end encryption. It generates no certificate warnings on client browsers.
  • Full SSL deep inspection: Deep inspection (also called man-in-the-middle or SSL proxy inspection) decrypts inbound and outbound HTTPS traffic by presenting a FortiGate-generated certificate to the client. The FortiGate decrypts the traffic, applies security profiles (AV, IPS, web filter, DLP), and re-encrypts it to the destination server. This provides full visibility into encrypted traffic but requires the FortiGate CA certificate to be trusted by client devices.
  • CA certificate deployment: For deep inspection to work without browser warnings, the FortiGate's CA certificate must be distributed to all client devices and added to their trusted certificate stores. In enterprise environments this is typically accomplished via Active Directory Group Policy Objects (GPO), MDM solutions, or manual installation. The default Fortinet_CA_SSL certificate is unique per device.
  • SSL inspection exemptions: Certain applications (banking, healthcare portals, certificate-pinned apps) may break under deep inspection. FortiGate allows administrators to define exemption lists by address, FQDN, category, or wildcard to bypass deep inspection for specific destinations. FortiGuard maintains a recommended exemption list for commonly affected services.
Exam tip: Certificate inspection does not generate browser warnings but only sees certificate-level information. Deep inspection sees the full payload but requires CA certificate trust. Applications using certificate pinning (e.g., banking apps, Microsoft updates) will fail under deep inspection and must be exempted.

💻 Concrete example — the banking portal and the update client that break the day deep inspection goes live

Ticket: Deep inspection is rolled out with the CA certificate pushed by GPO, and browsing works cleanly. Two things break immediately: finance cannot reach the corporate banking portal from the managed browser, and Windows Update starts failing on every machine — with errors that do not look like certificate warnings.

Walk: 1) This is not a trust-distribution failure; the GPO worked, which is why ordinary sites are fine. It is certificate pinning: these clients ship with the expected certificate or issuer baked in and reject the FortiGate's re-signed certificate by design. No amount of CA distribution fixes that — a pinned client is supposed to refuse. 2) The tell is the error style: a pinned app fails with a generic connection or update error rather than a browser trust prompt, which is why these get misfiled as network faults. 3) Add exemptions to the SSL inspection profile for the affected destinations — by FQDN, address, or whole category, and start from the FortiGuard recommended exemption list, which already covers the common pinned and sensitive services. 4) Exempt the finance and health categories as policy, not just as a fix: it avoids decrypting genuinely sensitive personal traffic, which is a privacy and often a legal position as much as a technical one.

Verify: Banking and Windows Update work again, general browsing is still decrypted and inspected, and the exempted destinations appear in the logs as bypassed rather than blocked. For anything you only need to categorise — not scan — certificate inspection remains the right tool: no decryption, no CA requirement, no pinning breakage, and no visibility beyond the domain.

Key takeaway: Certificate inspection reads only SNI and certificate metadata — enough for URL/category filtering, with no decryption and no browser warnings. Deep inspection decrypts and re-signs, so it needs the FortiGate CA in every endpoint trust store and will break certificate-pinned apps (banking, updaters) regardless of that trust. Exempt pinned and sensitive destinations by FQDN, address or category.
8.2 SSL Inspection Profiles

Outbound and inbound inspection look similar and rest on opposite foundations. Outbound protects your users and works by the FortiGate re-signing with its own CA. Inbound protects your servers and only works if you give the FortiGate the server's real certificate and private key. Getting that distinction backwards is the fastest way to a profile that inspects nothing.

Key Concepts

  • Outbound SSL inspection (protecting clients): Outbound deep inspection protects internal users browsing the internet. The FortiGate intercepts the client's TLS handshake, establishes its own session with the destination server, and presents a re-signed certificate to the client. This profile is applied to policies where internal users access external HTTPS resources.
  • Inbound SSL inspection (protecting servers): Inbound inspection (SSL offloading) decrypts traffic destined for an internal server by importing the server's real SSL certificate and private key into the FortiGate. The FortiGate terminates the SSL session, inspects the decrypted content with security profiles, and forwards the traffic to the server in clear text or re-encrypted. This protects web servers from encrypted attacks.
  • Trust chain and certificate validation: The FortiGate validates the server certificate chain during deep inspection, checking for expiration, revocation (CRL/OCSP), self-signed certificates, and untrusted CAs. Administrators can configure how to handle invalid certificates: block the connection, allow with a warning replacement page, or allow silently. Proper trust chain validation prevents users from reaching fraudulent or compromised sites.
  • Performance considerations: SSL deep inspection is CPU-intensive, particularly for high volumes of concurrent HTTPS sessions. FortiGate models with CP (Content Processor) ASIC chips offload SSL/TLS processing to hardware. Administrators should monitor CPU utilization and session counts when enabling deep inspection and may need to exempt high-bandwidth, low-risk traffic to balance security with throughput.
Exam tip: Inbound inspection requires the server's private key to be loaded on the FortiGate; outbound inspection uses the FortiGate's own CA certificate. Use diagnose test application ssl and hardware acceleration counters to monitor SSL inspection performance. CP processors significantly improve deep inspection throughput.

🛡 Scenario — enabling certificate inspection for HTTPS traffic

Task: The Web Filter is not blocking HTTPS sites because traffic is encrypted. Enable SSL inspection so the FortiGate can apply security profiles to HTTPS.

Walk: 1) Security Profiles → SSL/SSH Inspection → Create New. Choose Certificate Inspection (reads the SNI and certificate CN without decrypting the payload). This lets Web Filter apply category-based blocking to HTTPS without a MitM certificate. 2) Alternatively, choose Full Inspection (deep inspection / MitM): FortiGate re-signs the certificate using its own CA. Push the FortiGate CA certificate to all client browsers via GPO so they trust it. 3) Attach the SSL inspection profile to the LAN → WAN policy alongside the Web Filter and AV profiles.

NSE4 exam point: Certificate inspection = read metadata only, no decryption (limited visibility). Full inspection = decrypt, inspect, re-encrypt (full visibility but requires CA trust distribution). Financial and banking sites should be exempt from full inspection to avoid breaking TLS pinning.

Key takeaways
  • Certificate Inspection = no client install needed, only checks SNI/cert validity. Use when you only need web-category filtering of HTTPS sites.
  • Deep Inspection = full MITM; the FortiGate intermediate CA must be pre-installed on every endpoint, otherwise users see a cert warning on every site.
  • Exempt high-risk categories (banking, health) from deep inspection — legal + UX both win. Configure exemptions per profile by category, address, or FQDN.
⚡ Mini-quiz — Drill cert vs deep inspection triggers, CA-distribution prerequisites, and exemption strategies.
Quick quiz →
📊
Module 9
Logging & Monitoring
2 lessons
Logging answers "what just happened and why". FortiGate writes to local memory/disk by default; production sends to FortiAnalyzer (long-term analytics + reports) or syslog. FortiView is the real-time dashboard layered on top — top sources, top destinations, top apps, top threats — pivotable into the matching policy or session.

💻 Concrete example — a published web server that IPS never actually protected

Ticket: A public HTTPS application sits behind a VIP with IPS and a web application profile attached. After an incident, the logs show the attack traffic reaching the server with no IPS detections at all. The profiles were enabled the whole time.

Walk: 1) The traffic is TLS-encrypted to the server, and the policy carried the standard outbound deep-inspection profile — which re-signs with the FortiGate CA for clients that trust it. Internet clients do not trust it, and the profile was never the right tool for traffic arriving at your own server. The engines saw an opaque stream and matched nothing. 2) Build an inbound (protecting SSL server) inspection profile instead: import the server's real certificate and private key into the FortiGate and reference it, so the device can terminate the session legitimately, inspect the cleartext, and forward to the server. 3) Attach that profile to the VIP policy alongside IPS. 4) Plan for the cost — deep inspection is the most CPU-expensive thing on the box. Check whether the model's CP processor is offloading the crypto and watch CPU and concurrent session counts under real load before declaring it done.

Verify: Replay a benign test against a known signature: the IPS log now records the detection on inbound sessions, and the certificate presented to external clients is still the real one, so nothing changes for them. Set the profile's handling of invalid certificates deliberately while you are here — expired, self-signed, revoked or untrusted-CA server certificates can be blocked, allowed with a warning page, or allowed silently, and the default is rarely the one you would choose on purpose.

Key takeaway: Outbound inspection protects clients and uses the FortiGate CA; inbound inspection protects servers and requires the server's certificate and private key on the FortiGate. Security profiles cannot inspect what they cannot decrypt — an outbound profile on inbound server traffic silently inspects nothing. Deep inspection is CPU-heavy; CP ASICs offload it, and certificate-validation handling (expired, revoked, self-signed) is a choice you should make explicitly.
9.1 Log Types & Destinations

Logging decisions are storage decisions. The FortiGate will happily generate more logs than it can keep, and the moment you need history is the moment you discover how little of it survived. The exam wants the destinations and severity scale; the job wants you to know that memory logging dies at reboot and local disk rotates far sooner than anyone expects.

Key Concepts

  • Traffic logs: Traffic logs record every session that passes through the FortiGate, including source/destination IP, port, protocol, policy ID, bytes sent/received, duration, and NAT information. Traffic logs can be generated at session start, session end, or both. They are essential for forensic analysis, compliance auditing, and bandwidth monitoring.
  • Event logs: Event logs capture system-level activities such as administrator logins, configuration changes, HA failover events, VPN tunnel state changes, DHCP lease operations, and system reboots. Event logs are critical for change management auditing and identifying unauthorized administrative actions.
  • Security logs (UTM logs): Security logs are generated by security profiles and include antivirus detections, IPS alerts, web filter blocks, application control events, DNS filter blocks, and email filter actions. Each security log entry references the triggering policy ID and provides details about the threat (signature name, severity, action taken).
  • Log destinations: FortiGate supports multiple simultaneous log destinations: local disk (on models with SSD/HDD), memory buffer (volatile, limited capacity), FortiAnalyzer (dedicated log management and analytics appliance), FortiCloud (cloud-hosted logging service), and syslog servers (for integration with third-party SIEM platforms). FortiAnalyzer is the recommended destination for enterprise deployments.
  • Log severity levels and filtering: Logs are classified by severity: emergency, alert, critical, error, warning, notification, information, and debug. Administrators can filter which severity levels are sent to each destination, reducing storage requirements while ensuring critical events are always captured. Log rate limiting prevents log storms from overwhelming storage.
Exam tip: Memory logging is volatile and lost on reboot; disk logging persists but has limited capacity. FortiAnalyzer is Fortinet's recommended solution for long-term log storage and reporting. Know the three main log types (traffic, event, security) and which activities generate each type.

💻 Concrete example — an investigation that runs out of history after three days

Ticket: Security asks for the traffic history around an incident six weeks ago. The FortiGate is logging to local disk and the oldest entry available is four days old. Nothing was misconfigured; nothing was deleted.

Walk: 1) Disk capacity is finite and logs rotate oldest-first. Find what is consuming it: a policy with Log Allowed Traffic → All Sessions on a high-volume internal path — enabled for a troubleshooting session months ago and never turned back off — is generating an entry per session and crowding out everything else. 2) Set that policy back to logging security events only, or to session end rather than every session, keeping full logging on the paths that actually warrant it. 3) Apply severity thresholds per destination so each one keeps what it is for: everything of consequence to the central collector, warnings and above locally, debug only while you are actively watching. 4) Fix the real gap — long-term retention does not belong on the firewall. Forward to FortiAnalyzer (or a syslog/SIEM target) where six weeks is routine and the reporting lives. Local disk then becomes the short buffer it should always have been.

Verify: A week later, disk history covers a useful window again and the collector holds the full record. Know what each destination costs you: memory logging is fast and volatile — a reboot erases it — disk persists but rotates and wears, and only an external collector gives retention and cross-device correlation. Enable log rate limiting so a single noisy event cannot flood the buffer.

Key takeaway: Three log types: traffic (sessions), event (system and admin activity), security/UTM (profile detections). Memory logging is volatile, disk is limited and rotates, FortiAnalyzer/syslog is the answer for retention and reporting. Severity runs emergency through debug — filter per destination, and audit "All Sessions" logging left on after troubleshooting, which is the usual reason history disappears.
9.2 FortiView & Alert Management

FortiView is the same log data pivoted for a human: start at a top-talker, drill to the policy, drill to the session. It answers "what is going on right now" far faster than log search — and it can only show what was logged, which is why it is blank on a device logging to memory only. Automation stitches are the step beyond watching: a trigger wired to an action so the response happens without you.

Key Concepts

  • FortiView real-time monitoring: FortiView is the FortiGate's built-in traffic analytics dashboard that provides real-time and historical views of top sources, destinations, applications, threats, web sites, and cloud applications. FortiView uses drill-down navigation, allowing administrators to click from a high-level summary down to individual session details and log entries.
  • Threat map and policy hits: The FortiView threat map visualizes the geographic origin of detected threats in real time. Policy hit count monitoring shows how many sessions each firewall policy has matched, helping administrators identify the most-used rules, unused policies, and potential misconfigurations. These visualizations aid in both operational monitoring and policy optimization.
  • Automated email alerts: FortiGate can send email alerts when specific events occur, such as IPS critical-severity detections, HA failover, admin login failures, or system resource thresholds being exceeded. Alert email configuration requires an SMTP server and recipient list, and filters control which event types and severity levels trigger notifications.
  • SNMP traps and automation stitches: FortiGate supports SNMP v1/v2c/v3 for integration with enterprise network management systems (NMS). SNMP traps send asynchronous notifications on events like interface down, VPN tunnel changes, and high CPU usage. Automation stitches combine triggers (log events, SNMP, schedules) with actions (email, webhook, CLI script, cloud function) for automated incident response workflows.
Exam tip: FortiView requires logging to be enabled (disk or FortiAnalyzer) to display historical data. Automation stitches are configured under Security Fabric > Automation and are a powerful way to create automated response playbooks. Know that SNMP v3 provides authentication and encryption, while v1/v2c transmit community strings in clear text.

🛡 Scenario — diagnosing a blocked connection with traffic logs

Task: A user reports they cannot reach an internal server at 10.0.0.50:443. You need to determine whether the FortiGate is blocking the traffic and which policy is responsible.

Walk: 1) Log & Report → Forward Traffic. Filter by Source IP = user's IP, Destination IP = 10.0.0.50. Find entries with Action = Deny. Note the Policy ID in the log entry. 2) Policy & Objects → Firewall Policy → find the policy with that ID → check source/destination/service. 3) If no log entry exists, traffic may not be reaching the FortiGate. Run a sniffer: diag sniffer packet port1 "host 10.0.0.50" 4 10 l. 4) If traffic reaches but is being denied by an implicit deny, create the correct permitting policy above the implicit deny.

NSE4 exam point: The implicit deny does NOT log by default. Enable "Log Violation Traffic" in System → Settings to see denied traffic in the logs. Without this, denied traffic is invisible to Log & Report.

Key takeaways
  • Log destinations cascade: memory (fast, volatile, default) → disk (if model has one) → FortiAnalyzer/syslog (production). Always send to FortiAnalyzer in production — local disk wears out and rotates aggressively.
  • Log severity scale 0–7 (emergency → debug); set the threshold per destination to control noise. Production rule: WARNING+ to FAZ, NOTICE+ to disk, DEBUG only on demand.
  • FortiView is built on the same logs but pivoted: click a "top source" → drill into its policies → into specific sessions. The exam asks you to recognize this as the troubleshooting flow, not log search.
⚡ Mini-quiz — Drill log destinations, severity tuning, FortiView pivot paths, and FAZ vs syslog selection.
Quick quiz →
⚖️
Module 10
High Availability
2 lessons
HA pairs (or clusters up to 4) protect against single-FortiGate failure. Active-Passive (one box forwards, others stand by — simpler) vs Active-Active (load balanced — only for stateful sessions Fortinet supports). HA uses dedicated heartbeat links + virtual MAC addresses so the upstream/downstream switches see a stable next-hop even after failover.

💻 Concrete example — a malware detection that sat unnoticed on a dashboard all weekend

Ticket: A high-severity antivirus detection on a workstation is recorded on Friday evening. It is spotted on Monday morning in FortiView, by which point the host has been talking to the same destination all weekend. Nobody was watching the dashboard, which is the actual failure.

Walk: 1) Use FortiView to scope it first — start from Top Sources, drill into the host, then into the matching policy and the individual sessions to establish what it reached and when. That drill path is the tool's purpose, and it beats reconstructing the same picture from log search. 2) Then fix the notification gap. Configure alert email (SMTP server plus recipients) filtered to critical and high severity so detections of this class reach a human out of hours instead of waiting on a dashboard. 3) Automate the containment with an automation stitch under Security Fabric → Automation: trigger on a high-severity AV or IPS event, action to quarantine the source host via the Fabric and send a webhook to the on-call channel. The response now happens in seconds, at 3am, unattended. 4) Add SNMP traps for the infrastructure-level events the NMS should own — interface down, tunnel state change, high CPU — using v3, since v1/v2c send community strings in the clear.

Verify: Fire a harmless test that matches the trigger: the stitch runs, the webhook posts, the host is quarantined, and the action is recorded in the event log. Confirm FortiView has history to work with at all — it needs disk or FortiAnalyzer logging; with memory-only logging the historical views are empty exactly when you need them.

Key takeaway: FortiView pivots logged data from summary to session and needs disk or FortiAnalyzer logging to show history. Alert email covers notification; automation stitches (Security Fabric → Automation) pair a trigger with an action — quarantine, webhook, CLI script — for unattended response. SNMP v3 authenticates and encrypts; v1/v2c send community strings in clear text.
10.1 HA Modes

HA protects against a dead box, not against a dropped session — those are two separate features. Active-passive is the default for good reasons: simpler, predictable, and it covers the failure everyone actually has. Active-active adds throughput and complexity, and not every traffic type load-balances. Session pickup is the setting that decides whether users notice the failover at all.

Key Concepts

  • Active-passive HA: In active-passive mode, one FortiGate processes all traffic (the primary) while the other unit (the subordinate) stands by in a hot-standby state. If the primary fails, the subordinate takes over within sub-second to a few seconds, assuming the primary's IP and MAC addresses. This mode provides straightforward redundancy with no load distribution.
  • Active-active HA: In active-active mode, both FortiGate units process traffic simultaneously. The primary distributes sessions to the subordinate using a load-balancing algorithm. While both units handle traffic, the primary is responsible for all management functions and configuration synchronization. Active-active mode maximizes throughput but adds complexity to session handling.
  • FortiGate Clustering Protocol (FGCP): FGCP is the proprietary protocol that manages FortiGate HA clusters. It handles heartbeat monitoring, configuration synchronization, session synchronization, and failover coordination. FGCP runs over dedicated heartbeat interfaces and ensures that both units maintain identical configurations, firmware versions, and license entitlements at all times.
  • Session pickup: Session pickup synchronizes the session table between HA peers so that active sessions (TCP, UDP, ICMP, IPsec, and expectation sessions) survive a failover event without being dropped. TCP sessions resume without requiring retransmission, and VPN tunnels remain established. Session pickup must be explicitly enabled and configured, as it generates additional heartbeat traffic.
Exam tip: Active-passive is simpler and recommended for most deployments. Active-active provides higher throughput but only the primary handles certain traffic types (e.g., proxy-based inspection). Session pickup is critical for seamless failover but consumes additional bandwidth on the heartbeat link. Both HA peers must run the same firmware version and have matching licenses.

💻 Concrete example — a failover users called an outage, on a cluster that worked perfectly

Ticket: A planned failover test is declared a success: the secondary takes over in about a second and browsing is unaffected. Meanwhile the database team reports dropped connections, and a large file transfer restarted from zero. The cluster did exactly what it was configured to do.

Walk: 1) Failover moved the traffic; it did not move the sessions. Without session pickup, the new primary has an empty session table, so every established flow is unknown and gets dropped. 2) Short-lived HTTPS connections hide this completely — the browser opens new ones and nobody notices — while long-lived TCP sessions (database connections, SSH, SFTP, large transfers) die visibly. That asymmetry is why the test "passed". 3) Enable session pickup so the session table is synchronised between cluster members and established flows survive the takeover. 4) Budget for it: synchronisation is continuous traffic on the heartbeat link, which is an argument for two dedicated heartbeat interfaces rather than one shared with anything else.

Verify: Repeat the test with a long-running SSH session and a transfer in flight: both survive, and diagnose sys ha status shows the roles swapped cleanly. Be precise about what HA does and does not cover — FGCP synchronises configuration and (with pickup) sessions, but both members must run the same firmware and hold matching licences, and in active-active mode some inspection work stays on the primary rather than being shared.

Key takeaway: Active-passive: one unit forwards, the other is hot standby — simplest and the usual choice. Active-active: both forward, but not all traffic types load-balance and the primary keeps management and some inspection. FGCP handles heartbeat, config sync and failover. Session pickup must be enabled explicitly, or established sessions drop on failover — short-lived connections mask it, long-lived ones expose it.
10.2 HA Configuration

An HA cluster forms only when the members agree on more than you would expect, and the failure mode is silence: two devices that simply refuse to become one, with little in the GUI to say why. The prerequisites are the exam's favourite gotcha — matching model, firmware and licensing, a shared group name and password, and heartbeat interfaces that are genuinely dedicated.

Key Concepts

  • Heartbeat interfaces: At least one dedicated interface must be configured for HA heartbeat communication, carrying FGCP hello packets, configuration synchronization, and session table updates. For redundancy, two heartbeat interfaces should be configured on separate physical links. Heartbeat traffic is encrypted using a group password to prevent unauthorized devices from joining the cluster.
  • HA priorities and election: The primary unit is elected based on a priority value (0-255, higher wins), number of monitored interfaces that are up, HA uptime, and serial number (as a tiebreaker). Administrators set the priority to control which unit becomes primary. Override mode forces re-election when a higher-priority unit comes back online after a failure.
  • Failover behavior and monitoring: FortiGate HA monitors heartbeat links, configured monitored interfaces, and remote link monitoring targets (via ping to upstream routers). If monitored interfaces go down, the unit's effective priority is reduced, triggering a failover. The diagnose sys ha status command shows cluster state, and execute ha manage allows CLI access to the subordinate unit from the primary.
  • Firmware upgrades in HA and load balancing: FortiGate supports uninterruptible firmware upgrades in HA mode: the subordinate is upgraded first, then a failover occurs, and the former primary is upgraded, minimizing downtime to a single failover event. Virtual MAC addresses used by the cluster ensure that upstream and downstream devices do not need ARP table updates during failover, providing transparent recovery to the network.
Exam tip: Always use two heartbeat interfaces for redundancy. Know the election criteria order: override setting, priority value, monitored interface count, HA uptime, serial number. Use diagnose sys ha status to check cluster health and execute ha manage to access the subordinate CLI. Virtual MAC addresses prevent ARP issues during failover.

🛡 Scenario — configuring Active-Passive HA between two FG-100F units

Task: Deploy two FG-100F units in Active-Passive HA. The primary handles all traffic; the secondary takes over within seconds if the primary fails.

Walk: 1) On Primary: System → HA → Mode = Active-Passive. Group Name: HQ-HA. Password: ha-secret-pw. Priority: 200 (higher = preferred primary). Enable session sync. Connect HA heartbeat cables to dedicated heartbeat interfaces (HA1/HA2). 2) On Secondary: identical config but Priority = 100. 3) After a few seconds, get system ha status shows one Master and one Slave. 4) Failover test: unplug a WAN cable on the primary. Secondary promotes to Master within 1–3 seconds. Reconnect primary → it rejoins as Slave and syncs config automatically.

NSE4 exam point: In A-P mode, both units share the same virtual MAC addresses — switches don't need to update their ARP tables on failover. In A-A mode, load is shared across both units; both are actively forwarding. A-P is simpler and covers most enterprise HA requirements.

Key takeaways
  • Active-Passive = primary forwards, secondary is hot-standby (~1 second failover); Active-Active = both forward sessions but only certain traffic types load-balance — the rest stays on the primary.
  • HA cluster members must match: same model, same firmware, same FortiOS version, same number of interfaces. The exam tests this prerequisite as a gotcha.
  • Dedicated heartbeat ports (default ha1 + ha2) carry the cluster state — never expose them to the production network. Loss of all heartbeats = split-brain risk.
⚡ Mini-quiz — Drill A-P vs A-A trade-offs, cluster prerequisites, heartbeat isolation, and split-brain prevention.
Quick quiz →

💻 Concrete example — two identical units that will not form a cluster

Ticket: Two FG-100F units, same model, same configuration typed in twice, heartbeat cables in place. Each insists it is the primary of a one-member cluster. The GUI reports nothing useful on either.

Walk: 1) Compare what the units think they are running: get system status on both shows different firmware builds — one shipped from stock with an older FortiOS. FGCP will not merge members on mismatched firmware, so each forms its own cluster of one. Upgrade the older unit to match exactly. 2) Re-check the identity fields, which must be identical on both: group name, group ID and the HA password, since the password is what authenticates a member into the cluster. 3) Verify the heartbeat: hbdev must name the dedicated interfaces on both units, and those interfaces must be physically connected to each other rather than through the production switch, where a VLAN mistake can isolate them. 4) Set priority deliberately — higher wins — and understand the election order behind it: override setting, then priority, then the number of monitored interfaces that are up, then HA uptime, then serial number as the final tiebreak.

Verify: diagnose sys ha status shows one primary and one subordinate with a synchronised configuration; diagnose sys ha checksum show matches on both, which is the definitive proof the config is in sync rather than merely similar. From the primary, execute ha manage reaches the subordinate's CLI. Configure monitored interfaces so a dead WAN port lowers that unit's effective priority and triggers failover — a cluster that only fails over when a whole box dies misses the more common failure — and when it is time to patch, upgrade in HA: the subordinate first, then a single failover, then the former primary.

Key takeaway: Cluster prerequisites are strict: same model, same firmware, matching licences, identical group name/ID and HA password, and dedicated heartbeat interfaces (two, for redundancy, never on the production network). Election order: override, priority, monitored interfaces up, HA uptime, serial number. diagnose sys ha status and checksum show confirm health; execute ha manage reaches the subordinate; monitored interfaces are what make a link failure trigger failover.
Start practicing →