Answer the question
In order to leave comments, you need to log in
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
Answer the question
In order to leave comments, you need to log in
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 questionAsk a Question
731 491 924 answers to any question