The guardian your home network never had.
Open source. Self-hosted. Sees everything on your network. Tells nobody.
The portal's globe HUD, shown with synthetic demo data.
Every phone, TV, camera, thermostat, laptop and light bulb in your home is quietly talking to servers around the world. Most of it is harmless. Some of it is tracking you. A little of it, one day, will be an attacker, or a device that has gone bad.
The tools that can show you this are either closed hardware you rent forever, or a pile of dashboards you have to babysit, none of which talk to each other.
Shepherd is one app that watches the whole flock. It runs on a NAS, a mini PC, a Mac or a Windows box inside your network. No new router. No cloud. No subscription. It learns who your devices are, what they talk to, and notices the black sheep: the device that does not belong.
See it. An interactive 3D globe lights up in real time. Every connection is an arc that wraps around the planet from the device that made it to the place it is talking to. Heavy transfers are thick and bright, tiny lookups are hairlines. Scrub a timeline to replay last Tuesday at 3 a.m.
Control it. Click an arc, a device or a country to block, pause, rate-limit or quarantine, live, with undo. Group devices into "Kids", "IoT" or "Work" and every rule, chart and alarm follows the group.
Trust it. Ads, trackers and known-bad domains are blocked at the network level for every device, including the ones that cannot run an ad blocker. Anything unusual raises an alarm you can mute, snooze and manage in bulk, so you hear about the things that matter and only those.
Survive anything. Run more than one Shepherd. They form a mesh that shares one dataset: rules, devices, alarms and history. A spare box takes over in seconds when the main one goes down.
Think locally. A local AI learns what normal looks like for each device and explains what is strange, in plain English, without a byte leaving your house.
Reach it anywhere. Built on Tailscale, so your phone gets the same protection on cellular, and you can reach any device at home securely from anywhere.
Shepherd is early and built in public. This is real, tested and running on a real network:
- One native binary for Linux, macOS and Windows. No Docker, no database server, no dependencies.
- DNS filtering engine with blocklists, allow and block rules, a cache, and IPv4 and IPv6 over UDP and TCP.
- Self-healing upstreams. Continuous health probing and instant failover. Born from a real outage, so it never stalls your network on a dead resolver.
- Guarded blocklist updates. A broken or hostile list is rejected and the last good one stays active.
- Apple iCloud Private Relay blocking, the way Apple documents for networks, with every attempt logged by device.
- Protected out of the box. A blocklist and the Private Relay policy are on by default; opt out of either in the config or the portal.
- The globe HUD. Live traffic arcs around a 3D globe, heavy lanes thicker, replay with a timeline, click-to-block, filters, and your home found automatically (override it any time). Runs offline and ships a demo mode.
- Encrypted, searchable history (opt-in): AES-256-GCM segments you can query after the fact, plus a live event stream.
- A catalog of 95 lists, apps and categories plus custom lists, so you can block Instagram, Discord or a whole category for the network, a group of devices or one device (POLICY.md).
- Devices with real names, learned passively from DNS, the neighbor table, mDNS and reverse DNS, with vendors, search, groups and bulk edit (DEVICES.md).
- Device quarantine. New devices land in a reserved group automatically and stay there until you move them, with their own policy rules. Opt out with a config toggle.
- Automatic device classification (phone, camera, TV, speaker, and more) from DNS lookups, MAC vendor and, with the map on, the networks a device talks to; a type you set yourself always wins (CLASSIFY.md).
- Wandering mode, per device: stop all filtering while still watching and logging every request, with an optional auto-reverting timer.
- Configurable upstreams over plain DNS, DNS over TLS and DNS over HTTPS, with bootstrap, verified presets and a test before you add one (UPSTREAMS.md).
- Management screens for all of the above (Devices, Blocking, Upstreams, History) alongside the HUD.
- Tailscale integration for private remote access, validated on a live exit node and subnet router.
- Bandwidth per device, group and network (TRAFFIC.md), live and over months, read from the router you already own: connect eero, a UniFi controller or a Firewalla MSP account under Connections on the Router screen and Shepherd records what the router already counts. Both directions, nothing in the path of your traffic, no setting changed on your router, and it works on mesh networks where steering cannot. UniFi keeps real byte counters, so its figures are measurements; eero reports rates only, so its totals are a floor rather than a measurement, and the screen says so. Device names are kept the same across Shepherd, eero and a Firewalla, in every direction: the most readable name wins the first sync, and after that a rename in any one of them reaches the others (BACKENDS.md).
- A dashboard over your router or firewall (BACKENDS.md): connect a Firewalla (on the box itself, or through MSP) or a UniFi console and the Router screen shows its devices, requests, alarms and rules, and changes them once you allow it. On a Firewalla box, one script installs Shepherd beside the firewall (FIREWALLA.md): requests as they happen, blocked and inbound traffic on the map, throughput to the second, and device groups kept in step. A small REST API with an OpenAPI document covers whichever router is connected (API.md). Firewalla's local API is unpublished and can change with firmware; changing things through MSP, and renaming on eero, are tested against fakes, not live accounts.
- Watch mode, deprecated (WATCH.md): steers a device's outbound traffic through Shepherd by one-sided ARP, to show what a device connects to even when it bypasses your DNS. Off by default, no new features, kept for the installs already running it. It is outbound-only by construction, so its download figure is an estimate from each device's own acknowledgements, and on the eero mesh it was developed against the gateway reflects forwarded frames back, which stops the first full-size segment of every flow. Source NAT fixed that when measured, which is what DHCP mode below is built on rather than one-sided steering.
- DHCP mode, alpha (DHCP.md): Shepherd serves the LAN's addresses and masquerades the traffic of the devices it routes, so both directions of their traffic pass through it — downloads measured rather than estimated, and QUIC no longer a blind spot. One network card, one flat segment, your router still routing. The LAN's range is yours to pick, and a chosen range is checked against the network as it actually is, so you are told what to change on the router instead of finding out at midnight. Alpha means no real device has ever taken an address from it: the lease exchange is tested end to end but only over loopback sockets, and it is the one thing here that can take a whole network off the internet. Off by default, nothing offers it to you, and the staged rollout starts with a listener that has no way to send.
- Threat feeds (THREATS.md): every lookup checked against curated lists of malware hosts, botnet controllers and hijacked networks, and an alarm naming the device that reached for one, blocked or not. A few map lookups per query, no model, no packet inspection.
- Detections and decoy ports (DETECT.md): alarms for how a device behaves, from data Shepherd already has. A device that takes its lookups to another resolver or stops asking altogether, bursts of machine-made names, data carried in DNS, a new name asked for on a metronome, a camera reaching a country it never has, an upload far beyond a device's own record. And a few ports Shepherd listens on and serves nothing from, so a device probing its neighbours gives itself away. Nothing in the path of your traffic; it alarms, it does not block.
- Thread, Matter and IPv6 safe by design, written down as hard rules (IPV6.md). IPv6 steering exists (unicast Neighbor Advertisements only, never Router Advertisements) but is off by default and never touches Thread or Matter gear (IPV6-WATCH.md).
- 97% test coverage with the race detector, enforced by a floor that only rises.
Also built: a passive ARP monitor that learns real MAC addresses and raises spoofing alerts (ARP.md), whose gateway-changed event Watch mode listens to; an alarm engine with Web Push and ntfy delivery, mute rules and batch actions (ALARMS.md); router importers for eero and CSV (IMPORT.md); and passkey unlock for the portal (PASSKEYS.md); first-run setup in a browser rather than a text editor (SETUP.md); and signed releases, so a running Shepherd can verify an update before applying it (UPDATE.md). Coming next: inbound protection, the mesh and the local AI. Serving the LAN's own addresses is in, as alpha and off by default (DHCP.md) — on one network card, not two. See the roadmap.
flowchart LR
subgraph home[Your home network]
D[Phones, TVs, cameras, laptops, smart home] --> R[Your router<br/>any brand]
R --> S1
subgraph S1[Shepherd]
direction TB
DNS[DNS engine<br/>filter, cache, failover]
W[Watch mode<br/>per-device traffic control]
P[Portal HUD<br/>globe, replay, alarms]
AI[Local AI]
DNS --- P
W --- P
AI --- P
end
S1 <-. synced dataset .-> S2[Standby Shepherd]
end
S1 --- T[Tailscale<br/>remote access, exit node]
R --> I[(Internet)]
- Guard: your router hands out Shepherd as DNS, so every device is filtered the moment setup finishes. It cannot take your internet down.
- Measure: for the byte rates DNS alone cannot show, Shepherd signs in to the router you already own — eero, a UniFi controller or Firewalla MSP — and records what it already counts, per device, in both directions. Nothing is put in the path of your traffic and no setting on your router is changed (TRAFFIC.md).
- Watch (deprecated, off by default): one-sided ARP steering of each eligible device's outbound traffic through Shepherd. Outbound only — it never sees downloads — and it blocks nothing. Kept for the installs already using it; read from your router instead (WATCH.md).
- Private by design. No telemetry. No accounts. Query history lives in memory. The only outbound connections are your DNS upstreams and blocklist downloads.
- Never breaks your smart home. IPv6, Thread, Matter and mDNS are protected by rules in the code, not by luck.
- Free and keyless. No paid APIs. Every data source works without an account.
- Self-maintaining. Lists, upstreams and storage look after themselves, with guardrails and rollback.
- Protected by default. Set it up once and every device is covered. You opt out per device or feature, never opt in. Staged rollout, a fail-open watchdog and automatic exclusion of infrastructure keep that safe.
- Open and honest. AGPL, built in public, tested first. This README says what works and what does not.
Grab the newest beta from Releases, or build it:
git clone https://github.com/blaineam/shepherd && cd shepherd
make build
bin/shepherd # prints a setup link; finish it in a browserWith no configuration file, Shepherd brings up a setup page and prints the addresses to open. Answer
five questions in the browser — where to keep state, which of this host's addresses answer DNS, which
resolvers to ask (each one tested before it is written), where the portal listens, and optionally
your router for per-device bandwidth — press Finish, and Shepherd writes a commented shepherd.toml
and carries straight on with it in the same process. shepherd setup runs it again later. Copying
shepherd.example.toml and editing it by hand still works.
See SETUP.md.
Run it on a spare port beside your current resolver, check it with dig, and only then point your
router at it. The Wave 2 guide walks through it and what to verify.
Shepherd is developed on a real home network, in the open. A leak guard blocks private addresses, MAC addresses, tailnet names, keys and personal details from every commit and commit message, locally and in CI. Tests run against fakes on loopback, never a real network. Docs, changelog and code move together, enforced by a check. See PUBLIC-DEV.md.
Tests first, coverage only goes up, and nothing real leaves your network. Start with
CONTRIBUTING.md and the Code of Conduct. Report security issues
privately through SECURITY.md. Releases follow SemVer with a
changelog; every push to main produces one rolling beta (RELEASING.md).
First-run setup · Design · Roadmap · Testing · DNS QA and self-test · IPv6 and Thread · Wave 2 guide · Raspberry Pi · Firewalla box · Router API · Releasing · Public development · Detections and decoy ports
blaineam.github.io/apps/shepherd — the feature tour, honest
roadmap, and a live interactive demo of the portal (the real UI, running entirely client-side on synthetic
data; see site/).
AGPL-3.0-or-later. If you run a modified Shepherd as a service, you share your changes. See LICENSE.