I have an internet connection through a Fritz!box 7340. Even though the Fritzbox routers where the better of the bunch, they don't support setting your own DNS. I've found a german blog post explaining it, so I thought I'd describe the process after following that post.
Find out which is faster
First I decided to find out which DNS would work better. There is a tool called namebench which does exactly that. Namebench is probably in your local repository because I only had to do
sudo apt-get install namebench.
If you run
namebench from the commandline, you will be presented with a TK Gui where you can enter the DNS servers you want to test. I decided to test the Google public DNS vs the DNS provided by XS4All.
First, find out the address of your current DNS by logging into the Fritzbox and looking up the System Log. You should see a line similar to
Internet connection established successfully. IP address: x.x.x.x, DNS server: 184.108.40.206 and 220.127.116.11, Gateway: 18.104.22.168, Broadband PoP: dr9.d12
This shows you have two DNS servers by XS4All
22.214.171.124. So I pitted those against the Google public DNS servers
126.96.36.199 is twice as fast as the XS4All DNS servers. Which is weird, because I would expect the XS4All servers to be faster because they are closer on the network. But maybe they run them in a virtual machine or something like that.
Changing the settings
I decided to switch to the Google DNS servers. This German blog describes the whole process:
- Download the configuration from your Fritzbox
- Open in a text editor
- Enter the DNS servers
- Add a line to bypass the configuration integrity checker
- Restore the Fritzbox configuration from your backup
Download the configuration from your Fritzbox. It's good to keep a copy of this file before editing, because if you set an incorrect configuration, you will have to reset the router.
FRITZ.Box Fon WLAN 7340...
.export file and find the
overwrite_dns1 = 0.0.0.0; and
overwrite_dns2 = 0.0.0.0; lines. Change the
0.0.0.0 into the DNS you would like to use. In my case it ended up looking like this:
my_ipaddr = 0.0.0.0; his_ipaddr = 0.0.0.0; overwrite_dns1 = 188.8.131.52; overwrite_dns2 = 184.108.40.206; bVolumeRoundUp = no; VolumeRoundUpBytes = 0;
If you would not upload the configuration file to your router, the router would tell you it's broken because the checksum in the file is not correct anymore. To keep the router from checking the config file, add a line with
NoChecks=yes just above the
**** CFGFILE:ar7.cfg line, as seen in the block below:
OEM=avme Country=031 Language=en NoChecks=yes **** CFGFILE:ar7.cfg /* * /var/flash/ar7.cfg * Sun Apr 21 03:05:58 2013 */
Now upload the configuration to your router. If everything went well, your router will reboot and after logging in you should see a system log line similar to:
Internet connection established successfully. IP address: x.x.x.x, DNS server: 220.127.116.11 and 18.104.22.168, Gateway: 22.214.171.124, Broadband PoP: dr9.d12
That's it, now your DNS lookups will be faster then ever before.