Skip to content

Lesson 3 of 9 · 25m

Network Segmentation and Remote Access Without Exposure

Separate IoT devices from trusted systems, preserve local discovery where needed, and use VPN-first remote access instead of exposing Home Assistant to the internet.

Most smart-home network diagrams look fine until the first cheap camera arrives with a mobile app, a cloud relay, a telnet service, and firmware last updated when the manufacturer still cared. Segmentation is how you enjoy local control without giving every light bulb a path to your laptop, NAS, and password manager. The goal is not a fortress. It is controlled blast radius.

Build zones around trust

A practical home network usually needs at least three zones:

trusted     laptops, phones, workstations
servers     Home Assistant, NAS, network services
iot         bulbs, plugs, cameras, thermostats, appliances
guest       visitors and untrusted temporary devices

The exact implementation can be VLANs, separate SSIDs, or firewall zones. What matters is policy. IoT devices should reach the services they need — often Home Assistant, NTP, DNS, and perhaps an update service — not everything on the LAN.

iot -> homeassistant tcp/8123       allow
iot -> nas                          deny
iot -> trusted clients              deny
iot -> internet                     allow or deny per device class
trusted -> iot management           allow as needed

mDNS and discovery complicate this because many devices expect flat networking. Use mDNS reflection only where required, and prefer direct integrations or static discovery configuration when available.

Give devices stable identities

Home automation becomes miserable when IP addresses drift. Use DHCP reservations rather than hardcoding guesses inside devices. Reserve addresses for hubs, cameras, printers, and any integration configured by IP.

homeassistant  192.168.20.10
zwave-js-ui    192.168.20.11
cameras        192.168.30.40-49
zigbee hub     USB attached, not network-exposed

A good naming standard saves hours. hallway-motion-sensor, kitchen-plug-dishwasher, and garage-door-contact remain meaningful after vendor apps are forgotten.

Remote access: VPN first

The safest default is not exposing Home Assistant at all. Run WireGuard on your router, firewall, or a small always-on host, then connect remotely as if you were home.

Example peer configuration shape:

[Interface]
PrivateKey = <client-private-key>
Address = 10.8.0.12/32
DNS = 192.168.1.1

[Peer]
PublicKey = <server-public-key>
AllowedIPs = 10.8.0.0/24, 192.168.0.0/16
Endpoint = vpn.example.org:51820
PersistentKeepalive = 25

AllowedIPs determines what traffic enters the tunnel. For a phone that only needs home access, route the home networks, not all internet traffic.

If you must expose a service, put a boundary in front

Some households use Home Assistant Cloud or a reverse proxy for simpler mobile access. If you expose the app directly, at minimum require HTTPS, strong authentication, MFA where supported, current updates, and strict reverse-proxy settings. Do not expose add-on administrative interfaces such as Zigbee2MQTT, Z-Wave JS UI, or file editors.

proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";

Home Assistant needs WebSocket forwarding configured correctly, but copying proxy snippets without understanding trust headers is how admin panels end up forums.

Watch outbound behavior too

Local-first does not mean devices stop talking. Cameras may probe vendor clouds, TVs may telemetry heavily, and voice devices are intentionally cloud-connected. DNS logs and firewall egress rules often reveal which devices are only pretending to be local. Put cloud-dependent convenience devices in the IoT zone even if they are physically inside the house.

Field notes

  • Do not put the only Home Assistant host on the IoT network unless firewall rules are designed very carefully.
  • Router-in-a-box consumer mesh systems often cannot express the policies described here; verify capabilities before redesigning everything.
  • Pairing and discovery often fail across VLANs even when control traffic would work; temporarily join devices on the right network or configure discovery explicitly.
  • Document which firewall rule is required for which integration. Otherwise the next network cleanup becomes an outage.

Was this lesson helpful?

Sign in to rate