I was recently with a customer when he pointed out to me that his NetEye 4 system with its RedHat 8 operating system was sending an extremely large number of DNS queries to the DNS servers.
After quickly analyzing the situation I found that RHEL does not cache DNS queries by default. Obviously the customer wanted caching on NetEye’s RHEL.
So I started to read up on the topic and found several options in the RedHat documentation that can be used to enable DNS caching in RHEL systems: DNSMASQ, NSCD, UNBOUND, and systemd-resolved.
I’ll now briefly describe these four ways according to the RedHat documentation.
nscd -gcommand to check if caching is enabled.
unbound-checkconfcommand. Finally, make sure the service is started and configured to start on boot.
Now that I’ve explained the four options, I’d like to present my solution which I selected for a NetEye 4 system with RedHat 8.
I chose the fourth variant, the one with the systemd-resolved.service. All I needed to do was adjust the /etc/resolv.conf file and start systemd-resolved.service. In the first line of /etc/resolv.conf I specified the local name server with the IP 127.0.0.53, which points to systemd-resolved.service.
Here is my /etc/resolv.conf file as an example:
$ cat /etc/resolv.conf name server 127.0.0.53 name server 192.168.1.1 name server 192.168.1.2 search wuerth-phoenix.com
Have fun trying.
Did you find this article interesting? Does it match your skill set? Our customers often present us with problems that need customized solutions. In fact, we’re currently hiring for roles just like this and others here at Würth Phoenix.