Adblocking with dd-wrt

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


Joined: 07 Feb 2009
Posts: 21

PostPosted: Wed Dec 28, 2016 11:14    Post subject: Adblocking with dd-wrt Reply with quote
Hi I have a TL-WR841ND v11 setup as access poind, with latest dd-wrt 12-15-2016-r30949. I followed the wki for ad blocking
https://www.dd-wrt.com/wiki/index.php/Ad_blocking

but I cannot make it to work. I tried both senarios with no success.

My setup is Access poind, WAN and DHCP disabled, static IP

any help?
Sponsor
Mile-Lile
DD-WRT Guru


Joined: 24 Feb 2013
Posts: 1634
Location: Belgrade

PostPosted: Wed Dec 28, 2016 11:49    Post subject: Reply with quote
sell your unit and buy unit with 16MB od flash... then use Privoxy...

those wiki scripts won't work in your client bridge scenario because they are some kind of DNSMasq DNS Proxy... and you don't have local DNS on that bridged router?
panosvo
DD-WRT Novice


Joined: 07 Feb 2009
Posts: 21

PostPosted: Wed Dec 28, 2016 11:55    Post subject: Reply with quote
I have enabled Local DNS and DNSMasq. The setup is not client bridge, is AP. Internet comes throught LAN cable from my VDSL router. The device I have has 32MB ram but only 4MB. This is the problem??
The wiki does explain any other setup I have to make.
Alozaros
DD-WRT Guru


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

PostPosted: Wed Dec 28, 2016 12:45    Post subject: Reply with quote
all scripts are working with Local DNS and DNSMasq, the only
trouble is local DNS breaks down sometimes and you have to restart your unit to get it work again....
Scripts are working even on low ram units.....but in general they are list based and they do not do a miracles all ADs totally off...

_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 55630 WAP
TP-Link WR1043NDv2 -DD-WRT 55723 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55779 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55819 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55779 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
Detection
DD-WRT User


Joined: 19 Jan 2012
Posts: 403
Location: UK

PostPosted: Wed Dec 28, 2016 13:59    Post subject: Reply with quote
£25 Raspberry Pi & Pi.Hole adblocker used as DNS = Network wide adblocking
_________________
TPLINK TL-WR2543ND (5GHz)
WRT160NL (2.4GHz)
panosvo
DD-WRT Novice


Joined: 07 Feb 2009
Posts: 21

PostPosted: Wed Dec 28, 2016 15:51    Post subject: Reply with quote
If its not stable with dd-wrt then Raspberry Pi.hole is the best solution, can I have parental control too with Raspberry Pi??
Detection
DD-WRT User


Joined: 19 Jan 2012
Posts: 403
Location: UK

PostPosted: Thu Dec 29, 2016 14:44    Post subject: Reply with quote
panosvo wrote:
If its not stable with dd-wrt then Raspberry Pi.hole is the best solution, can I have parental control too with Raspberry Pi??


You mean control over more than just adverts being blocked?

Yes, you can add any sites you like to the blacklist or the whitelist, and also add URL lists to pihole to block in bulk

_________________
TPLINK TL-WR2543ND (5GHz)
WRT160NL (2.4GHz)
TinkGirlcc
DD-WRT Novice


Joined: 22 Jan 2017
Posts: 1

PostPosted: Sun Jan 22, 2017 8:56    Post subject: Reply with quote
thepiratebays.se I came across the same issue

Last edited by TinkGirlcc on Fri Aug 25, 2017 8:15; edited 1 time in total
h8red
DD-WRT Guru


Joined: 28 Jun 2011
Posts: 580
Location: Vilnius, Lithuania

PostPosted: Sun Jan 22, 2017 10:23    Post subject: Reply with quote
I have modified the adblock script to have entries whitelisted:

#!/bin/sh
rm /tmp/dlhosts
sleep 30
wget -O - http://www.mvps.org/winhelp2002/hosts.txt | grep 0.0.0.0 | sed 's/[[:space:]]*#.*$//g;' | grep -v localhost | tr ' ' '\t' | tr -s '\t' | tr -d '\015' | sort -u >/tmp/dlhosts
echo "$(awk '!/add entry to whitelist here/' /tmp/dlhosts)" > /tmp/dlhosts
killall -HUP dnsmasq

Additional DNS Masquerade options:
addn-hosts=/tmp/dlhosts

Additional CronJobs
0 5 * * * root /tmp/.rc_startup

_________________
[Ramips] Nexx WT3020F Openwrt @kernel #4.14.167 (OpenVPN server, Wireguard server, AD blocking, SQM QOS, USB)
Alozaros
DD-WRT Guru


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

PostPosted: Sun Jan 22, 2017 10:32    Post subject: Reply with quote
h8red wrote:
I have modified the adblock script to have entries whitelisted:


great job i tried something like this before but didnt work as i wanted and i lost interest of it but i will try this to see if it works as intended 10x for the good job....

and what is the syntax to add more than one host??
do you use comma space or slash dash ??

_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 55630 WAP
TP-Link WR1043NDv2 -DD-WRT 55723 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55779 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55819 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55779 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
h8red
DD-WRT Guru


Joined: 28 Jun 2011
Posts: 580
Location: Vilnius, Lithuania

PostPosted: Sun Jan 22, 2017 10:38    Post subject: Reply with quote
Alozaros wrote:
and what is the syntax to add more than one host??
do you use comma space or slash dash ??

Add another full line. Later I will try to simplify the script for multiple entries

_________________
[Ramips] Nexx WT3020F Openwrt @kernel #4.14.167 (OpenVPN server, Wireguard server, AD blocking, SQM QOS, USB)
Alozaros
DD-WRT Guru


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

PostPosted: Sun Jan 22, 2017 10:56    Post subject: Reply with quote
well full line like 123.123.123.123.124.124.124.124.125.125.125.125
or
echo "$(awk '!/123.123.123.123/' /tmp/dlhosts)" > /tmp/dlhosts
echo "$(awk '!/124.124.124.124/' /tmp/dlhosts)" > /tmp/dlhosts


ops i tried with just only one IP added and it was not working i had no DNS at all restarted 2 times waited 5 min
no DNS respond Wink I'm back to the script that was working...

_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 55630 WAP
TP-Link WR1043NDv2 -DD-WRT 55723 Gateway/DoT,Forced DNS,Ad-Block,Firewall,x4VLAN,VPN
TP-Link WR1043NDv2 -Gargoyle OS 1.15.x AP,DNS,QoS,Quotas
Qualcomm-Atheros
Netgear XR500 --DD-WRT 55779 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55819 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55779 Gateway/DoT,AD-Block,AP Isolation,Firewall,Forced DNS,x2VLAN,Vanilla
Broadcom
Netgear R7000 --DD-WRT 55460 Gateway/SmartDNS/DoH,AD-Block,Firewall,Forced DNS,x3VLAN,VPN
NOT USING 5Ghz ANYWHERE
------------------------------------------------------
Stubby DNS over TLS I DNSCrypt v2 by mac913
h8red
DD-WRT Guru


Joined: 28 Jun 2011
Posts: 580
Location: Vilnius, Lithuania

PostPosted: Sun Jan 22, 2017 11:10    Post subject: Reply with quote
I ment dns name like: 15minlt.adocean.pl
This script is based on DNS

_________________
[Ramips] Nexx WT3020F Openwrt @kernel #4.14.167 (OpenVPN server, Wireguard server, AD blocking, SQM QOS, USB)
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT 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