ad-blocking with DD-WRT revisited (simple)

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2, 3 ... 12, 13, 14
Author Message
drdedus
DD-WRT User


Joined: 31 Dec 2013
Posts: 171
Location: Greece

PostPosted: Fri Mar 02, 2018 19:47    Post subject: Reply with quote
I am confused and it does not work for me.
Can someone make a guide how we can get it work?
Sponsor
jcdole
DD-WRT Novice


Joined: 13 Jun 2015
Posts: 42
Location: South-West France

PostPosted: Fri Mar 02, 2018 21:05    Post subject: Reply with quote
jcdole wrote:
jcdole wrote:
jcdole wrote:
Hello.
Seems there is a problem whith one url in the sript gen_host.sh.
The URL "http://jansal.googlecode.com/svn/trunk/adblock/hosts" is no longer usable and I cannot download from the new project which has been exported to GitHub: https://github.com/lewisje/jansal.
Any help is welcome.


Another problem cannot download anymore from :

Code:
Mar 2 17:03:34 troll-router user.notice root: gen_host: Downloading host entries from https://raw.githubusercontent.com/lewisje/jansal/master/adblock/hosts (attempt 3)...
Mar 2 17:03:34 troll-router user.notice root: gen_host: Download failed [http code : 000 - ret_code : 77 ]...

Mar 2 17:04:19 troll-router user.notice root: gen_host: Downloading host entries from http://www.malwaredomainlist.com/hostslist/host.txt (attempt 3)...
Mar 2 17:04:20 troll-router user.notice root: gen_host: Download failed [http code : 404 - ret_code : 0 ]...


Trying with wget in place of curl give same error.

Doing the same download from my computer ( opensuse leap 42.3 ) under konsole does not give errors.

Any help is welcome.


Putting -k in the curl command :

previous :

Code:
(curl -o "$TEMP_FILE" --silent --write-out '%{http_code}' --connect-timeout 60 --max-time 120 "$URL" > "$HTTP_CODE") & DOWNLOAD_PID=$!


New :

Code:
(curl [color=red][b]-k[/b][/color] -o "$TEMP_FILE" --silent --write-out '%{http_code}' --connect-timeout 60 --max-time 120 "$URL" > "$HTTP_CODE") & DOWNLOAD_PID=$!


solve the first error above.

Still error on
Code:
http://www.malwaredomainlist.com/hostslist/host.txt


change
Code:
http://www.malwaredomainlist.com/hostslist/host.txt


to https

Code:
https://www.malwaredomainlist.com/hostslist/host.txt


solve last problem.

Problem solved.

_________________
Netgear R6300v2 DD-WRT v3.0-r47495 std (09/28/21) - Linux Opensuse Leap 15.2 - Win 10
Alozaros
DD-WRT Guru


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

PostPosted: Fri Mar 02, 2018 21:13    Post subject: Reply with quote
https://www.malwaredomainlist.com/hostslist/host.txt

error 404 not found... !!!

_________________
Atheros
TP-Link WR740Nv1 ---DD-WRT 55179 WAP
TP-Link WR1043NDv2 -DD-WRT 55303 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 55460 Gateway/DoH,Forced DNS,AP Isolation,4VLAN,Ad-Block,Firewall,Vanilla
Netgear R7800 --DD-WRT 55460 Gateway/DoT,AD-Block,Forced DNS,AP&Net Isolation,x3VLAN,Firewall,Vanilla
Netgear R9000 --DD-WRT 55363 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
ironmanlok
DD-WRT User


Joined: 16 Jul 2012
Posts: 59

PostPosted: Sat Mar 03, 2018 3:03    Post subject: Reply with quote
http://www.malwaredomainlist.com/hostslist/hosts.txt is working for me while https not

all lists are working for me, except for cinsscore.com which seems to be offline

for DNS I use these:
Code:
for URL in "http://winhelp2002.mvps.org/hosts.txt" \
           "http://someonewhocares.org/hosts/zero/hosts" \
           "http://www.malwaredomainlist.com/hostslist/hosts.txt" \
           "http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext" \
           "https://raw.githubusercontent.com/lewisje/jansal/master/adblock/hosts" \
           "https://zeustracker.abuse.ch/blocklist.php?download=hostfile" \
           "http://hosts-file.net/ad_servers.txt" \
           "http://mirror1.malwaredomains.com/files/BOOT" \
           "http://malc0de.com/bl/BOOT" \
           "http://www.hostsfile.org/Downloads/hosts.txt"; do


for IP blacklisting I use these:
Code:
for URL in "https://raw.githubusercontent.com/firehol/blocklist-ipsets/master/firehol_level1.netset" \
           "https://raw.githubusercontent.com/firehol/blocklist-ipsets/master/firehol_level2.netset" \
           "https://raw.githubusercontent.com/firehol/blocklist-ipsets/master/firehol_level3.netset" \
           "https://raw.githubusercontent.com/firehol/blocklist-ipsets/master/firehol_level4.netset" \
           "https://raw.githubusercontent.com/firehol/blocklist-ipsets/master/iblocklist_abuse_palevo.netset" \
           "https://raw.githubusercontent.com/firehol/blocklist-ipsets/master/yoyo_adservers.ipset" \
           "https://raw.githubusercontent.com/firehol/blocklist-ipsets/master/firehol_abusers_30d.netset" \
           "https://raw.githubusercontent.com/firehol/blocklist-ipsets/master/firehol_abusers_1d.netset" \
           "https://raw.githubusercontent.com/firehol/blocklist-ipsets/master/firehol_webclient.netset" \
           "https://zeustracker.abuse.ch/blocklist.php?download=ipblocklist" \
           "http://malc0de.com/bl/IP_Blacklist.txt" \
           "http://www.team-cymru.org/Services/Bogons/fullbogons-ipv4.txt" \
           "http://cinsscore.com/list/ci-badguys.txt" \
           "https://rules.emergingthreats.net/fwrules/emerging-Block-IPs.txt"; do
jcdole
DD-WRT Novice


Joined: 13 Jun 2015
Posts: 42
Location: South-West France

PostPosted: Thu May 31, 2018 20:16    Post subject: Reply with quote
Code:
May 31 18:07:59 router-dd-wrt user.notice root: gen_host: Generating hosts file...
May 31 18:07:59 router-dd-wrt user.notice root: gen_host: Downloading host entries from http://winhelp2002.mvps.org/hosts.txt (attempt 1)...
May 31 18:08:01 router-dd-wrt user.notice root: gen_host: Downloading host entries is done with success for URL : http://winhelp2002.mvps.org/hosts.txt
May 31 18:08:01 router-dd-wrt user.notice root: gen_host: Downloaded blacklist : 1 out of 7
May 31 18:08:02 router-dd-wrt user.debug : ttraff: data collection started
May 31 18:08:02 router-dd-wrt user.notice root: gen_host: Downloading host entries from http://someonewhocares.org/hosts/zero/hosts (attempt 1)...
May 31 18:08:05 router-dd-wrt user.notice root: gen_host: Downloading host entries is done with success for URL : http://someonewhocares.org/hosts/zero/hosts
May 31 18:08:05 router-dd-wrt user.notice root: gen_host: Downloaded blacklist : 2 out of 7
May 31 18:08:06 router-dd-wrt user.notice root: gen_host: Downloading host entries from http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext (attempt 1)...
May 31 18:08:06 router-dd-wrt user.notice root: gen_host: Downloading host entries is done with success for URL : http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext
May 31 18:08:06 router-dd-wrt user.notice root: gen_host: Downloaded blacklist : 3 out of 7
May 31 18:08:06 router-dd-wrt user.notice root: gen_host: Downloading host entries from https://raw.githubusercontent.com/lewisje/jansal/master/adblock/hosts (attempt 1)...
May 31 18:08:07 router-dd-wrt user.notice root: gen_host: Downloading host entries is done with success for URL : https://raw.githubusercontent.com/lewisje/jansal/master/adblock/hosts
May 31 18:08:07 router-dd-wrt user.notice root: gen_host: Downloaded blacklist : 4 out of 7
May 31 18:08:08 router-dd-wrt user.notice root: gen_host: Downloading host entries from http://hosts-file.net/ad_servers.txt (attempt 1)...
May 31 18:08:15 router-dd-wrt user.notice root: gen_host: Downloading host entries is done with success for URL : http://hosts-file.net/ad_servers.txt
May 31 18:08:15 router-dd-wrt user.notice root: gen_host: Downloaded blacklist : 5 out of 7
May 31 18:08:19 router-dd-wrt user.notice root: gen_host: Downloading host entries from https://www.malwaredomainlist.com/hostslist/hosts.txt (attempt 1)...
May 31 18:08:22 router-dd-wrt user.notice root: gen_host: Downloading host entries is done with success for URL : https://www.malwaredomainlist.com/hostslist/hosts.txt
May 31 18:08:22 router-dd-wrt user.notice root: gen_host: Downloaded blacklist : 6 out of 7
May 31 18:08:22 router-dd-wrt user.notice root: gen_host: Downloading host entries from http://www.hostsfile.org/Downloads/hosts.txt (attempt 1)...
May 31 18:08:24 router-dd-wrt user.notice root: gen_host: Downloading host entries is done with success for URL : http://www.hostsfile.org/Downloads/hosts.txt
May 31 18:08:24 router-dd-wrt user.notice root: gen_host: Downloaded blacklist : 7 out of 7
May 31 18:08:26 router-dd-wrt user.notice root: gen_host: Downloaded 113537 entries...
May 31 18:08:26 router-dd-wrt user.notice root: gen_host: Adding custom host entries...
May 31 18:08:26 router-dd-wrt user.notice root: gen_host: Removing white-listed entries...
May 31 18:08:31 router-dd-wrt user.notice root: gen_host: Removing duplicate entries...
May 31 18:08:33 router-dd-wrt user.notice root: gen_host: Generated 89740 domain entries. Restarting DNSMasq...


No errors today.

_________________
Netgear R6300v2 DD-WRT v3.0-r47495 std (09/28/21) - Linux Opensuse Leap 15.2 - Win 10
awm34x
DD-WRT User


Joined: 13 Jan 2018
Posts: 98
Location: Sarasota

PostPosted: Tue Jun 12, 2018 18:46    Post subject: Reply with quote
I just added facebook.com to my whitelist to allow my wife access from her phone & tablet apps. (She was ok on her desktop via Chrome).
jcdole
DD-WRT Novice


Joined: 13 Jun 2015
Posts: 42
Location: South-West France

PostPosted: Wed Sep 05, 2018 11:43    Post subject: Reply with quote
Alozaros wrote:
very simple add blocking script that allows multiple hosts to be added...
add this to startup script:

wget -qO /tmp/mvps http://winhelp2002.mvps.org/hosts.txt
wget -qO /tmp/someonewhocares http://someonewhocares.org/hosts/zero/hosts

stopservice dnsmasq && startservice dnsmasq

Services/DNSMasq/Additional DNSMasq Options:

addn-hosts=/tmp/mvps
addn-hosts=/tmp/someonewhocares


you can add more lines in the script and add lines in additional DNSMasq options too i just use those 2...

CURL command works on some routers but it's stripped from others, so not many routers support it... you have to check this for yourself...or there are some bugs with it and its not working...

Does not work :
Code:
root@router-dd-wrt:/jffs/tmp# wget -O /jffs/tmp/someonewhocares http://someonewhocares.org/hosts/zero/hosts
Connecting to someonewhocares.org (209.97.222.140:80)
wget: not an http or ftp url: https://someonewhocares.org/hosts/zero/hosts

and
Code:
root@router-dd-wrt:/jffs/tmp# wget -O /jffs/tmp/someonewhocares https://someonewhocares.org/hosts/zero/hosts
wget: not an http or ftp url: https://someonewhocares.org/hosts/zero/hosts
root@router-dd-wrt:/jffs/tmp#


As I said in some of my previous post, site change access mode from time to time.

Any comments is welcome.

_________________
Netgear R6300v2 DD-WRT v3.0-r47495 std (09/28/21) - Linux Opensuse Leap 15.2 - Win 10
Goto page Previous  1, 2, 3 ... 12, 13, 14 Display posts from previous:    Page 14 of 14
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