Posted on 04-30-2014 04:06 AM
It seems as though Mavericks is ignoring changes to the hosts file. I use:
sudo vi /etc/hosts
Make changes as necessary and then run
sudo killall -HUP mDNSResponder
and
sudo dscacheutil -flushcache (just in case)
But the changes to the hosts file are not taking. No matter what I do it does not seem to see the changes to the hosts file and still pings an incorrect address? Has anyone figured out a workaround?
Posted on 04-30-2014 04:22 AM
Try clearing cache on the browser you are using
https://support.opendns.com/entries/23739610-Clearing-the-DNS-Cache-on-Browsers
Posted on 04-30-2014 05:55 AM
It's not the browser I need to direct to this address. Mail is trying to hit a DMZ address and not an external address, due to internal DNS and some vpn tunneling I need them to use the external public IP and not the DMZ IP.
Posted on 04-30-2014 02:08 PM
Does a reboot work after editing the file? If not, then restarting services isn't going to help and the problem lies elsewhere.
Posted on 05-08-2014 04:37 AM
May want to consider a "Resolver" file instead.
Check this out:
https://developer.apple.com/library/mac/documentation/Darwin/Reference/ManPages/man5/resolver.5.html
http://apple.stackexchange.com/questions/74639/do-etc-resolver-files-work-in-mountain-lion-for-dns-resolution
A bunch more stuff if you google search it.
Essentially, it's just a directory and a file at /etc/ called resolver/
In there you put a file (no . extension, just the file), called the domain you're trying to resolve to.
I gave the folder and file perms of 755 and owner 0:0.
This worked instantly once in place. No browser relaunch, no reboot necessary, no caches to clean. Tested on 10.6 - 10.9.2 w/out issue