LW IT Solutions logo LW IT Solutions logo LW IT Solutions
« Blog Overview /Smart Home / WireGuard & Tailscale DMZ: Secure External Access...
Read this article in other languages:

WireGuard & Tailscale DMZ: Secure External Access to Home Assistant and Self-Hosted Servers

Part 5 of 6 in the series Home Assistant without the cloud

WireGuard & Tailscale DMZ: Secure External Access to Home Assistant and Self-Hosted Servers
Contents
  1. 1. The Security Risks of NAT Port Forwarding and Reverse Proxies
  2. 2. Point-to-Point VPNs: WireGuard vs. Tailscale
  3. 3. DMZ Architecture and Restricted Access Rules
  4. Questions and answers
  5. Sources

Traditional remote access architectures for home automation platforms like Home Assistant and self-hosted servers have long relied on exposing ports 80 and 443 to the public internet via NAT port forwarding. However, public-facing endpoints attract continuous automated vulnerability scanners, brute-force attacks, and zero-day exploitation attempts against reverse proxies and web applications. Modern network design removes the publicly exposed web ports by transitioning to encrypted point-to-point VPN tunnels using WireGuard or Tailscale.

1. The Security Risks of NAT Port Forwarding and Reverse Proxies

Opening external firewall ports lets untrusted internet traffic reach the local network perimeter. Automated SSL certificate renewal and reverse proxy authentication still leave several structural vulnerabilities:

  • Automated Scanning & Exploitation: Public IPv4 addresses are scanned continuously. Unpatched CVEs in web servers, authentication daemons, or IoT dashboards can lead to immediate compromise without prior authentication.
  • Credential Brute-Forcing: Login interfaces exposed via port 443 remain accessible to automated dictionary attacks from global botnets.
  • DDoS & Bandwidth Saturation: Public endpoints lack native protection against application-layer denial-of-service floods, which can degrade residential internet connectivity.
Three columns from left to right: open ports 80/443 with the risks scanning, brute-forcing and DDoS; WireGuard and Tailscale as point-to-point tunnels instead; the tunnel endpoint in a DMZ or VLAN with granular firewall policies such as TCP 8123 for Home Assistant, ACLs and no WAN ingress.
How remote access moves from NAT port forwarding to a WireGuard or Tailscale tunnel whose endpoint sits in a restricted DMZ.

2. Point-to-Point VPNs: WireGuard vs. Tailscale

Replacing traditional inbound NAT rules with encrypted overlay networks enforces a Zero-Trust approach. Remote access requires cryptographic key exchange before any application-layer data is transmitted.

WireGuard (Kernel-Space Raw Performance)

WireGuard operates as a lightweight, kernel-space VPN protocol utilizing state-of-the-art cryptography (ChaCha20, Curve25519, BLAKE2s). Its primary architectural advantage is stealth: a WireGuard interface drops all unauthenticated packets silently without responding, making the host invisible to network scanners. It requires a single UDP port to be reachable or benefits from direct integration into perimeter routers.

Tailscale (Zero-Config Mesh Overlay with DERP Relays)

Tailscale builds a mesh overlay network (Tailnet) on top of the WireGuard protocol without requiring any open firewall ports or static public IPs. Utilizing advanced NAT traversal techniques (STUN/ICE) and encrypted DERP relay servers as fallbacks, Tailscale connects devices point-to-point regardless of Carrier-Grade NAT (CGNAT) restrictions or dynamic residential IP changes.

3. DMZ Architecture and Restricted Access Rules

Establishing an encrypted VPN tunnel should not grant remote devices unrestricted access to every internal LAN subnet. Proper network hygiene requires deploying the VPN termination endpoint inside a restricted DMZ or VLAN:

  • Granular Firewall Policies: Ingress traffic from the VPN subnet must be restricted strictly to the IP addresses and port numbers of the target services (e.g., TCP port 8123 for Home Assistant).
  • Access Control Lists (ACLs): In Tailscale deployments, server-side ACL rules ensure that specific identities or devices can only communicate with designated servers, preventing lateral movement across the network.
  • WAN Ingress Prohibition: All inbound NAT forwarding rules for web services on the edge router can be permanently deleted. With Tailscale, no inbound forwarding remains; a self-hosted WireGuard endpoint keeps a single forwarded UDP port, which does not respond to unauthenticated packets.

Questions and answers

Why do internal hostnames not resolve through a WireGuard or Tailscale tunnel while addresses work?

This is expected: DNS is a separate step that many guides skip. The tunnel carries packets; it says nothing about which resolver the client should ask, so the phone keeps using the one from the coffee shop’s network, which has never heard of those internal names.

There are two ways to fix it, depending on the tool. A plain WireGuard configuration can name a DNS server in its interface section, pointing at the internal resolver; the resolver then has to be reachable through the tunnel, and the restricted policy for the VPN subnet has to allow port 53 to it. A mesh service can do the same more selectively, resolving one internal domain through the internal resolver and leaving everything else alone, which is the better behavior on a phone that switches networks all day.

Worth deciding deliberately at the same time is whether all traffic should go through the tunnel or only the internal routes. Routing everything is useful on an untrusted network and costs bandwidth, battery and the local geography of every service the phone talks to. Routing only what belongs at home is the quieter default, and it is the one that keeps the tunnel switched on rather than being turned off when it gets in the way.

Home Assistant without the cloud

  1. Zigbee2MQTT vs. ZHA: Building a Highly Reliable Mesh Network in Home Assistant
  2. ESPHome and ESP32 in Practice: Building Cloud-Free Environmental Sensors
  3. Presence Detection 2.0: mmWave Radars (LD2410/LD2450) in Lighting Automation
  4. Local Voice Control in Home Assistant with Whisper & Piper
  5. WireGuard & Tailscale DMZ: Secure External Access to Home Assistant and Self-Hosted Servers
  6. Local Energy Management: Integrating PV Inverters and Battery Storage via Modbus TCP
Lukas Wojcik

Lukas Wojcik

Systems architect and technology enthusiast specializing in scalable tracking solutions, GMP Stack (GA4 & GTM), and robust backend architectures. Advocate for clean code and privacy-first design.

Get in touch

A question or an idea for a web project? Tell me a little about it. This form uses reCAPTCHA to protect against spam.

Write a comment

Experience with other devices or integrations and questions about the setup are welcome here.

The email address is not published. Required fields are marked with an asterisk.