How to force flush of DNS cache?


#1

Hi,

Using VyOS 1.1.7, it still cache the negative response for a domain over a day after it was changed.

I tried to restart dnsmasq (using sudo /etc/init.d/dnsmasq restart as well as stop followed by start) but it still keeps the cached negative response.

I also tried to set the cache size to 0 using set service dns forwarding cache-size 0 and committing the change then restarting dnsmasq but still it fails to resolve the updated hostname.

Querying, for instance, Google’s 8.8.8.8 returns the updated response.

What else can I do?

Thanks.


#2

Use nslookup to VyOS upstream DNS server, to verify it’s handing out the correct addresses

Normally, dnsmasq restart ( sudo service dnsmasq restart ) should be enough to flush its cache


#3

Thanks. That must be it. My DNS server now returns the correct results but I’ll try to keep this in mind next time.


#4

I’m sorry for bringing it up so late, but i have a small question which might be related:
Our Vyos worked great until recently, when suddenly, in the middle of nowhere, it stops pinging external websites like google.com
Didn’t try and ping the IP, but… our Vyos does have a DNS-Forwarding service.

Basically, after a reboot? => all works like a charm.
I’m trying to understand if it might be DNS related problem.
The cache-size we currently have on that DNS is 150.

Can it be that somewhere along the way, when the cache is full, Vyos will stop resolving addresses?.
Any other ideas on what can be done to try and understand why vyos suddenly stops pinging “outside world”. Do note that all Interfaces are up, and Vyos can ping its default gateway and everything looks good.

Thank you.