DNS vs. Proxy servers – a comparison.
By Ben Keyte
Owner SAFCOMMS LIMITED and UMOSRAS CORPORATION LIMITED
In the game of cyber – security, things are constantly changing. We are always being informed that one thing is “the new thing” in terms of how quickly the markets and innovation is changing things. In this short article, I intend to compare the benfits of both the proxy cache server and the Domain Name Server I currently use and will try and advise, which one is best to use in terms of security and overall performance and efficiency.
I will start with DNS, as that is what we are always being told is the oldest thing out there. DNS stands for Domain Name System and is the access route to the entire internet. If you have DNS enabled on your server, you can shorten the distance to the main DNS servers across the world and hence speed up your internet speed and have access at your fingertips to what DNS does. What this in fact is, is a system that interprets the standard character format (ie https://www.google.com) that we put into a web browser say into numerical index format or an IP address (8.8.8.8, in the case of google DNS). You may not think about this when you use the internet but every time you input a web address into your browser – there are several systems over the world that automatically perform this calculation because (if we’re being specific) computers only understand binary, decimal and hexadecimal code. The DNS server that I use is the BIND server, which stands for Berkeley Internet Name Domain. It comes with a config file that you can alter to suit your DNS requirements or configure addresses on your control panel DNS zone manager. You can set your server up as a cache server, which means records of pages visited are saved in order to speed up your browsing experience by revisiting the cache, the next time you visit the same page. The software is free and can be used across all platforms.
DNS alone is not strictly as secure as other things out there on the market, like VPNs (Virtual Private Networks) and Proxies and it is often the case that people will steer away from bespoke DNS servers nowadays because they are one of the oldest security facilities on the market. However, there are certain additions that you can add to a DNS server to ensure what I consider, arguably, to be one of the most secure systems out there.
When trying to set up Private DNS on my server, I came across a fantastic article by Paolo Zaino on configuring Quad9 TLS security on a BIND server. The instructions were actually to install stubby – and then adjust the config file to forward traffic from your DNS server through the Quad 9 server via Transport Layer Security (TLS). TLS – in case you don’t know is the front runner to SSL standard encryption that most websites use today and is certainly the most secure thing out there, in terms of internet security. When checking that the TLS connection was correctly configured, there is a useful free tool out there on the internet, called Wireshark – which “sniffs” all network traffic from and to your computer. In this case I was able to prove that I had both TLS and DNS enabled on my system (see figures 2 and 3).
Notes about DNS security
Now that your BIND server is configured with strict TLS security with Quad 9 – in my opinion you have just about the best on the market in terms of what security, efficiency of system and usability you can get.
Draw backs and conclusion.
As you will see when discussing the squid proxy server later on – it is possible to allow all network traffic (understanding the risks) through your proxy server. This is much harder on a DNS server, primarily because you have to stipulate which IP addresses are allowed access to it and it is inadvisable to open it up to all comers because it is very difficult to insert username or password or even Kerberos security on a DNS server. What is more, because of this you will require each access point to it to have a static IP address and then the hardware at that address will need to be configured to enable access to the DNS server but all in all a fantastic secure system and well worth the time spent, in comparison to proxy, in order to set it up.
Proxy servers are not as common place nowadays as VPN servers, which are two a penny out there on the internet – some of them good, some of them bad but proxies do a pretty similar job to VPNs; enabling traffic to be directed from a different part of the world – often facilitating access to parts of the internet that some countries don’t allow in their zones. This is an extremely useful asset to the proxy – which is my choice over Virtual Private Network (although it is possible to configure an OpenVPN or SwanVPN proxy server on Linux or Windows). Both systems speed up network traffic and in the case of a proxy server; a cache is used to facilitate this process.
They are relatively easy to configure and using squid proxy server software (again free) you can set up a proxy with no security, password encryption or Kerberos security.
What has the edge, in terms of usability against DNS for administrative purposes, is the availability and facility of being able to use Goaccess (see figures 1 and 4) with your proxy server and in fact the speed and ease with which you can set one of these up. Goaccess is free, open source software, designed originally for an Apache web server, to use to check traffic to your website or server. The config file can be altered, in order to use Goaccess with squid proxy and if you are putting a free service/ facility out there on the market, this is an essential service for the administrator in order to physically check and screen your server from unwanted traffic. This is a massive plus in so far as squid goes compared with BIND and I haven’t found a way to configure Goaccess with my DNS cache server.
However this is not the point – you do not need to check up on your DNS server with full Quad 9 TLS encryption! All of your access points to it will have been written in to your DNS zones and you will be well aware of who is using your DNS server. This can also be the case with squid and with Kerberos encryption – makes it just about as water tight but just not quite as efficient nor as much quality or integrity.
When I talk about integrity, I have proven to myself that DNS has the edge through one of my favourite past times – music. I often work late into the night with headphones and if seeing isn’t believing then hearing is!
All in all it is a very close call but I’d say that DNS just has it but putting that aside, they are both extremely useful and efficient.
Why not get both?
For information on how to put DNS on your device or to go system wide, please see this short video for a full explanation.
