10

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.

1
  • what do you mean exactly by "the instructions no longer apply" ? which step in them gives you something unexpected?
    – GJ.
    Apr 3, 2012 at 17:37

4 Answers 4

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

0

If you are receptive to or needing a router upgrade, you may want to consider getting a router that supports either DD-WRT or Tomato or similar. What you can do is then intercept all DNS requests on your network and send them to a bind caching server on your router. Let the router do all the work for you rather than having to carry a BIND daemon or a VM on your desktop.

0

I'm surprised nobody has recommended this, maybe in that particular OS X version it doesn't work, but you can manually map IPs to Hostnames (at least usually) with either /private/etc/hosts or /etc/hosts.

-1

One super easy way to solve this problem is to use a virtual machine. A virtual machine, or VM for short, is basically a virtual computer that will run alongside Mac OS X. You would install Linux on the VM and then serve the DNS server from Linux, which is trivial.

Pros:

  • It's quick and easy to set up. (Installing Ubuntu takes less than 15 minutes on a modern Mac.)
  • VMs give you a lot of flexibility. For example, if you need any additional services in the future, its probably going to be easier to just add them to your Linux VM than it is to mess with trying to installing it on OS X.

Cons:

  • Some would consider this to be a clunky solution. It stands to reason that one should not have to resort to switching operating systems in order to get something as simple as a DNS server. This is mitigated by the fact that we don't have to switch away from OS X - we can just run Linux and OS X side by side.
  • It takes more system resources to host an entire computer that it does to simply have OS X running a DNS server. This is mitigated by the fact that it doesn't take all that much resources to host a Linux VM, and we can restrict the VM from consuming more resources than it needs to function.

Convinced and ready to start? Here's a quick start guide.

1) Download and install VirtualBox, which is free software that allows you to create and run virtual machines on OS X.

2) Download the ISO file for Ubuntu Server, which is the most popular version of Linux.

3) Start up VirtualBox. Create a new VM. Feel free to leave all the default settings if you want, or customize away - it doesn't really matter. However, one important thing is to change the networking mode from the default (which is NAT) and set it to bridged. This will give your VM an IP address on your local network.

4) Power on the new VM. VirtualBox should prompt you for the location of an ISO file to be "inserted" into the virtual CD-ROM drive, so choose the Ubuntu Server ISO that you just downloaded.

5) Now, just follow the prompts to install Ubuntu. It's pretty easy and much like installing OS X or Windows - you just keep hitting next.

6) Once it is finished, you can log on and are greeted with the (hopefully familiar) Linux command prompt. The first thing you will probably want to do is to download all the security and bug fixes:

sudo apt-get update && sudo apt-get upgrade -y

7) Install BIND, which is the most popular DNS server for Ubuntu:

sudo apt-get install bind9 -y

8) Edit the main BIND configuration file to your liking:

sudo nano /etc/bind/named.conf

(nano is a text-editor program)

https://help.ubuntu.com/community/BIND9ServerHowto

9) Start the server by doing a

sudo service bind9 start

10) Find out the IP address of your VM by doing a:

ifconfig

11) Now that you know the IP address, you can set that to be your DNS server on OS X. And you're finished!

For more information on the stuff in the config file, or to find out stuff like how to make BIND automatically start when you turn on the virtual computer, check out the official Ubuntu BIND documentation. If you find that too dry, there are also plenty of over tutorials on Google that might be a little more user friendly.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .