MacOS – Offline DNS resolution on Sierra

dnsmacos

I have configured dnsmasq to resolve all .dev domains to 127.0.0.1. This works great as long as my Mac is connected to the Internet (using Wi-Fi or even my iPhone in hotspot mode).

As soon as I turn off my Wi-Fi or there's no coverage (say I'm nowhere where there's no Wi-Fi connection available) I can't access my .dev websites anymore. Safari refuses to connect saying I'm offline. I would have to put my phone in hotspot mode but in this way I can't truly work offline.

Is there a way to have this setup work? I do remember it was working back in the days of Snow Leopard. Even up to Mavericks for sure.

All CLI tools work fine. Cocoa apps don't.

My dnsmasq config is as simple as:

address=/dev/127.0.0.1
domain-needed
bogus-priv

Best Answer

I've got the same problem and tried and searched a lot, but no solution in the horizon.

But Chrome seems to be not affected by this problem, so you can use it when in no-net mode.

I'm hoping for a better solution.