Low Effort Blog Posts Part I: DNS Sinkholing


I want my laptop to route certain requests differently on my home network, and prevent them on public networks.


I wanted to try this syslog thing, but didn’t like the idea of hardcoding a local IP. Even within the block, switching wifi networks (e.g. going to a coffee shop) would mean my laptop would try and send logs to the configured IP. No good.


Configure your router to resolve something like sinkhole.mydomain.com to your desired server. In my case, this was the syslog server I kept on my home network within the block. Additionally, configure sinkhole.mydomain.com to (or anything in the block). This way requests are successful, but your data never leaves your laptop. Requests to sinkhole.mydomain.com will continue to fail until you’re back on your home network. Most modern operating systems will flush the DNS cache when switching networks, making any caching a non-issue.