DNS is one of the most commonly used pieces of technology on the internet today. We’re talking running the whole internet. Without it, people would have difficulties finding a particular website to visit, or in most cases connect to a service such as an Instant Messenger. A designated domain name is given to a particular IP address, ruling out any preconceptions about having to remember a particular set of numbers(12 numbers!) for every place that you would need to visit.
Whenever you make a connection, the DNS resolver has to make a connection to a DNS server. Then, the server checks the DNS zone records for that particular domain you’ve requested. Once that’s done, the IP address for that domain is paired and connects you to the destination website. All of this takes some bit of time(though we’re talking in ms, not seconds) and can be an issue for users with slow internet connections. This is due to the fact that the DNS server is located far away, at the very least where your ISP is depending on their network topology.
DNS uses something called a cache. A cache is a concept where data can be temporarily stored, allowing that data to be used repeatedly until it expires and then retrieved anew. This can make your connection feel faster(loading web pages, for example) as the caching server is located closer to your house or business. Also, your web browser can cache DNS queries for later use.
To increase our DNS lookup speed, we are going to install a DNS server on our local network. By doing this, DNS entries queried from a server on the internet will be cached on our local DNS server which will have a 1ms latency through our LAN network.
Dual DHCP DNS Server
While there are several DNS server software on the market for Windows, we are going to go with Dual DHCP DNS Server. This software can act as a DHCP server as well as DNS, configuration is handled through a file with ease. We will be going into the installation process and setup, as well as how it all works.
First, we are going to download our DNS server software here. Click “Download” and wait for the pop-up window. Make sure to save it and let it finish downloading. Run the installer when you’re done.
Select your preferred language and click “Next >>”.
View the “License Terms and Conditions” and click “Install >>”.
Once you’ve finished, click “Finish” to close the installer. The software has been installed under “C:\DualServer”. Navigate there by opening up File Explorer.
We will now need to configure our DNS server via the configuration file as shown above. By double-clicking on it, notepad will open. If not, then you will need to right-click on the file and use the “Open with” option.
If you have read the OpenVPN install guide, you will notice that the configuration is similar and not so intimidating, each section has an explanation to guide you through the way. Of course, we are going to go through the following configuration options that we need to get our server up and running.
[SERVICES] ;DNS ;DHCP
This is the first and most crucial step. You will need to remove the “;” to enable either “DNS”, “DHCP” or even both functionalities if left as is. We most likely don’t need a DHCP server since our router is already serving as one. Go ahead and remove the semi-colon next to “DNS”.
This tells our DNS server to accept incoming DNS requests through a certain network interface on our computer. It is best to leave this alone by default, which will accept requests from all available interfaces.
[LOGGING] ;DHCPLogLevel=Normal ;DNSLogLevel=Normal
Remove the semi-colon from “DNSLogLevel=Normal” if you want to know what’s happening in the background. All logs are stored by default in the “log” folder of the DualServer directory.
[FORWARDING_SERVERS] ;192.168.0.1 ;10.10.10.1
This part is also important. You will need to define external DNS server(s) for your queries to be forwarded to and retrieved from. An ordinary DNS server such as Google will suffice here, but you can add different ones if you prefer. Delete both entries and enter “188.8.131.52” for the top and the bottom our secondary server will be “184.108.40.206”.
We have now configured our DNS server to the point where we can now go and give it a spin. Before that, the network interface will need to be configured as a Static IP address. Refer to this guide here on how to set one up. For DNS settings, please make sure you have only the first one set to “127.0.0.1” as shown here:
If this doesn’t work for you when running DualServer, change it to the IP that its “Listening On:”
Once you’re ready, head back to your “DualServer” folder.
We are now going to do a test run of our server. Click where it says “RunStandAlone”, this batch file will then open Command Line and execute the DualServer program.
Open your web browser, and try to browse a website. Then, go back to the Command Prompt window. There are additional entries referring to the domain name and whether they’ve been forwarded and resolved from Google DNS servers, or through the cache.
DualServer has been installed as a windows service. This allows it to run in the background, and when Windows starts. In order to make sure that it has been enabled, go to Control Panel->Administrative Tools->Services. Scroll down until you see the name “Dual DHCP DNS Service” and double-click on it to open the properties window.
Set “Startup type:” to Automatic if it isn’t already. Also if it isn’t running already, click the “Start” button to turn it on and then click “OK” to close the window.
In the end, your connection should feel faster than ever before. Even if you already have a really fast internet connection you will still benefit greatly. You can also configure every device/computer in the network to route DNS queries through this server, but you will need to run it 24/7 in order to avoid issues. It is best to install this software on a dedicated computer/server first, and then configure that server’s IP address as the DNS under your router’s DHCP configuration section or configure a static IP on each device.