Page 1 of 3

Turning off DNS Caching

Posted: Fri Apr 12, 2019 9:00 pm
by pmerrill
I recurring problem I'm having with DNS cacheing. I've had problems over a long time with SafeDNS. It's similar to OpenDNS but has a nice feature that you can switch between profiles based on a schedule, so the school kids don't spend all the time on games and I don't have to keep changing OpenDNS manually.

Anyway, I believe I finally sorted out what is causing the problem, that being caching of DNS lookups. Effectively, the symptom is that when the allotted hour arrives to turn games on, it doesn't work, they remain off. The culprit is that the router has cached the game URL to be the block page of SafeDNS. I've edited /etc/dnsmasq.conf and added the line cache-size=0 but it doesn't seem to work, same problem.

Before I go back and start using OpenDNS with my manual change, are there any other bright ideas to fix this problem?

Re: Turning off DNS Caching

Posted: Fri Apr 12, 2019 11:52 pm
by ispyisail
There are a few probable solutions on this page?

https://unix.stackexchange.com/question ... -on-dd-wrt

Do any of them work?

Re: Turning off DNS Caching

Posted: Fri Apr 12, 2019 11:55 pm
by ispyisail
What about the DNS cache on the client machine?

https://www.technipages.com/flush-and-r ... g-ipconfig

Re: Turning off DNS Caching

Posted: Sat Apr 13, 2019 12:00 am
by ispyisail
Just reading this

https://www.safedns.com/en/guides/bypass-prevention/

Looks like you need to install "SafeDNS Agent" on each client then configure Gargoyle as per instructions

Re: Turning off DNS Caching

Posted: Sat Apr 13, 2019 7:28 am
by RomanHK
Complete caching stop:
Paste the following lines on the router in /etc/config/dhcp:

Code: Select all

	option nonegcache '1'
	option cachesize '0'
In Windows over cmd, run these commands:

Code: Select all

ipconfig /flushdns
SC config Dnscache start= disabled
NET stop Dnscache

Re: Turning off DNS Caching

Posted: Sat Apr 13, 2019 6:37 pm
by pmerrill
ispyisail wrote:There are a few probable solutions on this page?

https://unix.stackexchange.com/question ... -on-dd-wrt

Do any of them work?
Sort of. I think they will work but the issue is I'm not home at the time, so this requires logging into the router and issuing the commands. The manual intervention is what I'm trying to avoid.

Re: Turning off DNS Caching

Posted: Sat Apr 13, 2019 6:39 pm
by pmerrill
ispyisail wrote:What about the DNS cache on the client machine?

https://www.technipages.com/flush-and-r ... g-ipconfig
Yeah, that's part as well. A reboot will clear the cache but it still does not work because of the cache in the router.

Re: Turning off DNS Caching

Posted: Sat Apr 13, 2019 8:46 pm
by pmerrill
RomanHK wrote:Complete caching stop:
Paste the following lines on the router in /etc/config/dhcp:

Code: Select all

	option nonegcache '1'
	option cachesize '0'
So a big problem with this. Router reboots all the lights are flickering but do you think I can connect to the internet? No way. Can't access the Internet and can't even access the router 192.168.1.1 won't work. Any ideas as to how to recover??? Otherwise I have a brick.

Re: Turning off DNS Caching

Posted: Sun Apr 14, 2019 12:37 am
by Lantis
Failsafe mode, then remove those two options. Reboot and see if it’s ok. Otherwise a full failsafe reset.
It won’t be a brick.

Re: Turning off DNS Caching

Posted: Sun Apr 14, 2019 8:03 am
by pmerrill
Lantis wrote:Failsafe mode, then remove those two options. Reboot and see if it’s ok. Otherwise a full failsafe reset.
It won’t be a brick.
Ok, so can you provide a link about how to boot into failsafe mode?