adblocking do these instructions still work and dns setup

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Atheros WiSOC based Hardware
Author Message
nyddwrtuser330
DD-WRT User


Joined: 05 Mar 2018
Posts: 84

PostPosted: Tue Feb 23, 2021 14:35    Post subject: adblocking do these instructions still work and dns setup Reply with quote
found this on the wiki
https://wiki.dd-wrt.com/wiki/index.php/Ad_blocking

Im using r7800 on latest BS build with DNSmasq, DNSCrypt to OpenDNS and forced DNS
I also have addn-hosts=/mnt/sda1/hosts/restricted.hosts specified as an option for dns that contains just a couple of entries to allow me to cname bing and google to safesearch

lastly i have some legacy config lines that have been there a while to overcome some issues from old builds and may no longer be necessary

no-resolv
server=208.67.222.222
server=208.67.220.220
no-negcache
bogus-priv

I wanted to use the simpler first method but (im not a programmer). If i use the shell script i can execute either the first part-the file exists check, Or the second part. But if i try to execute both together it starts reporting errors with the if then fi portion about expecting the then or the fi.

Also i dont have the option to enable local dns in services but i have the option to specify the ip of one in setup - should that be the router?

Does this even work in my setup, as when i executed the two parts separately it did not seem to block anything - is there a good test method?

Any help would be appreciated, trying to get my family not to install all sorts of Adblockers in their browsers as i've found some to be malware.

thanks in advance
Sponsor
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 4258
Location: UK, London, just across the river..

PostPosted: Tue Feb 23, 2021 15:05    Post subject: Reply with quote
hmm many good add blockers around much better than this one you have posted...
have a look here
https://pastebin.com/aySi7RhY

or here

https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=307533

or here

https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=321121

https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=315773

_________________
Atheros
TP-Link WR740Nv1 -----DD-WRT 45993 BS AP,NAT
TP-Link WR740Nv4 -----DD-WRT 44251 BS WAP/Switch
TP-Link WR1043NDv2 ---DD-WRT 46395 BS AP,NAT,AP Isolation,Ad-Block,Firewall,Local DNS,Forced DNS,DoT,VPN,VLAN
TP-Link WR1043NDv2 ---DD-WRT 46166 BS AP,NAT,AD/Block,Firewall,Local DNS,Forced DNS,DoT,VPN,VLAN
TP-Link WR1043NDv2 ---Gargoyle OS 1.12.0 AP,NAT,QoS,Quotas
Qualcomm/IPQ8065
Netgear R7800 -----DD-WRT 46259 BS AP,NAT,AD-Block,AP&Net Isolation,VLAN's,Firewall,Local DNS,DoT
Broadcom
Netgear R7000 -----DD-WRT 46259 BS AP,Wi-Fi OFF,NAT,AD-Block,Firewall,Local DNS,Forced DNS,VLAN's,DoT,VPN
-----------------------------------------------------------------------------------------------
Stubby for DNS over TLS I DNSCrypt v2 by mac913
nyddwrtuser330
DD-WRT User


Joined: 05 Mar 2018
Posts: 84

PostPosted: Tue Feb 23, 2021 19:45    Post subject: Reply with quote
Thanks, i implemented the SurprisedItWorks script. However, i have a qustion that may have been buried in the pages.

Do i Need a cron job with this script to refresh the bad host files?

Also, i had syslog disabled, running the script with syslog disabled caused something to go wacky and lost my wireless.

Enabled syslog and things ran as expected. i see this logs, does it fail funny if syslog is disabled?
Alozaros
DD-WRT Guru


Joined: 16 Nov 2015
Posts: 4258
Location: UK, London, just across the river..

PostPosted: Tue Feb 23, 2021 21:21    Post subject: Reply with quote
yep keep syslog enabled, its vital, it doesn't take anything to run it and its essential for the system...
disable traff daemon this is taking a big toll if you want to disable something....
make sure NTP time is enabled

and SFE is disabled (unless you need it)

hmm..m yep cron job is ok to run, but there is an updated version of custom location name as

0 12 * * * root /tmp/.rc_custom.sh

and you put the ad block script in custom box and add to start up script this line

sh /tmp/.rc_custom

in general i don't use cron job, as those ad-blocking lists are not all updated on daily bases as well its one job less...to care about..

_________________
Atheros
TP-Link WR740Nv1 -----DD-WRT 45993 BS AP,NAT
TP-Link WR740Nv4 -----DD-WRT 44251 BS WAP/Switch
TP-Link WR1043NDv2 ---DD-WRT 46395 BS AP,NAT,AP Isolation,Ad-Block,Firewall,Local DNS,Forced DNS,DoT,VPN,VLAN
TP-Link WR1043NDv2 ---DD-WRT 46166 BS AP,NAT,AD/Block,Firewall,Local DNS,Forced DNS,DoT,VPN,VLAN
TP-Link WR1043NDv2 ---Gargoyle OS 1.12.0 AP,NAT,QoS,Quotas
Qualcomm/IPQ8065
Netgear R7800 -----DD-WRT 46259 BS AP,NAT,AD-Block,AP&Net Isolation,VLAN's,Firewall,Local DNS,DoT
Broadcom
Netgear R7000 -----DD-WRT 46259 BS AP,Wi-Fi OFF,NAT,AD-Block,Firewall,Local DNS,Forced DNS,VLAN's,DoT,VPN
-----------------------------------------------------------------------------------------------
Stubby for DNS over TLS I DNSCrypt v2 by mac913
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Atheros WiSOC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum