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
192.168.0.0/16 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
127.0.0.1 (or anything in the
This way requests are successful, but your data never leaves your laptop.
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.