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 possible to install dnsmasq caching DNS server on your Squid box.

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

$ sudo apt install dnsmasq

Now you need to configure Squid to use the locally installed dnsmasq server. To do that, navigate to UI / Squid/ Settings / DNS and add the DNS address as indicated on the following screenshot.

../../_images/local_dns1.png

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.