Skip to main content
Topic solved
This topic has been marked as solved and requires no further attention.
Topic: [SOLVED] Correct way flush the DNS cache on OpenRC (Read 354 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

[SOLVED] Correct way flush the DNS cache on OpenRC

How to correctly flush the DNS cache on OpenRC ?
tried to search rather extensively to no avail as info found all on systemd

 

Re: Correct way flush the DNS cache on OpenRC

Reply #1
OpenRC doesn't "cache" DNS queries. Unless you run some caching DNS server locally like tinydns or dnsmasq, your system uses the nameserver specified in /etc/resolv.conf. Network managers (connmand, NetworkManager etc) tend to modify /etc/resolv.conf with the nameserver(s) specified by your DHCP provider (usually, your router). So, it may be your router doing some sort of DNS caching.
If you don't want to depend on your router, you can statically define your preferred name server in /etc/resolv.conf and make it immutable [man chattr(1)]. Or use, say, tinydns and restart it whenever you want to clear its cache.