Kernaali Tools
UniFi

Ubiquiti UniFi Firewall Zones & Inter-VLAN Policy

Plan source-to-destination zone rules, preserve gateway services and verify guest or IoT restrictions without relying on old menu names.

Check which firewall your site uses

Current UniFi documentation describes zone-based firewalling, introduced in Network 9.0.108, with a supported UniFi gateway. Older deployments may still use the previous rule architecture. Inspect the active policy model before following a guide: “LAN IN” and “WAN LOCAL” are not names to transplant into a zone matrix.

Zones group interfaces or networks by policy. External covers WAN-facing/untrusted traffic; Internal commonly contains trusted networks; Gateway represents traffic to or from the router itself. VPN, Hotspot and DMZ cover other roles. A network belongs to one zone; simply naming a VLAN “IoT” does not assign a restrictive policy.

Read a zone pair in both directions

The source zone is where a flow starts; the destination zone is where it goes. Trusted-to-IoT permission and IoT-to-Trusted permission are different decisions. A reply should be accepted by connection state without granting IoT permission to start arbitrary new sessions.

Policy in an original exampleScopeWhy
Allow Trusted → IoT serviceAdmin PC 10.42.10.25 to 10.42.30.20 TCP 443Only the controller service needed
Allow return trafficEstablished/related reply pathAllows replies without a reverse new-session permit
Block IoT → TrustedRemaining new trafficStops device-initiated LAN access
Block Guest → local zonesRequired local destinations including IoTGuest should not inherit device control
Restrict Guest/IoT → GatewayPreserve DHCP/DNS; block managementProtects router services separately

Order exceptions before broad blocks

Create and test the specific allow first, then put the broader block below it. Inspect both custom and built-in rules and use the actual ordered policy table. UniFi can create extra policies for port forwarding or VPN features, so revisit effective rules after enabling those features.

Auto Allow Return Traffic can supply a return policy when it is needed. Confirm that it matches the intended stateful reply behavior and does not conflict with an earlier rule. Networks grouped in one Internal zone may communicate under a permissive Internal-to-Internal policy: use a dedicated IoT zone or carefully scoped rules within that zone.

Protect management without losing infrastructure

Keep local recovery access. Before blocking traffic to Gateway, permit the administration source and required DHCP/DNS traffic. Test a second management session from the intended network; a currently established session can conceal a missing permit.

A rule blocking IoT-to-Trusted does not automatically block IoT access to the router’s own UI. Gateway is a separate destination. IPv4-only rules do not protect parallel IPv6 paths; choose the intended IP families and retain required IPv6 control traffic.

Test what the rule is meant to stop

Use a fresh connection from a real source in each network. Confirm a trusted controller reaches the selected IoT port, that another port remains blocked, and that IoT cannot initiate a new session to the controller. Check logs or counters where exposed. Same-VLAN traffic may never reach the gateway, so use AP/switch isolation for that requirement.

These guides use the current UniFi Network concepts. Menu wording and location vary by release; check the policy’s actual scope and result. Kernaali Tools is not affiliated with Ubiquiti.

Technical references

Found an issue? Send a correction with a reproducible example.