Restrict subdomain access to LAN only with Caddy
There are subdomains on my home network that I only want accessible locally. While there are no public DNS records pointing to them, the URLs are still visible thanks to Certificate Transparency, and I want to add a layer of security just to be sure. Here’s where Caddy snippets are convenient to block all WAN traffic for select subdomains. The following snippet in my Caddyfile blocks all traffic coming from outside the subnets after remote_ip, in the blocks where it’s used. ...