Draft for network team review. Checked against Ubiquiti and Fortinet docs (October 2026); points marked "field reports" still need a check on one of our mixed sites.

VanBelkumHelp

Networking›FortiGate with UniFi

Network team · Mixed sites

FortiGate up top, UniFi below. Two half views.

When a FortiGate is the firewall and UniFi runs the switches and Wi-Fi, each system sees only its own part of the network. UniFi loses everything that depends on a UniFi gateway, and the FortiGate can't see inside the UniFi switches. Knowing which half lives where saves a lot of chasing.

2places to look: FortiGate and UniFi
1DHCP server per VLAN, and it holds the reservations
8080TCP port UniFi devices need to reach the controller

Part 1 · Who sees what

Swap the gateway and UniFi loses the top of the picture.

In a full UniFi stack, one app sees the internet connection, the traffic, the switches, the Wi-Fi and every client's address. Put a FortiGate on top and the routing, firewall, DHCP and internet side move to the FortiGate. UniFi keeps the switch ports and the Wi-Fi.

Full UniFi stack

One app, one view, top to bottom.

UniFi gatewayInternet, firewall, VPN, routing, DHCP
UniFi
UniFi switchesPorts, PoE, VLANs
UniFi
UniFi access pointsSSIDs, Wi-Fi clients
UniFi

FortiGate with UniFi

Two apps. Neither one sees the whole network.

FortiGateInternet, firewall, VPN, routing, DHCP
FortiGate
UniFi switchesPorts, PoE, VLANs
UniFi
UniFi access pointsSSIDs, Wi-Fi clients
UniFi

Where each feature lives

FeatureFull UniFiFortiGate + UniFiWhat it means for us
Traffic and app identificationUniFiFortiGateUniFi's traffic identification needs a UniFi gateway. Look up apps and top talkers on the FortiGate.
Traffic flows and logsUniFiFortiGateUniFi Flows only logs traffic through a UniFi gateway. Use FortiGate logs and FortiView.
Firewall rules, port forwards, VPN, IPSUniFiFortiGateThese menus in UniFi set up a UniFi gateway. On a mixed site they do nothing; make changes on the FortiGate.
DHCP and reservationsUniFiFortiGateSee Part 3. A UniFi Fixed IP is not where the reservation lives.
Local DNS names and option 43 in UniFiUniFiFortiGateUbiquiti says these UniFi settings only work with a UniFi gateway. Set them on the FortiGate.
Internet and WAN healthUniFiFortiGateUniFi does not manage the FortiGate, so check the WAN on the FortiGate. Field reports.
Switch ports, PoE, VLAN taggingUniFiUniFiUnchanged. UniFi still runs the switches.
Wi-Fi, SSIDs, wireless clientsUniFiUniFiUnchanged.
Which switch port a device is onUniFiUniFiOnly UniFi knows. The FortiGate sees the device's MAC on its VLAN interface, not the port. (Full port view on the FortiGate needs FortiSwitch, managed over FortiLink.)

Part 2 · Why things show up wrong

Missing switches, odd IPs, and devices stuck "adopting."

Most of these come from one fact: UniFi isn't the router or the DHCP server any more, so it has to learn addresses secondhand and reach its devices across the FortiGate.

What you see in UniFiLikely causeCheck
Switch or AP stuck "Adopting" or keeps going offlineThe controller is on another VLAN and the device can't reach it. UniFi devices need TCP 8080 to the Network app.A FortiGate policy allows the device VLAN to reach the controller on TCP 8080. Option 43 or a DNS name unifi points at the controller.
Device shows 192.168.1.20 or a 169.254.x.x addressIt never got a DHCP lease. That's its fallback address.The FortiGate's DHCP server is on for that VLAN, the uplink port carries the right native VLAN, and DHCP Guarding trusts the FortiGate.
Switch drops off after changing its management VLANThe new VLAN isn't tagged on the upstream port, or it's already the port's native VLAN.Tag the VLAN on every port up to the FortiGate before you set Network Override. A wrong change can need a factory reset at the switch.
A VLAN works on the FortiGate but devices on it get no addressThe VLAN isn't defined in UniFi, so the switch ports never carry it.Create it in UniFi as a network with Router: Third-party Gateway and the same VLAN ID.
Clients on one VLAN get no IP, others are fineDHCP Guarding is on and doesn't list the FortiGate as a trusted server for that network.Enter the FortiGate's interface IP for that VLAN as the trusted DHCP server.
Clients show a MAC but no IP or name, or an old IPUniFi isn't the DHCP server, so it doesn't have the lease table. Field reports; Ubiquiti doesn't document how UniFi picks up client IPs in this setup.Trust the FortiGate's DHCP monitor (Dashboard › Network › DHCP) for the current IP. Match on MAC.
The FortiGate looks like a client, an unknown device, or doesn't show in the topologyUniFi doesn't manage third-party gateways. Field reports.Expected. Don't try to adopt or fix it in UniFi.

Rule of thumb: for an address question, ask the FortiGate. For a port, PoE or Wi-Fi question, ask UniFi. Match the two on the device's MAC address.

Part 3 · FortiGate as the DHCP server

The FortiGate hands out the addresses, so it holds the facts.

When the FortiGate runs DHCP, the lease table, the reservations and the DHCP options all live on the FortiGate. UniFi only knows what it overhears. This is the same rule as in DHCP reservations: the DHCP server holds the reservation.

What UniFi loses

  • The lease table. UniFi can't tell you who has which IP for sure. The FortiGate can.
  • Reservations. A Fixed IP set in UniFi is for a UniFi gateway's DHCP server. Make the reservation on the FortiGate.
  • DHCP options from UniFi. Option 43 and the other DHCP settings in UniFi aren't used. Set them on the FortiGate.

Things that differ

  • Lease time. The FortiGate defaults to 7 days, UniFi gateways to 1 day. A moved device can keep an old address longer.
  • DHCP Guarding. On by default on UniFi switches. It has to trust the FortiGate's IP or clients get nothing.
  • Phones. Provisioning options (like option 66) go on the FortiGate's DHCP server too.

Reservation and option 43 on the FortiGate (CLI)

In the GUI both are on the interface's DHCP server settings. The CLI below reserves an IP for one MAC and points UniFi devices at a controller on 10.0.10.5. Option 43 is 0104 followed by the controller IP in hex: 10.0.10.5 is 0a 00 0a 05.

config system dhcp server
    edit 2
        config reserved-address
            edit 1
                set ip 10.0.20.45
                set mac ac:cc:8e:4c:22:10
                set description "Parking lot camera"
            next
        end
        config options
            edit 1
                set code 43
                set type hex
                set value 01040a000a05
            next
        end
    next
end

Scope 2, the IPs and the MAC are examples. Run show system dhcp server first to find the right scope ID.

What the FortiGate can't see: device detection on the FortiGate works on devices on its directly connected LAN interfaces, by MAC. It sees the clients on each VLAN, but not which UniFi switch or port they're on. Turning on LLDP reception on the interface facing the UniFi switch lets the FortiGate list that switch as a neighbor.

Part 4 · Set it up right

Make both sides agree.

A mixed site works fine when the VLANs, the DHCP server and the adoption path are set up on purpose and written down.

  1. One DHCP server per VLAN: the FortiGate. Keep every reservation there and note it in the site docs. Don't add Fixed IPs in UniFi for those networks.
  2. Same VLANs on both sides. Each FortiGate VLAN interface gets a matching UniFi network with Router set to Third-party Gateway and the same VLAN ID.
  3. Match the native VLAN on the uplink. The untagged network on the FortiGate port must match the native network on the UniFi uplink port.
  4. Give devices a way to find the controller. If the controller is on another VLAN, push option 43 from the FortiGate or add a DNS name unifi, and allow TCP 8080 from the device VLAN to the controller.
  5. Trust the FortiGate in DHCP Guarding. Enter the FortiGate's interface IP as the trusted DHCP server on each network.
  6. Set the management VLAN last. Tag it on every upstream port first, then set Network Override on the switch.
  7. Turn on device detection and LLDP on the FortiGate LAN ports. The FortiGate then lists clients and the UniFi switch it plugs into.

Sources

Where this comes from.