V
V
VerminSP2015-12-26 17:29:32
Computer networks
VerminSP, 2015-12-26 17:29:32

How to set up ad blocking on dlink dir 615 with dd-wrt firmware?

There is a dlink dir 615e4 router, it has dd-wrt firmware, you need to block all ads using the router. The script does not work from the off site , the hosts0 file is empty. I found this script in the comments to this article:

<if test -s /tmp/hosts0
then
    rm /tmp/hosts0
fi

wget -O - http://someonewhocares.org/hosts/zero/hosts >/tmp/hosts0
grep addn-hosts /tmp/dnsmasq.conf || echo "addn-hosts=/tmp/hosts0" >>/tmp/dnsmasq.conf
killall dnsmasq
dnsmasq --conf-file=/tmp/dnsmasq.conf

The hosts0 file is created, weighs 341kb, but ads are still not blocked. What's wrong, why doesn't it work?
DNSMask settings:
2e1ce5a4af4748dabb7a2bbc5941dda3.JPG

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
VerminSP, 2015-12-28
@VerminSP

Problem solved! On firmware DD-WRT v3.0-r28598 std (12/24/15) everything works!
On older firmware, the dnsmasq.conf file should have an addn-hosts=/tmp/hosts0 entry when booting the router. It was created but disappeared after 20-30 seconds, so the hosts0 file was not connected.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question