Turning off DNS Caching

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

Moderator: Moderators

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

Turning off DNS Caching

Postby pmerrill » Fri Apr 12, 2019 9:00 pm

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: 4731
Joined: Mon Apr 06, 2009 3:15 am
Location: New Zealand

Re: Turning off DNS Caching

Postby ispyisail » Fri Apr 12, 2019 11:52 pm

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: 4731
Joined: Mon Apr 06, 2009 3:15 am
Location: New Zealand

Re: Turning off DNS Caching

Postby ispyisail » Fri Apr 12, 2019 11:55 pm

What about the DNS cache on the client machine?

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

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

Re: Turning off DNS Caching

Postby ispyisail » Sat Apr 13, 2019 12:00 am

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: 509
Joined: Sat May 04, 2013 4:18 pm
Location: Czech Republik

Re: Turning off DNS Caching

Postby RomanHK » Sat Apr 13, 2019 7:28 am

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 Gargoyle 1.12.0
Linksys WRT3200ACM with Gargoyle 1.12.0
TL-WR1043ND v2 with Gargoyle 1.10.0

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

Re: Turning off DNS Caching

Postby pmerrill » Sat Apr 13, 2019 6:37 pm

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: 287
Joined: Wed Feb 15, 2012 8:23 pm

Re: Turning off DNS Caching

Postby pmerrill » Sat Apr 13, 2019 6:39 pm

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: 287
Joined: Wed Feb 15, 2012 8:23 pm

Re: Turning off DNS Caching

Postby pmerrill » Sat Apr 13, 2019 8:46 pm

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: 5358
Joined: Mon Jan 05, 2015 5:33 am
Location: Australia

Re: Turning off DNS Caching

Postby Lantis » Sun Apr 14, 2019 12:37 am

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.
Routers: Various ar71xx/mvebu/x86-64
http://lantisproject.com/downloads/gargoyle_ispyisail.php for the latest releases

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

Re: Turning off DNS Caching

Postby pmerrill » Sun Apr 14, 2019 8:03 am

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


Return to “Network / Wireless Issues”

Who is online

Users browsing this forum: No registered users and 1 guest