How the home network is guarded
One firewall, four layers and one place to watch. The map of how DNS, IDS, DPI and VPN work together.
Over a few evenings my home network got three new things: forced DNS, intrusion detection and traffic analysis, on top of VPN tunnels that are now post-quantum. Each has its own article. This one is the map: what each layer does, why it is there, and how they work together.
Layer 1: DNS – the first thing every device does
Before a phone loads a page or an app phones home, it asks DNS for an address. That makes DNS the cheapest place to stop ads, trackers and known malware: no address, no connection. The firewall's own resolver answers every lookup against a blocklist of about a million domains (Hagezi Pro plus threat intelligence). Devices that try to ask someone else are caught: plain DNS is redirected, DNS over TLS is blocked, and the known DNS-over-HTTPS servers simply don't resolve. The lookups that pass then leave through the VPN, not through my internet provider.
What it gives: the same protection for every device, including the ones I can't install anything on, like the TV. Forcing all DNS through the firewall
Layer 2: IDS – is something bad happening?
DNS stops what is known by name. Suricata looks at the traffic itself, with 43,000 rules for malware, botnet control servers, phishing and crypto miners. It runs on the home network side, before the VPN, so it sees which device did what. It only raises alerts; it blocks nothing yet. The rules are chosen for a network that only connects outwards, so it stays quiet unless something really happens, and when it does, my phone buzzes.
What it gives: an early warning if a device on the inside has been compromised. An IDS someone actually listens to
Layer 3: DPI – what is happening?
The IDS answers yes or no. ntopng answers the open question: which device talks to whom, using which application, and how much. It recognises streaming, games, cloud sync, updates and hundreds of other protocols, per device and live. It is a magnifying glass, not a guard: it watches and blocks nothing. When the IDS or the DNS dashboard shows something odd, this is where I look next.

Layer 4: VPN – how everything leaves
All traffic from the home network, DNS included, leaves through two WireGuard tunnels to a commercial VPN; if the first fails the second takes over. My internet provider sees encrypted traffic to one address and nothing else. Since December the tunnels also use a post-quantum key exchange, so a recording of the traffic today can't be decrypted by a quantum computer tomorrow. Post-quantum VPN tunnels on the router
Watching all of it
Layers nobody looks at are decoration. A small exporter on a server at home reads the firewall's DNS statistics and IDS alerts through the API, with keys that can only read, and hands the numbers to Prometheus. From there:
- Grafana dashboards for DNS and security, plus one for traffic and the machines.
- A start page with one row per area: traffic, DNS, security, status.
- Push to my phone when the IDS raises an alert, when Suricata stops, or when the DNS blocklist suddenly is empty.

Why layers
No single layer catches everything. DNS doesn't see a malware sample that connects straight to an IP address; the IDS does. The IDS doesn't tell me that the TV suddenly sends gigabytes to somewhere new; ntopng does. None of them help if my internet provider can read the traffic; the VPN does. And all of it is worth nothing if nobody notices; the monitoring does. Each layer covers a gap in the one before.
What it costs
All of it runs on a small office PC with 12 threads and 16 GB of memory: CPU about 3 %, memory about 21 %. Every piece is free, open-source software. Every change went through the firewall's API, with a backup before and after, so each step can be undone.