kubens
kubens

Reputation: 264

After update to Yosemite, Local domain stop working after disconnect from network

I'm using dnsmasq for my local develop environment. When I'm connected to network everything is fine but then I disconnect form network, local domain doesn't work. (Safari or FireFox show me "You are not connected to network"

Thanks!

Upvotes: 4

Views: 2816

Answers (3)

Trung Lê
Trung Lê

Reputation: 5236

I experienced the same issue on Yosemite. I do not have a proper solution yet, for the time being, I have to manually add host to /etc/hosts if offline. I wish that Apple would fix discoveryd in the next version, this same problem is giving me pain too

Upvotes: 1

Scott Yu - builds stuff
Scott Yu - builds stuff

Reputation: 11763

Check your files at /etc/resolver/ directory and delete them and try again.

Upvotes: 0

Justin Levi Winter
Justin Levi Winter

Reputation: 2767

There are a number of reasons dnsmasq might not be working for you after the Yosemite upgrade. First, check to make sure you have your localhost (127.0.0.1) set in the first position of your System Preferences > Network > Advanced for the network devices you want dnsmasq to work for. dnsmasq Network Settings

*Note - I'm using Google's DNS Servers here which are the 8.8.x.x ip addresses in the screenshot image.

Following the instructions here: https://blog.wwwjfy.net/2014/06/03/some-solutions-to-some-problems-in-yosemite-beta/

I was able to "kickstart" dnsmasq by running the following command:

sudo launchctl kickstart system/homebrew.mxcl.dnsmasq

Ultimately though, I needed to update my plist file to the following in order for the service to startup when the computer boots up.

/path/to/homebrew.mxcl.dnsmasq.plist

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
    <key>Label</key>
    <string>homebrew.mxcl.dnsmasq</string>
    <key>ProgramArguments</key>
    <array>
        <string>/usr/local/opt/dnsmasq/sbin/dnsmasq</string>
        <string>--keep-in-foreground</string>
    </array>
    <key>RunAtLoad</key>
    <true/>
</dict>
</plist>

Hope that helps.

Upvotes: 3

Related Questions