OpenWrt client isolation misses the other band and wired ports
My guest network (its own VLAN and subnet) can talk to the internet but not my other networks. My IoT network for smart plugs and sensors can only talk to Home Assistant, my home automation server. The router’s firewall blocks the rest, but devices on the same subnet talk to each other directly through the access point (AP) or switch, and that traffic never reaches the firewall. A hacked smart plug could still scan the other devices on the IoT network and try to break into them. Client isolation is supposed to stop that.
I think that matters more now than it used to. Every IoT device and computer runs a mountain of software that updates constantly, from vendors with very different standards for vetting their dependency updates. Each update is a chance for a supply chain attack to ship malicious code, so I want each device to reach as little as possible.
If your IoT devices still share a network with your laptops and phones, start there. Most access points and routers can run a second network, often called a guest network, and moving IoT devices onto it keeps them away from everything else.
OpenWrt’s client isolation covered much less than I assumed. This is the usual setting on OpenWrt, the firmware my APs run:
# /etc/config/wireless
config wifi-iface 'guest_2g'
option device 'radio0' # the 2.4 GHz radio
option network 'guest'
option mode 'ap'
option ssid 'Guest'
option isolate '1'
LuCI, OpenWrt’s web UI, describes it as “Prevents client-to-client communication” (wireless.js). It only stops two clients on the same radio of the same AP from talking. A phone on the guest network’s 2.4 GHz band can still reach a laptop on its 5 GHz band, because each band is a separate Wi-Fi interface. Devices plugged into the AP’s wired ports aren’t covered either.
Bridge port isolation
Inside the AP, a Linux bridge connects each network’s Wi-Fi interfaces and wired ports, and it can mark any of them as isolated. An isolated port can only talk to ports that aren’t isolated (bridge(8)). Isolate every port clients use and leave the AP’s uplink to the router alone, and clients can reach the router but not each other.
For a wired port, set it in /etc/config/network, or from the port’s “Bridge port specific options” tab in LuCI:
# /etc/config/network
config device
option name 'lan3' # a wired port on the AP
option isolate '1'
service network reload applies it, and drops the AP’s ports for a few seconds. To try it first, echo 1 > /sys/class/net/lan3/brport/isolated sets the same flag until the next reboot, and it works on a wireless interface’s port too (named like phy0-ap0).
For Wi-Fi, set bridge_isolate on each band’s wifi-iface (“Isolate Bridge Port” in LuCI 25.12) and run wifi reload. It needs OpenWrt 23.05.3 or later. The “Bridge port specific options” tab has no effect on Wi-Fi interfaces (openwrt#14671).
# /etc/config/wireless
config wifi-iface 'guest_2g'
# ...
option isolate '1'
option bridge_isolate '1'
Keep both anyway. bridge_isolate alone also blocks two clients on the same radio, because OpenWrt already sends their traffic through the bridge for its multicast-to-unicast feature (netifd-wireless.sh). isolate '1' keeps that true if multicast-to-unicast is ever turned off, since the radio then forwards between its own clients without the bridge seeing it.
Isolating wired ports also depends on the AP’s switch chip, since not every chip’s driver supports it. My APs’ MediaTek chip supports it (mt7530.c), but I didn’t trust that until the test below showed the ports couldn’t reach each other. If you don’t know your AP’s chip, the test tells you.
A guest client on one AP can still reach a guest client on another AP, because that traffic arrives through the uplink, which isn’t isolated. The fix is the same flag one hop further out. My APs are daisy-chained, so I isolated each AP’s downlink port (the one feeding the next AP) and left every uplink alone. Clients still reach the router, and anything wired past it, but not each other. With APs on a switch instead, the switch ports facing the APs are the ones to isolate, as long as the switch supports it.
Testing isolation with the neighbor table
A failed ping proves nothing, because the other host’s firewall can drop ICMP, so read the neighbor (ARP) table instead. Run this against a target you know is up, from a machine that’s only on the network you’re testing. Put the two machines on ports you just isolated, and repeat it for each path you care about, like the other band, wired to Wi-Fi, and wired to wired.
sudo ip neigh flush to 192.0.2.20 # drop any entry cached before you enabled isolation
ping -c 3 192.0.2.20
sleep 10 # gives the new ARP attempt time to fail
ip neigh show 192.0.2.20
FAILED or INCOMPLETE means the ARP request never got an answer, so the bridge dropped it. A MAC address in REACHABLE or STALE means the two hosts met at layer 2 and only the ping was refused. On macOS the blocked case reads (incomplete) in arp -n 192.0.2.20, and on Windows the address is missing from arp -a. The flush is sudo arp -d 192.0.2.20 on macOS and arp -d 192.0.2.20 from an admin prompt on Windows.
Containers sharing a macvlan parent have the same problem one layer down, and macvlan private mode is the fix there.