To set up UniFi IoT VLAN isolation, create a virtual network in Settings > Networks (such as VLAN 30 on 192.168.30.0/24) and move it into a custom IoT firewall zone. Then bind a dedicated 2.4 GHz WPA2 SSID and Block All switch ports to it, add an Internal-to-IoT allow policy with return traffic, and scope the mDNS proxy to casting services.
These steps require a UniFi Cloud Gateway (such as a UDM Pro or UCG Ultra) or an independent UniFi Gateway. Ubiquiti’s zone-based firewall guide sets the minimum at UniFi Network 9.0 and gateway firmware 4.1. Older releases use legacy LAN IN rules under Settings > Security > Traffic & Firewall Rules > Advanced, as shown in HostiFi’s inter-VLAN guide.
Evidence and limits: This guide is compiled from Ubiquiti Help Center documentation for UniFi Network 9.0 through 9.4 (gateway firmware 4.1 or newer), IETF RFCs 6762 and 4541, and published UniFi walkthroughs, checked on November 25, 2026. The procedure has not been run in a test lab, and menu labels can shift across UniFi Network updates.
Why isn’t a new UniFi VLAN isolated already?
A new virtual network is not isolated because it lands in the built-in Internal zone by default, and Ubiquiti’s Zone Matrix sets Internal to Internal as Allow All. Until you change that, a smart plug on VLAN 30 can open connections to a NAS on VLAN 1. The VLAN separates broadcast domains; the firewall decides who talks to whom.
Network Isolation is a one-click toggle that generates inter-VLAN block rules, which suits a guest segment where nothing needs inbound access. IoT usually needs exceptions, so use a custom zone instead. Per WunderTech’s zone matrix walkthrough, a new custom zone defaults to Block All toward Internal, VPN, Hotspot, DMZ, and itself, and Allow All toward External and Gateway. That default Gateway access includes DHCP, DNS, and management traffic over HTTPS and SSH. (Ubiquiti zone guide)
Use one isolation method per network. In the custom-zone example below, Policy 2 blocks gateway management ports, and Policy 4 allows SMB from the listed printer to the NAS.
Create the IoT virtual network
Plan addressing first. A /24 per segment is plenty for a home network, and matching the third octet to the VLAN ID keeps packet logs readable.
| VLAN | Name | CIDR | Gateway | DHCP range | Zone | Policy |
|---|---|---|---|---|---|---|
| 1 | Default | 192.168.1.0/24 | 192.168.1.1 | .100–.254 | Internal | Trusted, reaches IoT |
| 30 | IoT | 192.168.30.0/24 | 192.168.30.1 | .100–.250 | IoT | Internet, DHCP, and DNS. Gateway management ports blocked. Replies to Internal and printer-to-NAS SMB allowed. |
| 31 | IoT-Local | 192.168.31.0/24 | 192.168.31.1 | .100–.250 | IoT-Local | DHCP, DNS, no internet |
VLAN 31 is optional: it holds local-only gear such as cameras recording to a local NVR or devices driven entirely by Home Assistant.
In Settings > Networks, click New Virtual Network:
- Enter
IoTas the Network Name. - Deselect Auto-Scale Network and set Host Address to
192.168.30.1(using a/24subnet range). - Set Advanced Configuration to Manual and set VLAN ID to
30. - Set the DHCP range to
192.168.30.100–192.168.30.250, leaving low addresses for fixed IPs. - Leave Network Isolation off; the custom zone handles inter-VLAN blocking.
- Click Apply Changes.
That sequence follows LazyAdmin’s UniFi VLAN guide. Ubiquiti’s virtual network article adds the detail people often miss: “By default, VLANs created on UniFi Gateways do not automatically assign devices to VLANs.” You assign clients afterward through a Wi-Fi SSID or switch port.
Using a third-party gateway instead? Create the subnet, VLAN ID, and DHCP settings on that gateway first, then add the network in UniFi under Settings > Networks with Router set to Third-party Gateway and the same VLAN ID. Manage inter-VLAN routing and firewall rules on that third-party gateway, as Ubiquiti’s virtual network guide explains.
Move the network into a custom IoT zone
Open the Zones screen: Settings > Zones (or Settings > Policy Table for the flat list) in UniFi Network 9.4, or Settings > Policy Engine > Zones in Network 9.3, per Ubiquiti’s Zone-Based Firewalls guide. (HostiFi’s zone-based walkthrough shows the firewall menu under Settings > Security > Firewall.) Select Create Zone, enter IoT as the Zone Name, add the IoT network under Networks / Interfaces, and save, following WunderTech.
Each network belongs to a single zone (up to 30 zones total), and deleting a custom zone also deletes every firewall policy attached to it. Check the Zone Matrix after saving rather than assuming defaults: the IoT row should show Block All toward Internal (as well as VPN, Hotspot, DMZ, and itself) and Allow All toward External and Gateway. Repeat these steps for IoT-Local if you built VLAN 31.
Add exception policies in apply order
Policies evaluate top to bottom and the first match wins, per WunderTech. Custom policies sit above locked built-in policies, which cannot be edited or removed but can be overridden from above (Ubiquiti Zone-Based Firewalls). Create the policies below, then click each zone pair in the matrix and use Reorder to confirm the sequence:
| # | Source | Destination | Port | Action |
|---|---|---|---|---|
| 1 | Internal (Default) | IoT | Any | Allow, Auto Allow Return Traffic on |
| 2 | IoT | Gateway | List (22, 80, 443) | Block |
| 3 | IoT-Local | External | Any | Block |
| 4 | IoT 192.168.30.40 (printer) | Internal 192.168.1.10 (NAS) | Specific (NAS SMB port number) | Allow |
Policy 1 lets your phone control an IoT device while the device can only reply. Policy 2 follows WunderTech’s gateway-lockdown method: set destination Port to List with ports 22, 80, and 443 to block SSH and web management access without blocking everything else. If you created IoT-Local, add a separate IoT-Local → Gateway policy with the same port list and Block action. Ubiquiti warns that blocking Gateway zone traffic outright may disrupt DHCP and DNS. Policy 4 follows WunderTech’s narrow-exception template for IoT-initiated traffic. Match the printer and NAS by IP, set the destination Port to Specific, and enter the NAS’s SMB port number.
Shadowing risks to watch:
- A broad allow above a narrow block wins. An “IoT to Internal, Any” policy added while debugging shadows everything below it; disable or delete it when finished.
- Auto Allow Return Traffic already creates the reply policy. Adding a separate IoT-to-Internal allow “for replies” also permits new connections from IoT into Internal.
Put devices on the IoT VLAN
Wi-Fi. In Settings > WiFi, create a dedicated SSID mapped to the IoT network and enable IoT under WiFi Optimization. Per Ubiquiti’s Wi-Fi troubleshooting guide, use WPA2 rather than WPA3 on 2.4 GHz and keep PMF off (it cannot be disabled on WPA2/3 or WPA3). Set Fast Roaming (802.11r) to Off and ensure signal strength is better than -70 dBm. Limit the SSID to 2.4 GHz if devices fail to connect. On U7 access points, update AP firmware first, then fall back to a 2.4 GHz-only WPA2 SSID.
Wired. In the Ports tab, select the switch port, set Native VLAN / Network to IoT, and set Tagged VLAN Management to Block All, which creates an access port in Ubiquiti’s trunk and access port guide. Switch uplinks and AP ports stay Allow All, or Custom with VLAN 30 included. Never set an AP port’s Native VLAN to a network that AP broadcasts (VLAN 1 excepted), or clients will fail to join. If a device gets no lease, trace the path back to the gateway with VLAN Viewer, as Ubiquiti’s VLAN troubleshooting guide describes.
Keep APs and switches managed on Default. Moving UniFi infrastructure onto another VLAN with Network Override can take devices offline if switch tagging mismatches; the adoption failed guide covers recovery. Adding a PoE switch for wired IoT gear? Size it with the PoE budget and switch planning guide.
Restore discovery with the mDNS proxy
AirPlay, Chromecast, and AirPrint rely on mDNS: UDP port 5353 to 224.0.0.251 or FF02::FB, for .local. names that RFC 6762, “Multicast DNS” defines as link-local. Queriers must only accept responses originating on the local link, so a phone on VLAN 1 never sees a receiver on VLAN 30 without a proxy.
The UniFi gateway mDNS proxy offers three modes: Auto retransmits common services across all VLANs, Off stops retransmission, and Custom lets you choose the VLAN Scope and services, including custom entries in _service._protocol.local format such as _airplay._tcp.local. Ubiquiti enables mDNS proxy automatically on newly created networks, so review what is already reflected. Use Custom, scoped to Default and IoT, with only the services you cast to. Watch the per-model cap on mDNS-enabled networks: 2 on the Express and UXG Lite, 30 on the UDM and UDR, and 50 on the UDM Pro and UCG Ultra.
The proxy forwards discovery traffic. Policy 1 covers connections initiated from Internal to IoT and their replies. AirPlay or screen mirroring may require the receiver to initiate a separate connection. If it does, use Policy 4 as a template and scope the rule to the receiver, its destination, and the required service. (Ubiquiti firewall guide)
IGMP snooping is rarely the reason IPv4 mDNS fails. RFC 4541 (an informational set of snooping switch recommendations) states that non-IGMP packets addressed to IPv4 224.0.0.X must be forwarded on all ports, so toggling IGMP snooping should not block IPv4 mDNS discovery. On the IoT SSID, Ubiquiti’s Wi-Fi guidance recommends setting Multicast Enhancement and Multicast and Broadcast Control to Off.
Test it before you call it done
Verify the isolation and casting path inside UniFi Network before moving all your smart home gear over:
| What to verify | Where to check | Expected result |
|---|---|---|
| Zone Matrix and firewall policies | Settings > Zones (9.4) or Settings > Policy Engine > Zones (9.3) (Ubiquiti, WunderTech) | After saving Policy 1 and before adding the SMB exception, IoT → Internal changes from Block All to Allow Return. After adding the remaining policies, open IoT → Internal to confirm the return rule and the printer-to-NAS SMB allow. Open IoT → Gateway to confirm the management-port block. |
| Client VLAN lease and Wi-Fi signal | Read the assigned IP address on the test device. Check signal separately in Client Devices in UniFi Network or the WiFiman Mobile App (Ubiquiti). | A test device on the IoT SSID or wired access port gets a 192.168.30.x address. Wi-Fi clients show signal strength better than -70 dBm. |
| Switch port tagging (if no lease) | VLAN Viewer in the Ports tab (Ubiquiti) | Every upstream switch port along the path to the gateway tags VLAN 30, and no AP uplink port uses VLAN 30 as its Primary (Native) Network. |
| Blocked gateway UI and Internal hosts | Before testing, check Flow Logging for the matching policies on the Zones page and enable it on the custom gateway block if needed. Then use an IoT test device to open fresh connections to the gateway web UI and to a known reachable Internal service outside the SMB exception. Check the matching policies’ hit counters on Zones (Ubiquiti). | Both new connections are blocked. Flows shows the policy name for each logged block. For a locked built-in block, check Flows only if logging was already active when you tested. Internet remains reachable from IoT and is blocked from IoT-Local if you added Policy 3. |
| Cross-VLAN casting | On a phone on Default, check the cast menu for an AirPlay or Chromecast receiver on IoT. Then start playback (Ubiquiti firewall guide, mDNS proxy guide). | The receiver should appear in the menu, and media should play on it. If AirPlay or screen mirroring stalls after discovery, verify Flow Logging on the matching policy before retrying playback. Enable it first if the policy is editable and logging is off. For a locked built-in block, use Flows only if logging was already active during the attempt. Look for a logged block on a new connection from the receiver to Default. |
If an IoT client loses internet right after you add Policy 2, check the Gateway zone policy first: WunderTech notes that blocked DNS looks identical to a dead internet connection.
FAQ
Do I need a separate SSID for IoT devices on UniFi?
Not always, but a dedicated SSID is the simplest route because it lets you run 2.4 GHz-only WPA2 with Fast Roaming off without changing your main Wi-Fi network (Ubiquiti Wi-Fi guidance). To avoid another SSID, Ubiquiti’s virtual network guide offers PPSK (Per-Password VLAN), which assigns the VLAN by password but is unavailable on 6 GHz networks. Virtual Network Override assigns a VLAN by MAC address at the gateway level instead.
Should IoT devices have internet access?
Many need it, because cloud-dependent plugs, speakers, and thermostats stop responding without their vendor’s servers, so keep the IoT zone’s default Allow All toward External. Put local-only gear, such as cameras recording to a local NVR or devices driven entirely by Home Assistant, in a second custom zone with a Block policy toward External (WunderTech).
Why can’t I see my Chromecast on another VLAN in UniFi?
Discovery relies on mDNS, link-local multicast on UDP port 5353 that RFC 6762 scopes to the local link, so it does not cross VLANs on its own. Set the UniFi gateway’s mDNS proxy to Custom, add both the phone’s network and the IoT network to its VLAN Scope, and select Chromecast from the built-in services. If a service is not built in, add it using Ubiquiti’s _service._protocol.local format (for example, _airplay._tcp.local). First check that Chromecast appears in the cast menu, then start playback. For playback initiated by the phone, Policy 1 shows how to allow the connection from Internal to IoT. Use Auto Allow Return Traffic if another policy does not already allow replies. (Ubiquiti firewall guide)
Is Network Isolation the same as Client Device Isolation in UniFi?
No. Per Ubiquiti’s isolation guide, Network Isolation is a per-network gateway setting that generates firewall rules blocking traffic between VLANs. Client Device Isolation is a Wi-Fi setting that stops clients on the same access point from reaching each other, and Device Isolation (ACL) restricts same-VLAN traffic on switches. Devices sharing one VLAN never pass through the gateway firewall at all.