Zone-based firewalling arrived in UniFi Network 9.0 and needs a gateway on version 4.1 or newer. Networks are grouped into zones, and policies govern traffic between zones rather than between individual VLANs.
One default matters more than the rest. In Ubiquiti's zone matrix, traffic from the Internal zone to the Internal zone is Allow All.
In other words, an IoT VLAN left in the Internal zone is a separate subnet with no firewall isolation by default, however tidy it looks in the network list.
Which policies does this layout need? Two, placed above UniFi's built-in rules, plus one path to keep open. First, allow the trusted zone to reach the IoT zone, with return traffic. Next, block new connections the other way. Finally, confirm the IoT zone still reaches the gateway for DHCP and DNS.
The fix is a custom zone. Ubiquiti allows up to 30 zones, a network can belong to only one, and a policy you create takes precedence over the built-in ones.
Here is the sequence that fits this layout:
- Create an IoT zone and move the IoT network into it, out of Internal.
- Allow Internal to IoT with Auto Allow Return Traffic switched on, so trusted clients can open Home Assistant and reach casting targets. Narrow the destination to Home Assistant's address and web port only if nobody on the trusted side casts to IoT devices.
- Block IoT to Internal with the connection state set to New. That stops connections the IoT side starts without catching the replies that step 2 allows.
- Keep IoT to Gateway open. Ubiquiti warns that blocking the Gateway zone can disrupt DHCP and DNS, so read the new zone's row in the zone matrix and confirm the gateway is allowed. Home Assistant's UniFi Network integration also talks to the console, on port 443 by default.
- Decide IoT to External deliberately. Most devices need the internet for firmware and cloud features, and Chromecasts expect to reach Google's DNS servers directly.
Order matters within your own policies, so place specific allows above broader blocks. Ubiquiti's guidance says the same: create the allow for the traffic you need before the block that denies everything else.
Note that zone policies apply in both directions, so a flow blocked one way stays blocked even if the reverse is allowed.
Of course, Home Assistant itself sometimes needs the trusted side, too. A NAS that receives its backups or a media server it controls each needs a narrow allow.
Point each allow from Home Assistant's address to that host and port, and place it above the block in step 3.
Use Home Assistant's web port in step 2. It is shown under Settings › System › Network: existing installations keep the port they had, usually 8123, while new Home Assistant OS installations since the 2026.8 release use port 80.
Finally, skip the one-click alternative for this network. Ubiquiti describes Network Isolation as automatically configuring "the necessary firewall rules to block inter-VLAN traffic", which is blunt when one host on the IoT side must stay reachable.
For a guest network, where nothing should be reachable, Network Isolation fits well, and the guest network guide covers that case.