ad-blocking with JFFS2 filesystem - manually edit hostlist

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2
Author Message
jackykoning
DD-WRT User


Joined: 15 May 2013
Posts: 243
Location: The Nederlands

PostPosted: Sun Jun 09, 2013 21:48    Post subject: this is mine Reply with quote
this is my adblock.
it copies a hosts file from sda_part5 then adds 4 internet hosts files and removes useless shit from them then sorts them. and adds correct localhost entries. (sort -d -b are basicly useless -u is usefull)

Code:
sleep 3
cp /mnt/sda_part5/hosts /tmp/1
wget -O - http://winhelp2002.mvps.org/hosts.txt >> /tmp/1 | wget -O - http://www.malwaredomainlist.com/hostslist/hosts.txt >> /tmp/1 | wget -O - http://sysctl.org/cameleon/hosts.win >> /tmp/1 | wget -O - http://someonewhocares.org/hosts/ >> /tmp/1
echo "127.0.0.1 localhost
::1  localhost" >> /tmp/hosts
cat /tmp/1 | grep 127.0.0.1 | tr -d '\015\032' | sed -e 's/127.0.0.1/0.0.0.0/g' -e 's/[[:space:]]*#.*$//g' -e 's/   / /g' -e 's/  / /g' -e 's/  / /g' -e 's/ www./ /g' -e 's/googleadservices.com//g' -e 's/localhost//g' | sort -d -b -u >> /tmp/hosts
killall -1 dnsmasq
rm /tmp/1

_________________
Hi Smile
2x Netgear R7800
Sponsor
Bradford1040
DD-WRT Novice


Joined: 03 Apr 2013
Posts: 18

PostPosted: Mon Jun 10, 2013 7:43    Post subject: you can also do AD block with DNSMASQ Reply with quote
****This is if you don't have usb or jffs space ****

If you have WinSCP you can go in and edit the /tmp/dnsmasq.conf and add the file I am attaching by copy and paste to the bottom of the file,
it is in the right format for the DD-Wrt firmware to read them just open it copy everything and paste in the dnsmasq.conf



Additional DNSMasq Options.txt
 Description:
AD-Block

Download
 Filename:  Additional DNSMasq Options.txt
 Filesize:  90.9 KB
 Downloaded:  759 Time(s)


_________________
Netgear WNDR3700v3
Firmware Version DD-WRT v24-sp2 (04/30/13) vpnkong - build 21395M
Kernel Version Linux 2.6.24.111 #464 Tue Apr 30 13:59:20 CEST 2013 mips
OTRW2 Installed
systox
DD-WRT Novice


Joined: 08 Jul 2012
Posts: 5

PostPosted: Fri Aug 30, 2013 4:22    Post subject: Reply with quote
thank you, this thread helped me alot. Razz
Goto page Previous  1, 2 Display posts from previous:    Page 2 of 2
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC 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 can attach files in this forum
You can download files in this forum