Putting on the Fritz!

Due to popular request (two Google searches within the last 24 hours for alternative dns server für fritz!box 7270) and because the topic is still somewhat hot as long as governments around Europe are considering plans to search and store their citizen's electronig communications, this is an edited and translated version of a longer posting I wrote almost a year ago, on January 25, 2009.

Of course there are ways to tell your computer, be it a Mac, a PC or a portable device, not to use your access provider's DNS servers. This might be necessary when your provider is blocking (or is forced to block) certain content on the Net, or when you are suspicious that your provider is logging (or is forced to log) your surfing habits. Just open your computer's network settings and, under the appropriate tab, enter the IP addresses of the DNS servers you want to use.

I'm using Google's DNS service which has 8.8.8.8 as primary DNS server address and 8.8.4.4 as secondary. Another (commercial) provider is OpenDNS with slightly harder to memorize addresses (208.67.222.222 and 208.67.220.220, respectively; and you have to sign up for a free account to use all their services).

Many popular DSL modems/routers offer the option of custom DNS servers, as well - but if you're using a Fritz!Box which is popular in Germany, you're out of luck: Fritz!Boxes are set to use the ISP's DNS servers, and none other.

Of course there is a way to tell a Fritz!Box to use a custom DNS server, but it involves a bit of courage, and you forfeit any rights to support from the manufacturer, your brother-in-law or me. So proceed on your own risk, or don't read on at all! (The following has worked several times on my Fritz!Box 7170 - your mileage may vary.)

  1. Activate your Fritz!Box's telnet server, for this part of the configuration only works from the box's command line (a Fritz!Box is a small Linux computer). To do this, you need to pick up on of the phones connected with the box and dial #96*7* (#96*8* to switch off the Telnet server later). Of course, this only works with telephony-enabled Fritz!Boxes with recent firmware.
  2. Open a terminal window on your computer and connect to the box with the command telnet fritz.box (or the box's local IP address). Your password is the same you are using in the box's web configuration interface.
  3. Change to the right directory with cd /var/flash .
  4. The only editor available on the box's system is Vi, so users familiar with this editor might feel less threatened than the rest of us. Open the config file with nvi ar7.cfg .
  5. Using the command /overwrite look for the lines regarding the DNS servers. You'll find the addresses 0.0.0.0 for both dns1 and dns2.
  6. Change into insert mode with i (yes, just the letter i), then enter the right IP addresses (for me, it's 8.8.8.8 for dns1 and 8.8.4.4 for dns2).
  7. Leave insert mode using the Esc key.
  8. Save your changes and exit Vi with :wq - the colon is important!
  9. Reboot the Fritz!Box with the reboot command - the telnet connection will be lost afterwards, but we don't need it any more, anyway. If your box refuses to reboot, reboot it from the web interface or with the reboot! command.

Should you decide to switch back to the original settings, just enter 0.0.0.0 for both dns servers again. I've done this, too, and my Fritz!Box has used my ISP's DNS servers again. Still, the box knew it had been tampered with, and displayed a warning message even after switching back.

Again: This is how I changed my Fritz!Box's DNS settings. Your's might be a completely different cup of tea, because you have a different box, or a different fromware, or because you are not me. So I can't accept responsibility if you fail while following these steps - sorry.

Loading mentions Retweet
Filed under  //  DNS   hack   HOWTO  
Comments (0)
Posted 2 months ago