The officially official Devuan Forum!

You are not logged in.

#1 2024-11-14 23:03:14

Ron
Member
Registered: 2018-04-22
Posts: 529  

Clearing the DNS cache

So I wanted to clear my DNS cache and did a search for how to do it. So I found to run either:

sudo /etc/init.d/networking restart or sudo service networking restart (from here). When I ran them (I ran both) I got a message that it was deprecated. The exact message on both was:

Running /etc/init.d/networking restart is deprecated because it may not re-enable some interfaces ... (warning).
Reconfiguring network interfaces...done.

So I have two questions: 1) Did one, or both, of these commands work or not? 2) Is there a better way to clear the DNS cache?

Offline

#2 2024-11-15 09:41:42

stargate-sg1-cheyenne-mtn
Member
Registered: 2023-11-27
Posts: 208  

Re: Clearing the DNS cache

check /etc/resolv.conf for clues

cat /etc/resolv.conf

check NetworkManager settings

sudo NetworkManager --print-config

also a further note regarding DNS resolving.

i used DDG to search the terms "force pihole usage"(quotation marks only for forum post clarity, didn't use them for the search)

there were multiple pages of results given the popularity of raspberry pi units these days(not to mention trying to stop all the ads/beacons/click-bait/cookies/iframes/javascript/pop-ups/redirects/super-cookies/third-party-cookies/trackers/zomg-and now all the AI generated garbage as well)

here is one that might be helpful even if more as an overview:

https://labzilla.io/blog/force-dns-pihole

and just for additional amusement: zomg

https://english.stackexchange.com/questions/4075/what-is-the-origin-of-zomg

bonus: don't forget that some/most? browsers cache dns as well...sigh... _neverending_whackamole_

Last edited by stargate-sg1-cheyenne-mtn (2024-11-15 09:46:49)


Be Excellent to each other and Party On!
https://www.youtube.com/watch?v=rph_1DODXDU
https://en.wikipedia.org/wiki/Bill_%26_Ted%27s_Excellent_Adventure
Do unto others as you would have them do instantaneously back to you!

Offline

#3 2024-11-25 18:15:35

devur
Member
From: Denmark
Registered: 2017-05-29
Posts: 74  

Re: Clearing the DNS cache

I hawent tried this, but the description looks right

/etc/rc.d/init.d/nscd restart

Laptop lenovo
Desktop XFCE
Os Devuan GNU/Linux

Offline

#4 2024-11-25 22:04:12

Ron
Member
Registered: 2018-04-22
Posts: 529  

Re: Clearing the DNS cache

I don't have an rc.d folder in /etc. I have a rc0.d, rc1.d, rc2.d, rc3.d, rc4.d, rc5.d, rc6.d, and a rcS.d folder. But according to a post in another forum, Devuan doesn't cache DNS. Is that true?

Offline

#5 2024-11-25 23:52:14

Altoid
Member
Registered: 2017-05-07
Posts: 1,583  

Re: Clearing the DNS cache

Hello:

@Ron
See https://www.linux.org/threads/clearing- … ost-250695

GatorsFan wrote:

Since you are using Devuan you do not need to flush the DNS Cache it does not cache DNS lookups - depending if you installed it with SysVInit or RunIt - since there is no systemd any systemd commands will not work such as systemctl
You router may cache them but all non-systemd Linux OSes do not DNS cache as far as I know

That said, I run a Chimaera VM with pi-hole and unbound inside my Daedalus box.
There is a DNS cache but it is mine.
It can be flushed though the UI.

Best,

A.

Offline

Board footer