Skip to content

Lesson 6 of 9 · 27m

Firewall Zones, DHCP, and Wireless Segmentation That Match the Design

Connect logical networks to firewall policy, DHCP scopes, DNS behavior, and multiple SSIDs without accidental cross-network access.

A VLAN is only a lane marking. It does not stop a driver from changing lanes. Isolation becomes real when firewall policy decides which networks can initiate connections where, and when DHCP, DNS, and wireless attachments behave consistently. Many homelabs fail politely: packets are beautifully tagged and then everything is allowed everywhere.

Zones are policy containers

OpenWrt groups interfaces into zones and controls input, output, and forwarding:

config zone
    option name 'iot'
    option input 'REJECT'
    option output 'ACCEPT'
    option forward 'REJECT'
    list network 'iot'

input is traffic destined for the router itself, such as DNS or administration. forward is traffic passing through the router. output is traffic the router generates. For IoT, you usually want DHCP and DNS but not administration, so add narrow exceptions instead of opening the router wholesale.

Forwarding is directional

Allowing trusted clients to reach IoT devices does not require letting IoT initiate back:

config forwarding
    option src 'trusted'
    option dest 'iot'

config forwarding
    option src 'iot'
    option dest 'wan'

Return traffic for established trusted-initiated connections is handled by connection tracking. A broad reverse forwarding rule is not required and usually destroys the point of segmentation.

DHCP and DNS make segmentation usable

Each logical network normally receives its own pool:

config dhcp 'iot'
    option interface 'iot'
    option start '100'
    option limit '100'
    option leasetime '12h'

Name important clients with static leases so firewall exceptions and logs remain meaningful; a printer might use AA:BB:CC:10:20:30 at 192.168.20.40.

Segmentation that depends on random dynamic addresses will decay within a month.

Multiple SSIDs map radios into policy

A separate SSID can attach to the IoT network by setting option network 'iot' on its config wifi-iface stanza.

Wireless client isolation prevents same-SSID layer-2 chatter, but it does not replace routed firewall policy.

Prove the negative

Testing that trusted clients can print is easy. The important test is that IoT cannot open router administration, scan trusted hosts, or bypass expected DNS policy. Test from a real client on the IoT network; tests from the trusted side inherit trusted privileges.

Field notes

  • Rule order matters; broad accepts placed early make precise later denies irrelevant.
  • NAT masquerading and access control are separate concerns.
  • Guest isolation on a radio and routed network isolation solve different problems.
  • Log dropped traffic temporarily while debugging, then reduce noisy logging before flash wear and log blindness set in.
  • Re-test after reboot; half-applied firewall state can look correct until the next reload.

Was this lesson helpful?

Sign in to rate