Turning off DNS Caching

Report wireless and/or network connectivity problems in this forum.

Moderator: Moderators

pmerrill
Posts: 290
Joined: Wed Feb 15, 2012 8:23 pm

Turning off DNS Caching

Post 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?
Paul
Gargoyle 1.11.x on TP-Link Archer C7 V2 H/W

ispyisail
Moderator
Posts: 5180
Joined: Mon Apr 06, 2009 3:15 am
Location: New Zealand

Re: Turning off DNS Caching

Post by ispyisail »

There are a few probable solutions on this page?

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

Do any of them work?

ispyisail
Moderator
Posts: 5180
Joined: Mon Apr 06, 2009 3:15 am
Location: New Zealand

Re: Turning off DNS Caching

Post by ispyisail »

What about the DNS cache on the client machine?

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

ispyisail
Moderator
Posts: 5180
Joined: Mon Apr 06, 2009 3:15 am
Location: New Zealand

Re: Turning off DNS Caching

Post 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

RomanHK
Posts: 794
Joined: Sat May 04, 2013 4:18 pm
Location: Czech Republik

Re: Turning off DNS Caching

Post 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
Turris Omnia with OpenWrt 21.02 - Tested
Linksys WRT3200ACM with Gargoyle 1.13.x
TL-WR1043ND v2 with Gargoyle 1.10.0

http://gargoyle.romanhk.cz custom builds by gargoyle users

pmerrill
Posts: 290
Joined: Wed Feb 15, 2012 8:23 pm

Re: Turning off DNS Caching

Post 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.
Paul
Gargoyle 1.11.x on TP-Link Archer C7 V2 H/W

pmerrill
Posts: 290
Joined: Wed Feb 15, 2012 8:23 pm

Re: Turning off DNS Caching

Post 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.
Paul
Gargoyle 1.11.x on TP-Link Archer C7 V2 H/W

pmerrill
Posts: 290
Joined: Wed Feb 15, 2012 8:23 pm

Re: Turning off DNS Caching

Post 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.
Paul
Gargoyle 1.11.x on TP-Link Archer C7 V2 H/W

Lantis
Moderator
Posts: 6735
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Turning off DNS Caching

Post 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.
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases
Please be respectful when posting. I do this in my free time on a volunteer basis.

pmerrill
Posts: 290
Joined: Wed Feb 15, 2012 8:23 pm

Re: Turning off DNS Caching

Post 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?
Paul
Gargoyle 1.11.x on TP-Link Archer C7 V2 H/W

Post Reply