How do I setup a local DNS server on Mac OS X 10.7 (Lion)?

I had some serious lag to resolve website address and sometimes things simply wouldn’t load; pages keep loading for 5+ minutes without even a timeout error. So I had setup a local DNS server/cache using BIND on Mac OS X 10.5 (Leopard) and Mac OS X 10.6 (Snow Leopard).

Now that I have Mac OS X 10.7 (Lion), I have the same problem, but the instructions no longer apply to Mac OS X 10.7 and I can’t find a way to do it.

Has anyone attempted to do this? Are there viable alternatives for DNS servers on Mac OS X 10.7?

For those who are wondering I already tried using several external DNS servers. Only my computer has this issue on the network.


Solution 1:

You clearly have problems with DNS transactions on your local machine. If you decide to run a DNS server to resolve them, you may hit exactly the same problem - when you will request a DNS entry, which is not resolvable by your DNS server, that server will have to request the entry from an external DNS - and here you go, with the same problem.

If you decide not to run your own DNS server on your desktop computer (which i believe to be best practice), there is some steps you can try to investigate your DNS problem in more depth. Some of them would be:

  • Try using 8.8.8.8 and 8.8.4.4 as DNS servers
  • Use a packet capture software to capture DNS traffic while you are sending DNS requests out - in-depth analysis of the packets brings light to the problem very often. Watch the DNS transactions and try to identify the bottleneck

You can use Wireshark for any network packet analysis.

Look f9or UDP connection with SRC port 53.

Regards,

http://catcher.hdcs.cz