

In some cases, you may run “dnsmasq” as a service on your server. Now what if you were to run dnsmasq as a service? Dnsmasq running a service Using a simple “tail” command, we are able to verify that the DNS cache was actually flushed. Similarly to systemd-resolved, you can send a “ USR1” to the process in order for it to print its statistics to the “syslog” log file. Note : so why are we running this command? As DNS runs on port 53, we are looking for the commands associated with the service running on port 53, which is your local DNS resolver or “stub”. In order to know if you are dealing with one or another, you can execute the following command $ sudo lsof -i :53 -S On most Linux systems, the DNS resolver is either “ systemd-resolved” or dnsmasq. In this tutorial, we are going to focus on the yellow box meaning the local stub resolver implemented on every Linux system. But as you can see, there are many different caches from your local application until the actual Internet DNS servers. If you are reading this article, you are looking to flush the cache of your local DNS resolver. In order to be able to flush your DNS cache, you have to know how DNS resolution works on your Linux system.ĭepending on your distribution, you may be facing different Linux services that act as a DNS resolver.īefore you start, it is quite important for you to know how DNS resolution will actually happen on your operating system.
