DNS Caching Server

If speed of your ISP’s DNS servers is low then browsing through Squid may seem to be slow. The reason for this - Squid does name resolutions for each browser request. This takes excessive amount of time when DNS servers of your ISP are slow or overloaded. To greatly improve browser experience it is recommended to install dnsmasq caching DNS server on your Squid box.

To install dnsmasq on Ubuntu Server 16.04 LTS run the following commands.

$ sudo apt-get install dnsmasq

To install dnsmasq on CentOS 7 run the following commands.

yum install dnsmasq
systemctl enable dnsmasq.service
systemctl restart dnsmasq.service

Now you need to configure Squid to use the locally installed dnsmasq server. To do that open template file at /opt/websafety/var/console/squid/templates/squid/conf/dns.conf and uncomment or add the following line.


Click Save and Restart from Web UI. Reboot your proxy afterwards and after reboot your Squid will use the local DNS cache provided by dnsmasq.