👍 What we like
- Connected devices can no longer see PCs, the NAS or phones.
- Internet access is set per VLAN or per device: cameras can be cut off from it.
- Zigbee and Z-Wave are not affected: only the coordinator, or the machine that hosts it, needs placing.
👎 What to watch
- The whole chain must handle 802.1Q: router, managed switch, access point.
- Automatic discovery (mDNS) does not cross VLANs without a relay.
- A short outage during the switchover, and a misplaced rule can cancel the isolation.
📑 Contents ▾
To isolate home automation in a VLAN, three devices have to understand the 802.1Q standard: the router or firewall, which routes between VLANs and enforces the rules; a managed switch for wired devices; and a Wi-Fi access point that can map each wireless network (SSID) to a VLAN. An unmanaged switch cannot do VLANs. And it is not the VLAN that protects you, it is the filtering rules written between VLANs: depending on the router, traffic between VLANs is allowed or blocked by default, so check yours before assuming you are isolated.
What a VLAN changes for connected devices
A VLAN tags network frames (IEEE 802.1Q) so they are only delivered to devices on the same segment. For a Wi-Fi plug, a camera or a TV placed in an “IoT” VLAN, three things change:
- they no longer see PCs, the NAS or phones: broadcasts and discovery announcements stay within their segment;
- to reach another segment, their traffic has to go through the router, which allows or refuses it;
- you can cut off their internet access, device by device or for the whole VLAN.
The second point is the one that matters: a compromised or badly designed device can no longer probe the rest of the network. The VLAN does not fix its flaws, though. Firmware updates and changed passwords are still needed.
Home automation protocols that do not use IP, Zigbee and Z-Wave, are not affected: the sensors talk over radio to a coordinator, most often a USB one, plugged into the Home Assistant machine (see our tutorial Zigbee2MQTT with Home Assistant). Only the machine that hosts the coordinator (or the coordinator itself if it is networked) needs a place in the network layout.
Matter devices are placed according to how they connect. Over Wi-Fi or Ethernet, they are IP devices like any other: they go on the IoT VLAN. They are found through mDNS discovery, so they face the same constraint as Chromecast or AirPlay (see “What breaks when you isolate devices” below), and Home Assistant must be able to reach them. Over Thread, they talk over radio to a Thread border router, which itself sits on the IP network. Our comparison of Zigbee and Thread dongles for Home Assistant covers both cases.
A simple layout for a home
There is no point multiplying segments. Three or four are enough for most households. The numbers below are examples, chosen freely:
| VLAN (example) | What goes in it | What it can reach |
|---|---|---|
| 10 – main | PCs, phones, NAS, Home Assistant | the whole network and the internet |
| 20 – IoT | Wi-Fi plugs and bulbs, TV, speakers, robot vacuum | the internet if the device needs it, nothing on the main VLAN |
| 30 – cameras | IP cameras | only the recorder, no internet |
| 40 – guests | visitors’ phones | the internet only |
For Home Assistant, two placements make sense. On the main VLAN, it queries the devices on the IoT VLAN: the main VLAN may reach IoT, not the other way round. On the IoT VLAN, it sits right next to the devices, and you open its web interface from the main VLAN. The first is easier to reason about: the best-protected machine stays on the right side.
The firewall rules that do the isolating
On the IoT VLAN interface, rules are read in order, and on OPNsense or pfSense the first rule that matches is the one applied. A rule set that works:
- Allow DHCP and DNS to the router.
- Block all other traffic to the router itself, using the “This Firewall” destination in OPNsense or pfSense, which covers all of its addresses, WAN included. The admin interface must stay out of the devices’ reach, including through the WAN address when that address is public (ISP box in bridge mode): without this rule, the internet rule would let it through.
- Allow only the flows you need to Home Assistant, for example devices publishing to an MQTT broker installed on the same machine.
- Block everything else to private networks: main VLAN, cameras, guests.
- Allow the internet, or block it for devices that do not need it.
On the main VLAN, a rule allowing outbound traffic to the other VLANs is enough. If the main network is the original LAN interface, OPNsense and pfSense have one by default; if it is a VLAN created for the occasion, add it, because an interface with no rules blocks everything. The firewall tracks connection state, so the devices’ replies to Home Assistant’s requests come back without any extra rule on the IoT VLAN. The camera VLAN is handled like the IoT VLAN, with internet blocked as the last rule.
Once the rules are in place, test from a device on the IoT VLAN: the NAS must not answer, the internet must. Our tutorial configuring VLANs on a managed switch walks through the whole setup with OPNsense and a UniFi switch: creating the VLANs, DHCP, filtering rules, access and trunk ports, then a test from a client.
What breaks when you isolate devices
- Automatic discovery. Chromecast, AirPlay, HomeKit and many Home Assistant integrations find devices through mDNS, announcements that do not cross a router. Phone on the main VLAN, TV on IoT: casting can no longer find the screen. Two ways out: an mDNS relay on the router (the os-mdns-repeater plugin on OPNsense, the Avahi package on pfSense, the mDNS option in UniFi Network), or keep media devices on the main VLAN and reserve the IoT VLAN for devices that never need to be discovered.
- Initial pairing. Many manufacturers’ apps want the phone and the device on the same network during setup. The simplest fix: connect the phone to the IoT SSID for the time it takes to pair.
- The Wi-Fi band. Many cheap devices only know 2.4 GHz: the IoT SSID has to broadcast on that band.
- Local integrations. Home Assistant must be able to reach every device. If a device disappears after the switchover, look first at the rule that lets Home Assistant reach the IoT VLAN.
The hardware: what each link in the chain must be able to do
The router or firewall
It creates the VLANs, hands out addresses (DHCP) in each one and enforces the rules. Several families fit:
- A mini PC running OPNsense or pfSense, the most flexible option. The Protectli Vault VP2420 is a mini PC of that kind: fanless, 4 x 2.5G Intel I226-V ports, 24 W at most according to Protectli’s spec sheet. Check the supported operating systems on Protectli’s website before buying. See the Protectli Vault VP2420.
- A UniFi gateway. The UniFi Cloud Gateway Ultra has 1 x 2.5 GbE WAN port and 4 x 1 GbE ports, is rated for IDS/IPS inspection up to 1 Gbps and is powered over USB-C. VLANs are declared as networks in UniFi Network. See the UCG-Ultra.
- A dedicated firewall such as the Firewalla Gold SE. Its spec sheet lists an unlimited number of VLANs, 2 x 2.5 Gbit and 2 x 1 Gbit ports, and 350 Mbps over WireGuard VPN. See the Firewalla Gold SE.
- The Ubiquiti EdgeRouter X, an affordable wired router with five Gigabit ports that handles 802.1Q VLANs from its web interface. It has no built-in Wi-Fi, so it needs a separate access point. See the EdgeRouter X.
The switch
A managed switch assigns each port to a VLAN (access port, untagged frames) and carries several tagged VLANs on the link to the router or the access point (trunk port). An unmanaged switch forwards frames without knowing anything about VLANs: it only works behind an access port, where all the devices plugged into it end up on the same VLAN.
- MikroTik CRS310-8G+2S+IN: 8 x 2.5 GbE ports; 34 W at most according to MikroTik’s spec sheet, 21 W without accessories. See the CRS310-8G+2S+IN.
- Zyxel XGS1210-12: a web-managed switch with 8 Gigabit ports, 2 x 2.5G ports and 2 x 10G SFP+ cages in a metal case, according to Zyxel’s spec sheet. It therefore has only two 2.5G ports, against eight on the 8 x 2.5 GbE switches in this list. The spec sheet lists VLAN support: check the configuration details there. See the XGS1210-12.
- Ubiquiti UniFi Switch Flex 2.5G 8: 8 x 2.5 GbE ports managed from UniFi Network, the switch used as the example in our VLAN tutorial. See the USW-Flex-2.5G-8.
- Cisco SG300-52: an enterprise L2/3 managed switch with 802.1Q VLANs and QoS options. It is oversized for a home and belongs to an old range: check on Cisco’s website that the model still receives firmware updates. See the Cisco SG300-52.
- TP-Link TL-SG1024P: a budget Gigabit switch. Before relying on it to isolate your devices, check TP-Link’s spec sheet to confirm that it lets you configure 802.1Q VLANs: the TL-SG1024 in the same range is unmanaged.
Our comparison of the best managed switch for a homelab covers more models, from a first budget VLAN switch to 10G.
The Wi-Fi access point
Most home automation devices use Wi-Fi. You need an access point that maps each SSID to a VLAN and accepts the trunk from the switch. An ISP box’s “guest network” is not a VLAN you control: you choose neither its rules nor what it can reach. Our comparison of Wi-Fi 7 access points for a homelab reviews controller-managed access points with wireless networks mapped to VLANs.
| Device | Role | Stated specifications |
|---|---|---|
| Ubiquiti EdgeRouter X | router | five Gigabit ports, 802.1Q VLANs, no Wi-Fi |
| UniFi Cloud Gateway Ultra | gateway | 1 x 2.5 GbE WAN, 4 x 1 GbE ports, IDS/IPS up to 1 Gbps |
| Firewalla Gold SE | firewall | unlimited VLANs, 2 x 2.5 Gbit + 2 x 1 Gbit, WireGuard 350 Mbps |
| Protectli Vault VP2420 | mini PC router | 4 x 2.5G Intel I226-V, fanless, 24 W maximum |
| MikroTik CRS310-8G+2S+IN | switch | 8 x 2.5 GbE, 34 W maximum |
| Zyxel XGS1210-12 | switch | 8 x 1G, 2 x 2.5G, 2 x 10G SFP+, metal case, web-managed, VLANs |
| UniFi Switch Flex 2.5G 8 | switch | 8 x 2.5 GbE, managed by UniFi Network |
| Cisco SG300-52 | switch | L2/3 managed, 802.1Q VLANs, QoS |
| TP-Link TL-SG1024P | switch | Gigabit; 802.1Q VLANs to be confirmed on the spec sheet |
Based on manufacturer spec sheets collected in October 2026 for the UniFi gateway, the Firewalla, the Protectli, the MikroTik, the Zyxel and the UniFi switch. No spec sheet collected for the EdgeRouter X, the Cisco SG300-52 and the TP-Link TL-SG1024P: confirm their specifications on the manufacturer’s website before buying.
The limits of a home automation VLAN
- A VLAN does not make a device safe. It limits what a compromised device can reach, not what it sends to the internet if you let it out.
- A configuration mistake can expose what you meant to protect: a port left on the wrong VLAN, an “allow all” rule placed above the block.
- The switchover cuts the network for a while. Plan the layout on paper and keep an admin port on the default VLAN so you do not lose access to the switch halfway through.
- Every link in the chain has to follow. An unmanaged switch or an ISP box in the middle of the chain puts everything plugged in behind it on a single VLAN.
For the rest of the hardware for a home network, our Recommended hardware page lists the references we follow on the site.
Key facts
Our picks
Affiliate links · same price for youUbiquiti EdgeRouter X
- Five wired Gigabit ports
- 802.1Q VLANs, web interface
Amazon · price and availability on the listing
Ubiquiti UniFi Cloud Gateway Ultra (UCG-Ultra)
- 1 x 2.5 GbE WAN port, 4 x 1 GbE ports
- IDS/IPS up to 1 Gbps (Ubiquiti spec sheet)
Amazon · price and availability on the listing
Firewalla Gold SE
- Unlimited VLANs according to Firewalla's spec sheet
- 2 x 2.5 Gbit + 2 x 1 Gbit ports
Amazon · price and availability on the listing
Protectli Vault VP2420
- 4 x 2.5G Intel I226-V ports
- Fanless, 24 W maximum
Amazon · price and availability on the listing
MikroTik CRS310-8G+2S+IN
- 8 x 2.5 GbE ports (MikroTik spec sheet)
- 34 W maximum (21 W without accessories)
Amazon · price and availability on the listing
Zyxel XGS1210-12
- 2.5G and 10G SFP+ ports, metal case (Zyxel spec sheet)
- Port count per speed and VLANs: check the spec sheet
Amazon · price and availability on the listing
Cisco SG300-52 Managed L2/3 Switch
- 802.1Q VLANs and QoS
- Check that Cisco still ships firmware updates
Amazon · price and availability on the listing
TP-Link TL-SG1024P Switch Gigabit
- Budget Gigabit switch
- The TL-SG1024 in the same range is unmanaged
Amazon · price and availability on the listing
See all our recommended gear in the shop.