I have installed, configured DNS server(local instance of Dnsmasq) which resolves to localhost as I want, all OK.
When I go offline, it stops working, because OS X empty content of resolv.conf and ignore attempt to reflect changes in this file.
Any idea, how to configure DNS even when offline?
Similar issue(unresolved): http://blog.steamshift.com/geek/leopard-lookupd-and-local-web-development-sites
Main motivation is ease development of RoR application which uses subdomains as account keys. And you can not use 127.0.0.1 *.yourapp.local in /etc/hosts. Some guy registered domain smackaho.st and srt DNS for it like .smackaho.st at 127.0.0.1 but still, you can not use it when you are working offline.
EDIT: tried scutil command, but it seems you can change DNS if offline
NOTE: when you have all interfaces down, you cannot set DNS servers in Pref. panel.