Questions tagged [dns]

Domain Name Service, a method of converting a textual doman name to an IP address

Filter by
Sorted by
Tagged with
100
votes
22answers
202k views

DNS not resolving on Mac OS X

Some of my coworkers are having troubles on their Macs - DNS resolution does not work under Mac OS X. They're running Snow Leopard 10.6.8. They can use DNS in a Windows 7 virtual machine (VMware ...
44
votes
2answers
55k views

How can I display the current DNS servers from the command line under OS X?

I want to display the DNS servers that are used by the current network setup on OS X, from the command line.
37
votes
9answers
71k views

OS X 10.10.1 /etc/hosts & /private/etc/hosts file is being ignored and not resolving

Like the title says, running os x 10.10.1. if i have an entry in my hosts file and do a dig or nslookup it still shows a different IP than what is in my hosts file even after trying to flush various ...
34
votes
10answers
39k views

DNS lookups fail with e.g. `ping`, but work with `host`

I'm using pfSense 2.0rc3, and I've set it up as a DNS forwarder and enabled "Register DHCP leases in DNS forwarder" and what I understand are all the appropriate settings to get DNS server for local ...
29
votes
1answer
33k views

Do /etc/resolver/ files work in Mountain Lion for DNS resolution?

Can anyone tell me if adding a file under /etc/resolver will work for DNS resolution using a DNS server other than what is handed out via DHCP ? My issue is that I want to use OpenDNS for a clients ...
25
votes
2answers
11k views

How to set custom DNS entry for a particular wifi connection

Is there a way to set custom DNS settings for a single wifi connection without affecting other connections? I use my laptop at home and work. When at work I need to type in an IP address of a local ...
23
votes
4answers
21k views

How can I quickly change DNS server

I often like to use a non-network specific DNS server (like Google's public DNS 8.8.8.8). However, many public wi-fi locations won't load their "terms of service, click here" page during the ...
23
votes
4answers
28k views

How can I get OSX Mavericks to notice a DNS change in `/etc/hosts`?

A common way to "block" a website (eg, to eliminate it as a distraction) is to edit /etc/hosts and point the domain to the loopback address. Eg: # Stop goofing off 127.0.0.1 youtube.com On Mavericks,...
22
votes
9answers
39k views

Mac OS X Mountain Lion - DNS resolving uses wrong order on VPN via dial-up connection

I am using a MacBook with Mac OS X 10.8.2 and connect to my company's network via VPN. Everything works great when establishing the VPN connection via LAN or WLAN. However, when I use a dial-up ...
18
votes
4answers
20k views

What does the dynamic global hostname option in sharing settings do?

Can anyone explain what this option does?
16
votes
1answer
22k views

Yosemite Cannot Resolve Domain Names

So I know Apple removed mDNSResponder in Yosemite, but it appears that a bunch of apps are still trying to interact with it and failing Oct 20 10:57:00 Nicks-MacBook-Pro.local configd[25]: ...
14
votes
2answers
12k views

discoveryutil: command not found

After connecting VPN, I often have to flush DNS to get my private hosts to be found. I would do this sudo discoveryutil mdnsflushcache; sudo discoveryutil udnsflushcaches Now, after upgrading to ...
14
votes
3answers
5k views

Why is my hostname resolution taking so long?

Several months ago I noticed that my text editor (emacs) and IDE (IntelliJ) were taking a really long time to start up. The time appeared to vary based on the DNS servers OS X was using. I was able ...
14
votes
3answers
87k views

How can I change the cellular DNS server on iOS?

Is there a way to set a global DNS server that will be used for all connections (both Wi-Fi + cellular data)? If there isn't a uniform manner to specify DNS, can I just change the DNS used by the ...
14
votes
6answers
55k views

iOS 11: How to change DNS settings for cellular/mobile data?

Is it possible to change DNS for cellular internet? How can it be done without a jailbreak? I've tried Apple Configurator, but didn't find suitable settings.
13
votes
5answers
9k views

/etc/hosts gets over written

What is the correct way of editing /etc/hosts? I want to add some IP addresses and host names to it. It works for a while (a few hours) and then it gets reverted back to the original version. Is there ...
13
votes
4answers
30k views

Discoveryd Alternative to Replace mDNSResponder Argument?

This is a direct follow-on to this question. Before Yosemite, I'd add the "-AlwaysAppendSearchDomains" argument to the mDNSResponder plist file so that all local resolver lookups added the search ...
13
votes
1answer
6k views

User specific hosts file in Mac OS X

I'm working on an OS X 10.6.8 machine, for which I do not have superuser privileges. I'd like to imitate the effect of adding an entry to the hosts file, i.e. have a certain domain resolve to a ...
12
votes
1answer
11k views

Flush cache of DNS on macOS Sierra & High Sierra

How to flush the cache of the DNS system on a macOS Sierra or High Sierra Mac? I have seen discussion of the following, but am not sure if this is the modern approach. And I am not sure what each ...
12
votes
5answers
8k views

How to add some additional DNS search domains without ignoring the DHCP ones?

I just want to add my own list of Search Domains but without overriding the ones returned by the DHCP? As anyone would imagine I already tried to add them to Network > Advanced > DNS but adding them ...
11
votes
2answers
9k views

What is the preferred method of command line domain name lookup (DNS)?

What command line command do I use to lookup a domain address? When looking at the man pages for nslookup and dig I can see a section saying that these utilities do not use the Mac OS methods of ...
11
votes
2answers
12k views

How do I flush the DNS cache on a OS X 10.6 machine?

Trying to flush the local DNS cache. How is this done on Snow Leopard? Using System Preferences and using the terminal?
11
votes
1answer
11k views

Is it possible to configure OS X to use the domain-name supplied by DHCP option 15?

I run a small home network, and have configured my DHCP server to provide a domain name with all responses. My MacBook Air (running 10.7.3) places the provided domain in the DNS search path, but does ...
10
votes
4answers
13k views

List DNS servers in Mavericks

How to check which DNS server was used to resolve particular hostname within VPN network? I am using company-provided proprietary VPN client and want to see DNS server's IP address, but ...
10
votes
5answers
20k views

Dig not returning authority section?

Digging wikipedia.com, on my Macbook Pro, returns: $ dig wikipedia.com ; <<>> DiG 9.8.3-P1 <<>> wikipedia.com ;; global options: +cmd ;; Got answer: ;; ->>HEADER<<...
10
votes
1answer
5k views

How to find all devices (IP Address, Hostname, MAC Address) on local network?

I've read almost every thread related to this, yet no one has quite made it easy to access a table like the following. IP Address Hostname MAC Address 192.168.1.10 | myAppleTV | 02:...
10
votes
2answers
6k views

How to fix DNS resolving issues on Mountain Lion after waking from sleep?

After I installed Mountain Lion the other day I've noticed something very annoying. Almost every time I wake my iMac (27", mid-2010, CI7) from sleep: it seems that something DNS-related is broken. ...
9
votes
2answers
11k views

How do I add custom DNS server and preserving default DNS of ISP in OS X Mountain Lion

I'm using OS X Mountain Lion. I'm using dnsmasq to set up wildcard localhost domain names, such as http://local.dev, to point to localhost. But I have to add 127.0.0.1 in my system preference -> ...
9
votes
3answers
9k views

DNS Resolution Fails for ping and curl, but not dig

I'm running DNSMasq as a local DNS server, so I can resolve *.local.pcfdev.io (as discussed here Using PCF Dev Offline with Mac OS X). Everything worked when I first set things up. A couple of days ...
9
votes
4answers
4k views

On OS X is it possible to override DHCP assigned DNS servers but still keeping them for fallback?

By default I would like to use the google public DNS servers and to fallback to intranet ones when these are failing. Is this possible? ... I am looking for a setup that would not break when I move ...
8
votes
2answers
3k views

Device name on router is different than OS X hostname

There are tons of questions about changing a Mac hostname, and while I went through most of them, I could never find this nuanced answer: Why do routers always seems to receive the first hostname ...
8
votes
1answer
8k views

dnsmasq not working on Mac OS Sierra

I'm running dnsmasq on a 2016 MBP running Mac OS Sierra (10.12.1) but I'm unable to ping any .dev addresses despite having what I believe is the proper config. Running dig does return sane output. /...
8
votes
1answer
13k views

Make `hostname -f` return fully qualified hostname

How can i make hostname (i.e. the unix commandline tool hostname, invoked in terminal) return a hostname including the domain information? At the moment, hostname, hostname -f and hostname -s return ...
7
votes
3answers
22k views

Cannot access localhost after upgrade to Mavericks but can access 127.0.0.1

I ran across this question, but it wasn't resolved (and it hasn't been touched in a while). I'm not sure if my issue is the same, but I don't have enough reputation here to comment on that question. ...
7
votes
4answers
58k views

Can't access specific websites with Macbook Air (10.7.5 Lion)

This has really baffled me: While my internet connection works, I can't access specific websites with Safari (or any other browser for that matter). I don't get a 404 page; Just an error message that ...
7
votes
1answer
3k views

How can I force default DNS query to work in TCP mode?

In China, the so-called GFW often contaminates DNS results like $ dig @8.8.8.8 archive.org ;; QUESTION SECTION: ;archive.org. IN A ;; ANSWER SECTION: archive.org. 2662 IN A ...
7
votes
8answers
45k views

Why will my Mac only load Google and Facebook?

I'm running into this really strange problem on my 2013 iMac at home (running Mavericks): the internet will work for a while, then at some point it will stop being able to load any websites except for ...
7
votes
2answers
2k views

Shared Internet apply /etc/hosts

How do I make those who connect to me via a shared internet connection use my /etc/hosts file? I was thinking something along the lines of creating a DNS server, but I was hoping maybe there is a ...
7
votes
1answer
1k views

Preventing google search for custom top-level domain

How can I prevent safari to redirect the user to the google search page for addresses with custom top-level domains? Given an address of the type http://application.test where test is a primary zone ...
6
votes
3answers
15k views

/etc/hosts will not update/refresh at all

I add to my /etc/hosts file this : 127.0.0.1 youtube.com Save the file. Flush everything with : dscacheutil -flushcache; sudo killall -HUP mDNSResponder Reboot my computer 30 times. Then I run: ...
6
votes
3answers
2k views

DNS servers aren't specific to network?

On my Mac, I am trying to set my DNS servers so that they are 8.8.8.8 and 8.8.4.4 at my house, while at school they are the router default (they block google's public DNS) How can I set up my DNS ...
6
votes
1answer
185 views

Automatically assign DNS

How do I ensure that the DNS is being set by the network? On Windows I would check here and make sure that Obtain DNS server address automatically was selected:
6
votes
2answers
7k views

Can't use machine name to login using SSH anymore on Yosemite, how to fix?

from yesterday I have noticed that I can't connect via SSH to my OS X's SSH server anymore using the following command: User-MBP:~ user$ ssh user@user-mbp user is the user on the server, user-mbp is ...
6
votes
2answers
11k views

Can I set up domain filtering on an Airport Extreme?

I'm wondering if it is possible to set up domain filtering on an Airport Extreme based home network. Specifically, I'd like to block just rad.msn.com, and I need to do that at the network level.
6
votes
3answers
7k views

Terminal/Safari Cannot Resolve Host But Chrome Can Connect

I have MacBook Pro (Retina, 13-inch, Early 2015) with OS X 10.11.5. Internet connection works only for Chrome. Safari and several terminal apps cannot connect to internet due to resolve host failure....
6
votes
3answers
8k views

Internet Sharing handing out wrong DNS server address

I'm using a MacBook Pro with OS X Mavericks 10.9.2. It connects to the internet via a USB 3G dongle, and I want to share that internet connection via wifi. However, on devices that connect to the ...
6
votes
2answers
12k views

How to force MacOS to regenerate /etc/resolv.conf file?

Apple states clearly that the /etc/resolv.conf file is managed by Mac OS so it will be regenerated. The problem is that it seems that when I join the OpenVPN this does not happen and as a result tools ...
5
votes
2answers
7k views

Cannot ping localhost: “unknown host” on Mac OS X El Captain

I am trying to resolve localhost which right now is "not found" if I ping localhost - I am getting ping: cannot resolve localhost: Unknown host I have made sure that the /etc/hosts file has the ...
5
votes
2answers
1k views

Force DNS resolution to happen outside VPN

I'm running Mojave (10.14) and I have a Cisco AnyConnect VPN over which traffic for selected routes (determined by the VPN profile, out of my control) is sent. Traffic routing works fine, the issue ...
5
votes
3answers
854 views

dnsmasq quits with “abort”

I installed dnsmasq using brew, and tried to run it as a service without success. This is how I installed it: brew install dnsmasq sudo brew services start dnsmasq system.log just shows 2 lines over ...