slow internet on OS X (w/Safari or Firefox)

January 27, 2007 at 12:41 pm | Posted in Charter, DNS, DNS caching, DNS server, firefox, internet, Mac, page load, rndc, safari, slow, timeout, vi | 5 Comments

Here is some great information that others might benefit from. My boss has requested this information and I just finished sending it to my officemate’s son, so I figured that it wouldn’t hurt to post something useful on here. Before you read on, know that this fix also works with Windows too. It’s really a two part fix. First we are going to enable the DNS caching on OS X and then we will redirect DNS requests from your local DNS servers to the big kahunas (or whichever you choose). In Windows, the DNS caching comes already enabled, so all you need to do is change the DNS servers to something different than those provided by your ISP (which in my case with Charter are horrribly slow). Hope this helps! Please post a comment or suggestion if this is helpful or if I could provide better instructions…

This procedure is absolutely harmless and undoable if it doesn’t work for you. The reason I went searching for this is because I had problems in Safari and Firefox with really lengthy page loads and very frequent timeouts. It was such a headache; the fix has made all the difference in the world! Part of the problem is that OS X Tiger does not come configured with DNS caching (like Windows does). Turning this feature on will make it so that Safari or Firefox (or whatever browser you use) won’t have to “look up” the DNS information every time you try to visit a web page. The second part of at least my problem was that the Charter DNS servers are horribly slow at times. I have even configured all of my Windows machines to use the big kahuna DNS servers instead of Charter’s dinky ones…

Here’s what you need to do:

  • Open a terminal window as an administrator (you’re going to need sudo privileges)
  • Type in this command (w/o quotes): “rndc-confgen > /etc/rndc.conf
  • Now type this command (w/o quotes): “head -n 6 /etc/rndc.conf > /etc/rndc.key
  • Next type in this command (w/o quotes): “ sudo vi named.conf
  • When prompted, enter the password for the user that you are logged in as
  • This will open up VI
  • Use the J and K keys to navigate down and up, respectively
  • Navigate to the section that looks like this:

forwarders {
x.x.x.x;
x.x.x.x;
};

  • Again, using the J and K keys to navigate down and up and the H and L keys to navigate left and right, respectively, get your cursor close to the “x.x.x.x”. Press the letter I key to insert text.
  • Put these DNS servers in (or DNS servers of your choice; sometimes the DNS servers of a nearby university or major hub will do just fine, you can use a DNS lookup service to figure out what the server addresses are):
  • When you are done, it should look like this:

 

forwarders {
4.2.2.2;
4.2.2.3;

};

  • It is very important that you use the semi-colons. When I first did this, I left off the semi-colon after the } at the end and it didn’t work. It took me a little while to find out what I did wrong.
  • Once everything looks OK, press your ESC key.
  • Now press the colon key (Shift + :)
  • Type the letter w the letter q and an exclamation !
    • It should look like this :wq!
    • Press enter and terminal should confirm that named.conf was written and you should be back at the terminal prompt
  • You are done in terminal, all that is left is to reconfigure your network settings (type in Exit or use Command + Q)
  • From the system preferences, choose Network
  • Under the TCP/IP button, there is a section that says DNS servers
  • Put 127.0.0.1 in as your DNS server (this points all domain name requests to those servers that you put in the named.conf file if it can’t find a recent cached address on your local machine)
  • Save your changes and that’s it!
Advertisements

5 Comments »

RSS feed for comments on this post. TrackBack URI

  1. Hi Jim. Photos i received. Thanks

  2. Tried this today. No dice. I get through the password entry and just get a blank terminal window with a bunch of ~’s down the left side. None of the other stuff you describe is there. Bummer, switched to Mac, can’t stand the speed. UN- AC- CEPTABLE APPLE!

  3. Thom: The speed of an internet connection has certainly nothing to do with what kind of computer you are hooking up to it.

  4. I have an iMac G3 and a Powermac G5 at home, a MacMini G4 at work, a Powerbook G4 and MacBook Intel. All running 10.4.10 and all the latest updates. At home I have a wired Cable internet connection on the G5 of 1500 mbps down and 250 up, same at work except there it is ADSL and a wireless network (different provider). Since about one week I am experiencing on all my Mac’s both home and at work extreme slow internet connections. At speedtest it shows download speeds of 30 KByte/sec (240kbps) where it used to be well over 120 KByte/sec (1000 kbps). And uploadspeeds of 7 KByte/sec (61 kbps) versus normaly 30 KByte/sec (240 kbps). Sometimes even much slower. It happens on all my macs with any browser, wired and wireless on both locations. I’ve tried all settings, renewed the preferences, reconfigured internet acces and many more tips found on several forums. Apple refuses to help because al tec help on my machines expired so they say.
    What is going on?

  5. Tried this and found browser performance significantly slower than before making the changes.

    Reverted and speed is now back up to “acceptable”.


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Create a free website or blog at WordPress.com.
Entries and comments feeds.

%d bloggers like this: