Flush DNS cache on reboot

Can anyone advise or provide working script or solution to make DNS flush on each reboot?

Also it will be great to make this happen each day at 0:00.

Why it is important?


Your DNS cache is effectively a list of visited websites, much like your browser history. However, the DNS cache is usually managed by your device’s operating system and is therefore outside the scope of any single browser — and the safeguards browsers usually implement.

One such safeguard is incognito (or private) mode. While incognito mode doesn’t deliver on the vast majority of its advertised privacy promises, it does prevent your browser from storing your browsing history. Yet, a very similar list of websites is present inside the DNS cache and outlives your incognito session. A compromised device could therefore expose your browsing history via the DNS cache, even if you visited those websites in incognito mode.

install procps-ng-pkill and add to system scheduler
pkill -hup dnsmasq

Or disable dnsmasq cache by setting cache size to zero not installing anything else.

EDIT: cache is certainly lost on reboot or dnsmasq restart.

How? Any instructions?

Where is your router storing this data during a reboot ?

1 Like

I don’t know. How to check this?

You claimed that.

1 Like

what @brada4 said, you asked how to clear it.

so the counter question is, where do you believe it's being stored ?

1 Like