ITNuvoAkademiya
Academy homePackagesPlaylistsToolsSubnet calculatorSearchGlossary
CiscoCCNA · CCNA: networking fundamentals1. Introduction2. Network Fundamentals3. Network Access4. IP Connectivity5. IP Services6. IPv67. Security Fundamentals8. AutomationCCNP: Enterprise networks · coming soon
LinuxLinux: system administrator üçün · Linux for system administrators1. Getting to know Linux2. Working with text3. Users and permissions4. Processes and packages5. Inside the system6. Monitoring and logs7. NetworkingRed Hat Enterprise Linux · Red Hat Enterprise Linux: from beginner to advanced1. Getting started2. Packages3. Users and permissions4. SELinux5. Services6. Storage7. Networking8. Building services9. Boot and recovery10. DevOps11. Security and monitoring
FortinetFortiGate Administrator · FortiGate Administrator: from first login to ZTNA1. Getting to know FortiGate2. Routing, policy and NAT3. Security profiles4. Users and logs5. Resilience, SD-WAN and automation6. VDOM7. VPN and ZTNA8. Proxy9. DMZ
MonitoringZabbix · Zabbix: from installation to alerts1. Introduction2. Installation and the database3. Basics: groups, templates, users4. Connecting devices5. Alerts, Grafana and the API
VirtualizationProxmox VE · coming soonVMware ESXi · coming soon
My account / Sign in
AZENRU
← itnuvo.com

Firewall authentication: the user, not the IP

Lesson 4.19 minIntermediateNovember 24, 2026
Open

This lesson is open to everyone. The other lessons open with a package: sign in or sign up, then choose a package.

Key points

  • When a user group is added to a policy, traffic passes only for authenticated members of that group. Both the address and the group must match.
  • Active authentication: the FortiGate asks the user for a name and password. The prompt can be shown only in HTTP, HTTPS, FTP and Telnet traffic.
  • Passive authentication: the user is asked nothing; the identity is learned from another source (for example a domain logon with FSSO).
  • The ordering trap: if a policy without authentication that matches the same traffic is higher up, the FortiGate never asks for a password.
  • Authentication is temporary: an idle user must log in again after auth-timeout (5 minutes by default).

Why is the IP not enough?

Writing a policy that says "10.10.10.50–59 is accounting" works until an accountant takes a laptop to another room or DHCP gives it a different address. An IP identifies a device, not a person.

A user-based policy says: "members of the accounting group may open the banking site, whichever computer they sit at". On top of that the logs show a name, not an IP.

Local users and groups

The simplest case: users are stored on the FortiGate itself.

FGT-HQ
FGT-HQ # config user local
FGT-HQ (local) # edit "isci01"
FGT-HQ (isci01) # set type password
FGT-HQ (isci01) # set passwd <password>
FGT-HQ (isci01) # next
FGT-HQ (local) # end
FGT-HQ # config user group
FGT-HQ (group) # edit "MUHASIBAT-GRP"
FGT-HQ (MUHASIBAT-GRP) # set member "isci01"
FGT-HQ (MUHASIBAT-GRP) # next
FGT-HQ (group) # end

GUI: User & Authentication > User Definition and User Groups.

Always use a group in a policy, not a single user. When a new employee arrives you add them to the group and do not touch the policy.

Local users suit a small office or guest access. In a company with dozens of staff the accounts already exist in Active Directory and need not be created again on the FortiGate (lesson 23).

Adding a group to a policy

FGT-HQ
FGT-HQ # config firewall policy
FGT-HQ (policy) # edit 5
FGT-HQ (5) # set name "MUHASIBAT-to-WAN"
FGT-HQ (5) # set srcintf "port2"
FGT-HQ (5) # set dstintf "port1"
FGT-HQ (5) # set srcaddr "LAN-NET"
FGT-HQ (5) # set dstaddr "all"
FGT-HQ (5) # set groups "MUHASIBAT-GRP"
FGT-HQ (5) # set schedule "always"
FGT-HQ (5) # set service "HTTP" "HTTPS" "DNS"
FGT-HQ (5) # set action accept
FGT-HQ (5) # set nat enable
FGT-HQ (5) # next
FGT-HQ (policy) # end

In the GUI you add the group from the User section to the Source field, next to the address.

The policy now reads: the source address is in LAN-NET and the user is a member of MUHASIBAT-GRP.

How active authentication works

  1. A staff member opens a site in the browser.
  2. The packet matches policy 5 (ports, address, service), but the FortiGate does not know who is behind this IP.
  3. The FortiGate intercepts the request and shows a login page in the browser.
  4. The user types a name and password. The FortiGate checks them and keeps an IP → user → groups entry in memory.
  5. From then on all traffic from that IP counts as this user.

An important limitation: the login page can be shown only in HTTP, HTTPS, FTP and Telnet traffic. If a user turns on the computer and starts the mail client straight away, the FortiGate can show nothing and the traffic simply does not pass. The user has to open a browser and log in first.

Three classic traps

1. A policy without authentication above. The FortiGate reads policies top-down. If a policy that matches the same traffic and requires no group is higher up, the traffic lands there and the login page never appears.

OrderPolicyResult
1LAN → internet, no groupEveryone passes, nobody is asked for a password
2LAN → internet, MUHASIBAT-GRPNever used

Policies with authentication must be at the top.

2. DNS. For the login page to appear the browser first has to resolve the site name. If DNS traffic does not pass, the browser never sends a request. So add DNS to the services of the authentication policy.

3. HTTPS and the certificate. When the user opens an HTTPS site the FortiGate has to step in and show the login page, and the browser gives a certificate warning. The solution: assign a trusted certificate to the login page (config user setting → set auth-cert).

Captive portal

The method above works at policy level. A captive portal works at interface level: everyone arriving on that port must log in first. It is the typical choice for guest Wi-Fi.

FGT-HQ
FGT-HQ # config system interface
FGT-HQ (interface) # edit "VLAN20"
FGT-HQ (VLAN20) # set security-mode captive-portal
FGT-HQ (VLAN20) # set security-groups "Guest-group"
FGT-HQ (VLAN20) # next
FGT-HQ (interface) # end

Timeouts

FGT-HQ
FGT-HQ # config user setting
FGT-HQ (setting) # set auth-timeout 30
FGT-HQ (setting) # set auth-timeout-type idle-timeout
FGT-HQ (setting) # end
TypeWhen it expires
idle-timeout (default)When no traffic comes from the user for this many minutes
hard-timeoutThis many minutes after login, regardless of activity
new-sessionWhen no new session is opened

The default of 5 idle minutes is very short: a user who comes back from a tea break has to type the password again. Most people set it to 30–480 minutes.

Who is logged in?

FGT-HQ
FGT-HQ # diagnose firewall auth list
FGT-HQ # diagnose firewall auth clear

The first command shows logged-in users, their IPs, groups and the time left. The second logs everyone out (useful while testing). GUI: Dashboard > Users & Devices > Firewall Users; there you can log out a single user.

Watch out on a real device: active authentication is tiring for staff and does not work on devices that cannot type a password, such as servers, printers and phones. Write a separate address-based policy for them. In a domain network a passive method (FSSO, lesson 24) is more comfortable for staff: they notice nothing.

🧪 Hands-on lab · Device: FortiGate-VM

User, group and a group-based policy

Create a local user isci01 (set type password, any password). Create a group called MUHASIBAT-GRP and make isci01 a member. Then add this group to policy 1 (set groups). From then on the policy works only for authenticated members of the group.

Checked:

  • User isci01
  • Group MUHASIBAT-GRP: isci01
  • Policy 1: groups MUHASIBAT-GRP

▶ Start the lab

Check yourself

5 questions · answers are shown instantly · 3 correct answers complete the lesson

1A policy has both srcaddr and a user group. When does traffic pass?

The source condition requires both the address and the identity.

2In which traffic can the login page be shown with active authentication?

Only in these protocols can the FortiGate show the user a prompt.

3Above a policy that requires a group there is a policy without a group matching the same traffic. What happens?

The first matching policy is applied; the authentication policy must be higher up.

4With an authentication policy the login page never appears and the browser says "site not found". What is the most likely cause?

If the browser cannot resolve the name it sends no request and the page cannot be shown.

5idle-timeout is 5 minutes. When must the user log in again?

idle-timeout counts inactivity; the counter resets while traffic keeps coming.
Was this lesson useful?

Comments

Sign in to comment.