Adblock for DD-WRT (version 2)

Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions
Goto page Previous  1, 2, 3 ... , 21, 22, 23  Next
Author Message
AbsenteeUser1
DD-WRT Novice


Joined: 10 Nov 2021
Posts: 3

PostPosted: Wed Nov 10, 2021 8:27    Post subject: Reply with quote
I also have a Tp Link Archer AC1750 C7 version 2. r47206 standard. But I don't have a button in services to enable local DNS. Maybe there is a dnsmasq option someone knows I could add after
bogus-priv
domain-needed
addn-hosts=/jffs/dnsmasq/mphosts
conf-file=/jffs/dnsmasq/mpdomains

But wait, when I run the script ./adblock.sh -2 -i ip=127.0.0.1
[INFO] Size of /tmp/mphosts.tmp: 28.4M
[INFO] Size of /tmp/mpdomains.tmp: 10.8M
[INFO] Size of /jffs/dnsmasq/mphosts: 17.0M
[INFO] Size of /jffs/dnsmasq/mpdomains: 0
Domains are not copied over unless ip is left as default. So I am able to get this partially working by omitting the conf-file. Any suggestions to get this fully working on Archer C7?
Sponsor
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 12859
Location: Texas, USA

PostPosted: Wed Nov 10, 2021 15:24    Post subject: Reply with quote
Add router address as local DNS server on main setup page; local DNS should be enabled by default.
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Pogo - A minimal level of ability is expected and needed...
At some point, people just get plain tired of this place.

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
sarahedmonds
DD-WRT Novice


Joined: 16 Nov 2021
Posts: 1

PostPosted: Tue Nov 16, 2021 3:55    Post subject: Reply with quote
I have a reasonably new router (AC1750, dd-wrt v3.0-r43904), and adblock.sh configured to use "blitz=0" lists. No Optware, Entware, etc.

I'm having a weird error when dnsmasq goes to start up. It invisibly exits, with error code 2, when the normal process starts. However, starting the process either in debug mode or in the foreground (-k) works perfectly fine. Any ideas or tips on trying to debug this?

Here is my generated config:

Code:
Code:
interface=br0
resolv-file=/tmp/resolv.dnsmasq
strict-order
dhcp-leasefile=/tmp/dnsmasq.leases
dhcp-lease-max=52
dhcp-option=br0,3,192.168.170.1
dhcp-authoritative
dhcp-range=br0,192.168.170.100,192.168.170.149,255.255.255.0,1440m
dhcp-host=30:9c:23:29:93:db,main-sl,192.168.170.25,60m
bogus-priv
conf-file=/etc/rfc6761.conf
stop-dns-rebind
dhcp-option=252,"\n"
# Having a large local cache speeds up subsequent DNS queries significantly (from several hundred msec to around 25-30)
# You may need to adjust this depending on the amount of free space you have
cache-size=10000
# This forces Dnsmasq to query each of the DNS servers below in the order they appear, rather than randomly (default)
strict-order
server=8.8.8.8 # Google DNS, but can be anything you prefer
server=8.8.4.4
conf-file=/jffs/dnsmasq/mpdomains
addn-hosts=/jffs/dnsmasq/mphosts
domain-needed
AbsenteeUser1
DD-WRT Novice


Joined: 10 Nov 2021
Posts: 3

PostPosted: Fri Nov 26, 2021 15:10    Post subject: Reply with quote
I went through all the hoops getting this up and running. One thing that threw me off others may find helpful is that the command " sh adblock.sh -s2 " works and is equivalent to the " ./ adblock.sh -s2 " used in the OP. I had to be able to use either command after testing multiple older (r36000 to r39000) builds on an wndr3700r4 and an archer c7v2 (ac1750).

What I can suggest is saving your config or jotting it down and trying some different (older) builds for your router. Don't reset after flashing and when you find a build that seems to work after some period, then reset to default.

I searched for methods to enable more detailed logging or how to look through (what to look for in) the directories on the router to debug certain processes and couldn't find anything useful and actually found that to get any more detailed logging is disabled or unavailable in dd-wrt.

I did a time cost benefit analysis and determined trying new builds would be faster than struggling to understand all the ins and outs of a dd-wrt process and how to debug it.

After bugs with different builds, I ended up getting it running nicely on a wndr3700r4 build r36410 with services:
-usb core support working
-/jffs and /opt mounted properly at each startup
-local DNS working and not overloading CPU
-Upnp working and not dying and restarting
-wireless tested working (but is disabled)
-mpdomains coping over to /jffs/dnsmasq/mpdomains after adblock.sh downloads it
-conf-file=/jffs/dnsmasq/mpdomains not overloading CPU after adding it to Services -> Additional Dnsmasq Options window.

Here is my dnsmasq.conf file:

interface=br0
resolv-file=/tmp/resolv.dnsmasq
strict-order
domain=gateway.sasktel.net
leasefile-ro
dhcp-script=/etc/lease_update.sh
dhcp-lease-max=99
dhcp-option=br0,3,192.168.1.254
dhcp-range=br0,192.168.1.1,192.168.1.99,255.255.255.0,9999m
bogus-priv
conf-file=/etc/rfc6761.conf
stop-dns-rebind
domain-needed
bind-interfaces
no-negcache
cache-size=2500
rebind-localhost-ok
addn-hosts=/jffs/dnsmasq/mphosts
conf-file=/jffs/dnsmasq/mpdomains

PS adding bogus-priv to the Services -> Additional Dnsmasq Options window causes a duplicate entry in /tmp/dnsmasq.conf and maybe should be removed in the OP or at least mentioned.


Last edited by AbsenteeUser1 on Fri Nov 26, 2021 15:17; edited 1 time in total
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 10088
Location: Netherlands

PostPosted: Fri Nov 26, 2021 15:17    Post subject: Reply with quote
If you start with: sh -x
(b)ash will enter debug mode

You can also set the following in the beginning of the script:
set -x

Have fun Smile

_________________
Routers:Netgear R7800, R6400v1, R6400v2, Linksys EA8500, EA6900 (XvortexCFE), E2000 (converted WRT320N), WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 12859
Location: Texas, USA

PostPosted: Fri Nov 26, 2021 18:24    Post subject: Reply with quote
Quote:
PS adding bogus-priv to the Services -> Additional Dnsmasq Options window causes a duplicate entry in /tmp/dnsmasq.conf and maybe should be removed in the OP or at least mentioned.

Indeed, this was a default config change that I was oblivious to until recently. The OP was written before this change, so tracking down the change and properly editing the OP to include delineating information on this specific "on build xxxxx and older, use this line and on build xxxxx and newer, do not use this line" annotation. I would do it, but I do not have the access to do so.

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Pogo - A minimal level of ability is expected and needed...
At some point, people just get plain tired of this place.

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
oliver44
DD-WRT User


Joined: 01 Jun 2016
Posts: 231

PostPosted: Sun Apr 17, 2022 8:08    Post subject: Reply with quote
Hello,

Linksys WRT1900ACS v2 DD-WRT v3.0-r48646

Which command should I use next, just exit?

how do i know if it works properly?

Code:

BusyBox v1.35.0 (2022-04-12 13:21:21 +07) built-in shell (ash)

root@DD-WRT:~# cd /jffs/dnsmasq/
root@DD-WRT:/jffs/dnsmasq# ./adblock.sh -?

USAGE:
        adblock.sh [-? | -h | --help] [-v | --version] [-1] [-2] [-b | --bl=<domain.name>] [-w | --wl=<domain.name>] ...

OPERATION:
        [-0]                            BLITZ=0: safe minimum protection
        [-1]                            BLITZ=1: increased protection [DEFAULT]
        [-2]                            BLITZ=2: optimum protection
        [-3]                            BLITZ=3: unlock maximum protection
        [-f]                            Block Facebook and Messenger services
        [-F]                            Block Facebook, Messenger, Instagram, WhatsApp
        [-d | -D]                       Ignore myblacklist/mywhitelist entries
        [--debug]                       Debug the script in case of errors
        [--wget]                        Force use of wget even if cURL is available
        [--remote=]remote.ip            Update your system remotely; default: 192.168.1.1
        [-b | --bl=]domain.name         Add domain.name to myblacklist
        [-w | --wl=]domain.name         Add domain.name to mywhitelist
        [-i | --ip=]ip.ad.dr.ss         Send ads to this IP; default: 0.1.2.3
        [-p | --pause]                  Pause protection
        [-r | --resume]                 Resume protection
        [-s | --secure]                 Use cURL CA certs for secure file transfer
        [-o | --offline]                Process local lists without downloading
        [-h | --help]                   Display this help screen and exit
        [-u | --update]                 Update adblock.sh to the latest version
        [-v | --version]                Print adblock.sh version and exit

EXAMPLES:
        adblock.sh -s2 --ip=172.31.255.254 --bl=example1.com --wl=example2.com
        adblock.sh -3Fqs -b example1.com -w example2.com --wl=example3.com
        adblock.sh -2f --remote=192.168.1.1

root@DD-WRT:/jffs/dnsmasq# ./adblock.sh -u
[PROC] Checking for updates.
[INFO] No updates available.
root@DD-WRT:/jffs/dnsmasq# ./adblock.sh --debug
======================================================
|                 adblock for DD-WRT                 |
|                 https://adblock.sh                 |
|       https://github.com/m-parashar/adblock        |
|           Copyright 2022 Manish Parashar           |
======================================================
             Sun Apr 17 11:50:46 EEST 2022
[INFO] VERSION: 20210308
[INFO] CMDARGS: --debug
[INFO] NETWORK: UP | MODE: ONLINE
[INFO] IP ADDRESS FOR ADS: 0.1.2.3
[INFO] SECURE [0=NO | 1=YES]: 0
[INFO] BLITZ LEVEL [0|1|2|3]: 1
+ '[' 0 -ne 1 ]
+ getcURLCerts
+ '[' '!' -s cacert.pem ]
+ lognecho '[PROC] Downloading / updating cURL certificate'
+ echo '[PROC] Downloading / updating cURL certificate'
[PROC] Downloading / updating cURL certificate
+ echo '[PROC] Downloading / updating cURL certificate'
+ curl -f -s -S -k --remote-name --time-cond cacert.pem https://curl.haxx.se/ca/cacert.pem
+ lognecho '[PROC] Creating mpdomains file'
+ echo '[PROC] Creating mpdomains file'
[PROC] Creating mpdomains file
+ echo '[PROC] Creating mpdomains file'
+ curl -f -s -S -k https://raw.githubusercontent.com/oznu/dns-zone-blacklist/master/dnsmasq/dnsmasq.blacklist
+ sed 's/0.0.0.0$/0.1.2.3/'
+ grep -vF -e :: -e ';' -e // -e http -e https -e @ -e mailto
+ grep -o '^[^#]*'
+ tr -cd '\000-\177'
+ grep -o '^[^#]*'
+ sed 's/0.0.0.0$/0.1.2.3/'
+ grep -vF -e :: -e ';' -e // -e http -e https -e @ -e mailto
+ tr -cd '\000-\177'
+ curl -f -s -S -k https://raw.githubusercontent.com/notracking/hosts-blocklists/master/domains.txt
+ curl -f -s -S -k+ sed 's/127.0.0.1$/0.1.2.3/'
 'https://pgl.yoyo.org/adservers/serverlist.php?hostformat=dnsmasq&showintro=0&mimetype=plaintext'
+ grep -vF -e :: -e ';' -e // -e http -e https -e @ -e mailto
+ grep -o '^[^#]*'
+ tr -cd '\000-\177'
+ lognecho '[PROC] Creating mphosts file'
+ echo '[PROC] Creating mphosts file'
[PROC] Creating mphosts file
+ echo '[PROC] Creating mphosts file'
+ lognecho '[PROC] Processing StevenBlack lists'
+ echo '[PROC] Processing StevenBlack lists'
[PROC] Processing StevenBlack lists
+ echo '[PROC] Processing StevenBlack lists'
+ curl -f -s -S -k https://raw.githubusercontent.com/StevenBlack/hosts/master/hosts+ awk '{print $2}'

+ grep -vF -e :: -e ';' -e // -e http -e https -e @ -e mailto
+ grep -o '^[^#]*'
+ tr -cd '\000-\177'
+ lognecho '[PROC] Processing notracking blocklists'
+ echo '[PROC] Processing notracking blocklists'
[PROC] Processing notracking blocklists
+ echo '[PROC] Processing notracking blocklists'
+ curl -f -s -S -k+ awk '{print $2}'
 https://raw.githubusercontent.com/notracking/hosts-blocklists/master/hostnames.txt+ grep -vF -e :: -e
 ';'+ tr -cd '\000-\177'
 -e // -e http -e https -e @ -e mailto
+ grep -o '^[^#]*'
+ lognecho '[PROC] Processing Disconnect.me lists'
+ echo '[PROC] Processing Disconnect.me lists'
[PROC] Processing Disconnect.me lists
+ echo '[PROC] Processing Disconnect.me lists'
+ curl -f -s -S -k https://s3.amazonaws.com/lists.disconnect.me/simple_ad.txt
+ grep -vF -e :: -e ';' -e // -e http -e https -e @ -e mailto
+ + tr -cd '\000-\177'
grep -o '^[^#]*'
+ grep+  -o '^[^#]*'
grep -vF -e :: -e ';' -e // -e http -e https -e @ -e mailto
+ tr -cd '\000-\177'
+ curl -f -s -S -k https://s3.amazonaws.com/lists.disconnect.me/simple_malware.txt
+ curl -f+  -s -S -k https://s3.amazonaws.com/lists.disconnect.me/simple_tracking.txt
grep -vF -e :: -e ';' -e // -e http -e https -e @ -e mailto
+ grep -o '^[^#]*'
+ tr -cd '\000-\177'
+ grep -o '^[^#]*'+ grep -vF -e :: -e ';' -e // -e http -e https -e @ -e mailto

+ + tr -cd '\000-\177'
curl -f -s -S -k https://s3.amazonaws.com/lists.disconnect.me/simple_malvertising.txt
+ lognecho '[PROC] Processing quidsup/notrack lists'
+ echo '[PROC] Processing quidsup/notrack lists'
[PROC] Processing quidsup/notrack lists
+ echo '[PROC] Processing quidsup/notrack lists'
+ grep -o '^[^#]*'
+ grep -vF -e :: -e ';' -e // -e http -e https -e @ -e mailto
+ tr -cd+ curl -f -s -S -k https://gitlab.com/quidsup/notrack-blocklists/raw/master/notrack-blocklist.txt
 '\000-\177'
+ curl -f -s+ grep -vF -e :: -e ';' -e // -e http -e https -e @ -e mailto
 -S -k https://gitlab.com/quidsup/notrack-blocklists/raw/master/notrack-malware.txt
+ grep -o '^[^#]*'
+ tr -cd '\000-\177'
+ lognecho '[PROC] Processing FrogEye lists'
+ echo '[PROC] Processing FrogEye lists'
[PROC] Processing FrogEye lists
+ echo '[PROC] Processing FrogEye lists'
+ grep -o '^[^#]*'
+ grep -vF -e :: -e ';' -e // -e http -e https -e @ -e mailto
+ + curl -f -s -S -k https://hostfiles.frogeye.fr/firstparty-trackers.txt
tr -cd '\000-\177'
+ curl -f -s+ grep -vF -e :: -e ';' -e // -e http -e https -e @ -e mailto
 -S -k https://hostfiles.frogeye.fr/multiparty-trackers.txt
+ grep -o '^[^#]*'
+ tr -cd '\000-\177'
+ lognecho '[PROC] Processing adaway list'
+ echo '[PROC] Processing adaway list'
[PROC] Processing adaway list
+ echo '[PROC] Processing adaway list'
+ grep -o '^[^#]*'+ curl -f -s -S -k https://adaway.org/hosts.txt

+ awk '{print $2}'
+ grep -vF -e :: -e ';' -e // -e http -e https -e @ -e mailto
+ tr -cd '\000-\177'
+ '[' 1 -ge 1 ]
+ lognecho '[PROC] Unlocking BLITZ=1 level lists'
+ echo '[PROC] Unlocking BLITZ=1 level lists'
[PROC] Unlocking BLITZ=1 level lists
+ echo '[PROC] Unlocking BLITZ=1 level lists'
+ lognecho '[PROC] Processing more StevenBlack lists'
+ echo '[PROC] Processing more StevenBlack lists'
[PROC] Processing more StevenBlack lists
+ echo '[PROC] Processing more StevenBlack lists'
+ grep -o '^[^#]*'
+ awk+  '{print $2}'
grep -vF -e :: -e ';' -e // -e http -e https -e @+  -e mailto
tr -cd '\000-\177'
+ curl -f -s -S -k https://raw.githubusercontent.com/StevenBlack/hosts/master/data/add.2o7Net/hosts
+ curl -f -s -S -k+ awk '{print $2}'
 https://raw.githubusercontent.com/StevenBlack/hosts/master/data/add.Risk/hosts+ grep -vF
 -e+ tr -cd '\000-\177'
+ grep -o '^[^#]*'
 :: -e ';' -e // -e http -e https -e @ -e mailto
+ grep -o '^[^#]*'+ awk '{print $2}'

+ grep -vF -e :: -e ';' -e // -e http -e https -e @+ tr -e mailto
 -cd+ curl -f -s -S -k https://raw.githubusercontent.com/StevenBlack/hosts/master/data/add.Spam/hosts
 '\000-\177'
+ lognecho '[PROC] Processing pgl.yoyo.org list'
+ echo '[PROC] Processing pgl.yoyo.org list'
[PROC] Processing pgl.yoyo.org list
+ echo '[PROC] Processing pgl.yoyo.org list'
+ grep -o '^[^#]*'+ awk '{print $2}'

+ + curl+ tr -f -s -S -k 'https://pgl.yoyo.org/adservers/serverlist.php?hostformat=unixhosts&showintro=0&mimetype=plaintext'
grep -vF -e :: -e ';' -e // -e http -e https -e @ -e mailto
 -cd '\000-\177'
+ lognecho '[PROC] Processing Securemecca list'
+ echo '[PROC] Processing Securemecca list'
[PROC] Processing Securemecca list
+ echo '[PROC] Processing Securemecca list'
+ grep -o '^[^#]*'
+ + awk '{print $2}'
grep -vF -e :: -e ';' -e // -e http -e https -e @ -e mailto
+ tr -cd '\000-\177'
+ curl -f -s -S -k https://hostsfile.org/Downloads/hosts.txt
+ lognecho '[PROC] Processing cryptomining and porn lists'
+ echo '[PROC] Processing cryptomining and porn lists'
[PROC] Processing cryptomining and porn lists
+ echo '[PROC] Processing cryptomining and porn lists'
+ grep -o '^[^#]*'
+ grep -vF -e :: -e ';' -e // -e http -e https -e @ -e mailto+ tr -cd '\000-\177'

+ curl -f -s -S -k https://raw.githubusercontent.com/Marfjeh/coinhive-block/master/domains
+ curl -f -s -S -k+ awk '{print $2}'
 https://zerodot1.gitlab.io/CoinBlockerLists/hosts+ grep -vF -e :: -e ';' -e // -e http -e https -e @ -e mailto

+ grep -o '^[^#]*'
+ tr -cd '\000-\177'
+ grep -o '^[^#]*'+ awk '{print $2}'

+ grep -vF -e :: -e+ tr ';' -e // -e http -e https -e @ -e mailto
 -cd '\000-\177'+
curl -f -s -S -k https://raw.githubusercontent.com/hoshsadiq/adblock-nocoin-list/master/hosts.txt
+ curl -f -s+ grep -vF -e :: -e ';' -e // -e http -e https -e @ -e mailto
 -S -k https://raw.githubusercontent.com/chadmayfield/my-pihole-blocklists/master/lists/pi_blocklist_porn_top1m.list
+ grep -o '^[^#]*'
+ tr -cd '\000-\177'
+ lognecho '[PROC] Processing Easylist & w3kbl lists'
+ echo '[PROC] Processing Easylist & w3kbl lists'
[PROC] Processing Easylist & w3kbl lists
+ echo '[PROC] Processing Easylist & w3kbl lists'
+ curl -f -s+ grep -vF -e :: -e ';' -e // -e http -e https -e @ -e mailto
 -S -k https://v.firebog.net/hosts/AdguardDNS.txt
+ grep -o '^[^#]*'
+ tr -cd '\000-\177'
+ grep -o+ grep -vF -e :: -e ';' -e // -e http -e https -e @ -e mailto
 '^[^#]*'
+ + tr -cd '\000-\177'
curl -f -s -S -k https://v.firebog.net/hosts/Airelle-hrsk.txt
curl: (22) The requested URL returned error: 404
+ grep -o+ grep -vF -e :: -e ';' -e // -e http -e https -e @ -e mailto
 '^[^#]*'
+ + curl -f -s -S -k https://v.firebog.net/hosts/Airelle-trc.txt
tr -cd '\000-\177'
curl: (22) The requested URL returned error: 404
+ curl -f -s+  -S -k https://v.firebog.net/hosts/BillStearns.txt
grep -vF -e :: -e ';' -e // -e http -e https -e @ -e mailto
+ grep -o '^[^#]*'
+ tr -cd '\000-\177'
+ grep -o+ grep -vF -e :: -e ';' -e // -e http -e https -e @ -e mailto
 '^[^#]*'
+ + tr -cd '\000-\177'
curl -f -s -S -k https://v.firebog.net/hosts/Easylist.txt
+ curl -f+ grep -vF -e :: -e ';' -e // -e http -e https -e @ -e mailto
 -s -S -k https://v.firebog.net/hosts/Easyprivacy.txt
+ grep -o '^[^#]*'
+ tr -cd '\000-\177'
+ grep -o+ grep -vF -e :: -e ';' -e // -e http -e https -e @ -e mailto
 '^[^#]*'
+ + tr -cd '\000-\177'
curl -f -s -S -k https://v.firebog.net/hosts/Prigent-Ads.txt
+ curl -f+  -s -S+  -k https://v.firebog.net/hosts/Prigent-Malware.txt
grep -o '^[^#]*'
grep -vF -e :: -e ';' -e // -e http -e https -e @ -e mailto
+ tr -cd '\000-\177'
+ grep -o+ grep -vF -e :: -e ';' -e // -e http -e https -e @ -e mailto
 '^[^#]*'
+ + tr -cd '\000-\177'
curl -f -s -S -k https://v.firebog.net/hosts/Prigent-Phishing.txt
+ curl -f+  -s -S -k https://v.firebog.net/hosts/Shalla-mal.txt
grep -vF -e :: -e ';' -e // -e http -e https -e @ -e mailto
+ grep -o '^[^#]*'
+ tr -cd '\000-\177'
+ curl -f -s+ grep -vF -e :: -e ';' -e // -e http -e https -e @ -e mailto
 -S -k https://v.firebog.net/hosts/static/w3kbl.txt
+ grep -o '^[^#]*'
+ tr -cd '\000-\177'
+ '[' 1 -ge 2 ]
+ '[' 1 -ge 3 ]
+ '[' 0 '=' f ]
+ '[' 0 '=' F ]
+ '[' '!' -s /tmp/mphosts.tmp ]
+ lognecho '[PROC] Updating official blacklist/whitelist files'
+ echo '[PROC] Updating official blacklist/whitelist files'
[PROC] Updating official blacklist/whitelist files
+ echo '[PROC] Updating official blacklist/whitelist files'
+ + grep -vF -e :: -e ';' -e // -e http -e https -e @ -e mailto
curl -f -s -S -k https://raw.githubusercontent.com/m-parashar/adblock/master/blacklists/blacklist
+ grep -o '^[^#]*'
+ tr -cd '\000-\177'
+ grep -o+ grep -vF -e :: -e ';' -e // -e http -e https -e @ -e mailto
 '^[^#]*'
+ + tr -cd '\000-\177'
curl -f -s -S -k https://raw.githubusercontent.com/m-parashar/adblock/master/whitelists/whitelist
+ which uudecode
+ '[' -n /usr/bin/uudecode ]
+ curl -f -s -S -k https://raw.githubusercontent.com/m-parashar/adblock/master/whitelists/fruitydomains.uudecode
+ LC_ALL=C uudecode /jffs/dnsmasq/base64wl
+ cat applewhitelist
+ rm applewhitelist
+ rm /jffs/dnsmasq/base64wl
+ '[' 1 -eq 0 ]
+ printFileSize /tmp/mphosts.tmp
+ du+ awk '{print $1}'
 -h /tmp/mphosts.tmp
+ lognecho '[INFO] Size of /tmp/mphosts.tmp: 16.7M'
+ echo '[INFO] Size of /tmp/mphosts.tmp: 16.7M'
[INFO] Size of /tmp/mphosts.tmp: 16.7M
+ echo '[INFO] Size of /tmp/mphosts.tmp: 16.7M'
+ printFileSize /tmp/mpdomains.tmp
+ du+ awk '{print $1}'
 -h /tmp/mpdomains.tmp
+ lognecho '[INFO] Size of /tmp/mpdomains.tmp: 8.2M'
+ echo '[INFO] Size of /tmp/mpdomains.tmp: 8.2M'
[INFO] Size of /tmp/mpdomains.tmp: 8.2M
+ echo '[INFO] Size of /tmp/mpdomains.tmp: 8.2M'
+ lognecho '[PROC] Processing blacklist/whitelist files'
+ echo '[PROC] Processing blacklist/whitelist files'
[PROC] Processing blacklist/whitelist files
+ echo '[PROC] Processing blacklist/whitelist files'
+ LC_ALL=C cat /jffs/dnsmasq/blacklist
+ sort
+ uniq
+ sed -r 's/^[[:blank:]]*//; s/[[:blank:]]*$//; s/^[[:punct:]]*//; s/[[:punct:]]*$//; /^$/d; /^\s*$/d'
+ cp TMP_BLACKLIST /jffs/dnsmasq/blacklist
+ LC_ALL=C cat /jffs/dnsmasq/whitelist+ sort

+ sed -r 's/^[[:blank:]]*//; s/[[:blank:]]*$//; s/^[[:punct:]]*//; s/[[:punct:]]*$//; /^$/d; /^\s*$/d'
+ uniq
+ cp TMP_WHITELIST /jffs/dnsmasq/whitelist
+ '[' 0 -eq 0 ]
+ '[' -s /jffs/dnsmasq/myblacklist ]
+ '[' -s /jffs/dnsmasq/mywhitelist ]
+ lognecho '[PROC] Processing final mphosts/mpdomains files'
+ echo '[PROC] Processing final mphosts/mpdomains files'
[PROC] Processing final mphosts/mpdomains files
+ echo '[PROC] Processing final mphosts/mpdomains files'
+ LC_ALL=C cat /tmp/mphosts.tmp
+ cat TMP_BLACKLIST -
+ + awk -v 'IP=0.1.2.3' '{sub(/\r$/,""); print IP" "$0}'
sort
+ uniq
+ grep -Fvwf TMP_WHITELIST
+ sed -r 's/^[[:blank:]]*//; s/[[:blank:]]*$//; s/^[[:punct:]]*//; s/[[:punct:]]*$//; /^$/d; /^\s*$/d'
^C
root@DD-WRT:/jffs/dnsmasq#



adblock.PNG
 Description:
 Filesize:  19.07 KB
 Viewed:  1178 Time(s)

adblock.PNG



_________________
Internet provider https://en.wikipedia.org/wiki/RCS_%26_RDS RCS & RDS 1Gbps
Linksys WRT1900ACS v.2 -OpenWrt/DD-WRT
WDR3600 rev.1.5 - OpenWrt
oliver44
DD-WRT User


Joined: 01 Jun 2016
Posts: 231

PostPosted: Sun Apr 17, 2022 9:19    Post subject: Reply with quote
if I use conf-file = / jffs / dnsmasq / mpdomains in Additional Dnsmasq Options the internet no longer works.

where is the problem?



Capture.PNG
 Description:
 Filesize:  24.35 KB
 Viewed:  1162 Time(s)

Capture.PNG



_________________
Internet provider https://en.wikipedia.org/wiki/RCS_%26_RDS RCS & RDS 1Gbps
Linksys WRT1900ACS v.2 -OpenWrt/DD-WRT
WDR3600 rev.1.5 - OpenWrt
oliver44
DD-WRT User


Joined: 01 Jun 2016
Posts: 231

PostPosted: Sun Apr 17, 2022 15:11    Post subject: Reply with quote
Code:
Jan 1 02:00:24 DD-WRT user.info : [radvd] : RADVD daemon successfully started
Jan 1 02:00:24 DD-WRT user.info : [dropbear] : ssh daemon successfully started
Jan 1 02:00:24 DD-WRT authpriv.info dropbear[1363]: Running in background
Jan 1 02:00:24 DD-WRT user.info : [wland] : daemon successfully started
Jan 1 02:00:24 DD-WRT user.info : [cron] : daemon successfully started
Jan 1 02:00:24 DD-WRT cron.info cron[1368]: (CRON) STARTUP (fork ok)
Jan 1 02:00:24 DD-WRT daemon.info dnsmasq[1380]: started, version 2.87test8 cachesize 1500
Jan 1 02:00:24 DD-WRT daemon.info dnsmasq[1380]: compile time options: IPv6 GNU-getopt no-DBus no-UBus no-i18n no-IDN DHCP DHCPv6 no-Lua no-TFTP no-conntrack ipset no-nftset no-auth cryptohash DNSSEC loop-detect inotify no-dumpfile
Jan 1 02:00:24 DD-WRT daemon.info dnsmasq-dhcp[1380]: DHCP, IP range 192.168.1.64 -- 192.168.1.159, lease time 1d
Jan 1 02:00:24 DD-WRT user.info : [dnsmasq] : daemon successfully started
Jan 1 02:00:24 DD-WRT daemon.info dnsmasq[1380]: using only locally-known addresses for test
Jan 1 02:00:24 DD-WRT daemon.info dnsmasq[1380]: using only locally-known addresses for onion
Jan 1 02:00:24 DD-WRT daemon.info dnsmasq[1380]: using only locally-known addresses for localhost
Jan 1 02:00:24 DD-WRT daemon.info dnsmasq[1380]: using only locally-known addresses for local
Jan 1 02:00:24 DD-WRT daemon.info dnsmasq[1380]: using only locally-known addresses for invalid
Jan 1 02:00:24 DD-WRT daemon.info dnsmasq[1380]: using only locally-known addresses for bind
Jan 1 02:00:24 DD-WRT daemon.warn dnsmasq[1380]: no servers found in /tmp/resolv.dnsmasq, will retry
Jan 1 02:00:24 DD-WRT daemon.info dnsmasq[1380]: read /etc/hosts - 2 addresses
Jan 1 02:00:24 DD-WRT daemon.err dnsmasq[1380]: failed to load names from /jffs/dnsmasq/mphosts: No such file or directory
Jan 1 02:00:25 DD-WRT daemon.info pppd[1526]: Plugin /usr/lib/rp-pppoe.so loaded.
Jan 1 02:00:25 DD-WRT daemon.notice pppd[1528]: pppd 2.4.8 started by root, uid 0
Jan 1 02:00:25 DD-WRT user.info : [ppp_redial] : redial process successfully started
Jan 1 02:00:25 DD-WRT user.info : [ttraff] : traffic counter daemon successfully started
Jan 1 02:00:25 DD-WRT user.info : [radio_timer] : radio timer daemon successfully started
Jan 1 02:00:25 DD-WRT daemon.info httpd[1538]: [httpd] : httpd server started at port 80
Jan 1 02:00:25 DD-WRT user.info : [httpd] : http daemon successfully started
Jan 1 02:00:25 DD-WRT user.info : [resetbutton] : daemon successfully stopped
Jan 1 02:00:25 DD-WRT user.info : [resetbutton] : resetbutton daemon successfully started
Jan 1 02:00:26 DD-WRT user.info : [httpd] : daemon successfully stopped
Jan 1 02:00:26 DD-WRT daemon.info httpd[1544]: [httpd] : httpd server shutdown
Jan 1 02:00:26 DD-WRT daemon.info httpd[1565]: [httpd] : httpd server started at port 80
Jan 1 02:00:26 DD-WRT user.info : [httpd] : http daemon successfully started
Jan 1 02:00:27 DD-WRT daemon.info pppd[1528]: Using interface ppp0
Jan 1 02:00:27 DD-WRT daemon.notice pppd[1528]: Connect: ppp0 <--> eth0
Jan 1 02:00:29 DD-WRT user.notice WDS_Watchdog[1698]: Started
Jan 1 02:00:30 DD-WRT daemon.notice pppd[1528]: PAP authentication succeeded
Jan 1 02:00:30 DD-WRT daemon.notice pppd[1528]: peer from calling number  authorized
Jan 1 02:00:30 DD-WRT daemon.notice pppd[1528]: local IP address
Jan 1 02:00:30 DD-WRT daemon.notice pppd[1528]: remote IP address 10.0.0.1
Jan 1 02:00:30 DD-WRT daemon.notice pppd[1528]: primary DNS address
Jan 1 02:00:30 DD-WRT daemon.notice pppd[1528]: secondary DNS address
Jan 1 02:00:30 DD-WRT daemon.info dnsmasq[1380]: reading /tmp/resolv.dnsmasq
Jan 1 02:00:30 DD-WRT daemon.info dnsmasq[1380]: using nameserver #53
Jan 1 02:00:30 DD-WRT daemon.info dnsmasq[1380]: using nameserver #53
Jan 1 02:00:30 DD-WRT daemon.info dnsmasq[1380]: using only locally-known addresses for test
Jan 1 02:00:30 DD-WRT daemon.info dnsmasq[1380]: using only locally-known addresses for onion
Jan 1 02:00:30 DD-WRT daemon.info dnsmasq[1380]: using only locally-known addresses for localhost
Jan 1 02:00:30 DD-WRT daemon.info dnsmasq[1380]: using only locally-known addresses for local
Jan 1 02:00:30 DD-WRT daemon.info dnsmasq[1380]: using only locally-known addresses for invalid
Jan 1 02:00:30 DD-WRT daemon.info dnsmasq[1380]: using only locally-known addresses for bind
Jan 1 02:00:30 DD-WRT daemon.info dnsmasq[1380]: read /etc/hosts - 2 addresses
Jan 1 02:00:30 DD-WRT daemon.err dnsmasq[1380]: failed to load names from /jffs/dnsmasq/mphosts: No such file or directory
Jan 1 02:00:30 DD-WRT daemon.notice pppd[1528]: local LL address
Jan 1 02:00:30 DD-WRT daemon.notice pppd[1528]: remote LL address
Jan 1 02:00:30 DD-WRT user.info : [wland] : daemon successfully stopped
Jan 1 02:00:30 DD-WRT user.info : [wland] : daemon successfully started
Jan 1 02:00:30 DD-WRT user.info : [wan] : WAN is up. IP: 86.124.111.107
Jan 1 02:00:30 DD-WRT user.info : [dnsmasq] : daemon successfully stopped
Jan 1 02:00:30 DD-WRT daemon.info dnsmasq[1380]: exiting on receipt of SIGTERM
Jan 1 02:00:30 DD-WRT daemon.info dnsmasq[1735]: started, version 2.87test8 cachesize 1500
Jan 1 02:00:30 DD-WRT daemon.info dnsmasq[1735]: compile time options: IPv6 GNU-getopt no-DBus no-UBus no-i18n no-IDN DHCP DHCPv6 no-Lua no-TFTP no-conntrack ipset no-nftset no-auth cryptohash DNSSEC loop-detect inotify no-dumpfile
Jan 1 02:00:30 DD-WRT daemon.info dnsmasq-dhcp[1735]: DHCP, IP range 192.168.1.64 -- 192.168.1.159, lease time 1d
Jan 1 02:00:30 DD-WRT daemon.info dnsmasq[1735]: using only locally-known addresses for test
Jan 1 02:00:30 DD-WRT daemon.info dnsmasq[1735]: using only locally-known addresses for onion
Jan 1 02:00:30 DD-WRT daemon.info dnsmasq[1735]: using only locally-known addresses for localhost
Jan 1 02:00:30 DD-WRT daemon.info dnsmasq[1735]: using only locally-known addresses for local
Jan 1 02:00:30 DD-WRT daemon.info dnsmasq[1735]: using only locally-known addresses for invalid
Jan 1 02:00:30 DD-WRT daemon.info dnsmasq[1735]: using only locally-known addresses for bind
Jan 1 02:00:30 DD-WRT user.info : [dnsmasq] : daemon successfully started
Jan 1 02:00:30 DD-WRT daemon.info dnsmasq[1735]: reading /tmp/resolv.dnsmasq
Jan 1 02:00:30 DD-WRT daemon.info dnsmasq[1735]: using nameserver #53
Jan 1 02:00:30 DD-WRT daemon.info dnsmasq[1735]: using nameserver #53
Jan 1 02:00:30 DD-WRT daemon.info dnsmasq[1735]: using only locally-known addresses for test
Jan 1 02:00:30 DD-WRT daemon.info dnsmasq[1735]: using only locally-known addresses for onion
Jan 1 02:00:30 DD-WRT daemon.info dnsmasq[1735]: using only locally-known addresses for localhost
Jan 1 02:00:30 DD-WRT daemon.info dnsmasq[1735]: using only locally-known addresses for local
Jan 1 02:00:30 DD-WRT daemon.info dnsmasq[1735]: using only locally-known addresses for invalid
Jan 1 02:00:30 DD-WRT daemon.info dnsmasq[1735]: using only locally-known addresses for bind
Jan 1 02:00:30 DD-WRT daemon.info dnsmasq[1735]: read /etc/hosts - 2 addresses
Jan 1 02:00:30 DD-WRT daemon.err dnsmasq[1735]: failed to load names from /jffs/dnsmasq/mphosts: No such file or directory
Jan 1 02:00:30 DD-WRT user.info : [radvd] : daemon successfully stopped
Jan 1 02:00:30 DD-WRT daemon.warn radvd[1352]: exiting, 1 sigterm(s) received
Jan 1 02:00:30 DD-WRT daemon.info radvd[1352]: sending stop adverts
Jan 1 02:00:30 DD-WRT daemon.info radvd[1352]: removing /var/run/radvd.pid
Jan 1 02:00:30 DD-WRT daemon.info radvd[1352]: returning from radvd main
Jan 1 02:00:30 DD-WRT daemon.info radvd[1736]: version 2.19 started
Jan 1 02:00:30 DD-WRT user.info : [radvd] : RADVD daemon successfully started
Jan 1 02:00:30 DD-WRT user.info : [vpn modules] : vpn modules successfully unloaded
Jan 1 02:00:30 DD-WRT user.info : [vpn modules] : nf_conntrack_proto_gre successfully loaded
Jan 1 02:00:30 DD-WRT user.info : [vpn modules] : nf_nat_proto_gre successfully loaded
Jan 1 02:00:30 DD-WRT user.info : [vpn modules] : nf_conntrack_pptp successfully loaded
Jan 1 02:00:30 DD-WRT user.info : [vpn modules] : nf_nat_pptp successfully loaded
Jan 1 02:00:30 DD-WRT user.info : [process_monitor] : successfully started
Jan 1 02:00:32 DD-WRT user.info : [cron] : daemon successfully stopped
Jan 1 02:00:33 DD-WRT user.info : [cron] : daemon successfully started
Jan 1 02:00:33 DD-WRT cron.info cron[2006]: (CRON) STARTUP (fork ok)
Jan 1 02:00:33 DD-WRT daemon.debug ntpclient[1911]: Connecting to 2.pool.ntp.org [] ...
Apr 17 18:05:43 DD-WRT daemon.info ntpclient[1911]: Time set from 2.pool.ntp.org [].
Apr 17 18:05:43 DD-WRT daemon.info process_monitor[1910]: cyclic NTP Update success (servers 2.pool.ntp.org )
Apr 17 18:05:43 DD-WRT user.info : [cron] : daemon successfully stopped

_________________
Internet provider https://en.wikipedia.org/wiki/RCS_%26_RDS RCS & RDS 1Gbps
Linksys WRT1900ACS v.2 -OpenWrt/DD-WRT
WDR3600 rev.1.5 - OpenWrt
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 10088
Location: Netherlands

PostPosted: Sun Apr 17, 2022 15:50    Post subject: Reply with quote
DNSMasq cannot start :

Quote:
Jan 1 02:00:30 DD-WRT daemon.err dnsmasq[1380]: failed to load names from /jffs/dnsmasq/mphosts: No such file or directory

_________________
Routers:Netgear R7800, R6400v1, R6400v2, Linksys EA8500, EA6900 (XvortexCFE), E2000 (converted WRT320N), WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
oliver44
DD-WRT User


Joined: 01 Jun 2016
Posts: 231

PostPosted: Mon Apr 18, 2022 14:01    Post subject: Reply with quote
egc wrote:
DNSMasq cannot start :

Quote:
Jan 1 02:00:30 DD-WRT daemon.err dnsmasq[1380]: failed to load names from /jffs/dnsmasq/mphosts: No such file or directory


How do I solve this problem?

_________________
Internet provider https://en.wikipedia.org/wiki/RCS_%26_RDS RCS & RDS 1Gbps
Linksys WRT1900ACS v.2 -OpenWrt/DD-WRT
WDR3600 rev.1.5 - OpenWrt
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 10088
Location: Netherlands

PostPosted: Mon Apr 18, 2022 16:18    Post subject: Reply with quote
The adblock script should make that host file.

So simply check if it is there.

when you were running the script (some posts above) it ended in:
^C
Meaning the executing was aborted, and making the mphosts file is the last step.

Such host files can be extremely large and most scripts clean for double entries, garbage etc so running a script like this can take a loooong time.

But it is just guessing I do not know the script

_________________
Routers:Netgear R7800, R6400v1, R6400v2, Linksys EA8500, EA6900 (XvortexCFE), E2000 (converted WRT320N), WRT54GS v1.
Install guide R6400v2, R6700v3,XR300:https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=316399
Install guide R7800/XR500: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=320614
Forum Guide Lines (important read):https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=324087
tsokdak
DD-WRT Novice


Joined: 17 May 2022
Posts: 1

PostPosted: Tue May 17, 2022 20:19    Post subject: Re: Adblock for DD-WRT (version 2) Reply with quote
don't have anything to say just want the openVPN guide which requires me to post at least once. feel free to delete this..
oliver44
DD-WRT User


Joined: 01 Jun 2016
Posts: 231

PostPosted: Sun May 29, 2022 7:03    Post subject: Reply with quote
HEllo all,

router wrt1900acs v2
firmware: DD-WRT v3.0-r48971
4GB USB drive.
Partitioned, formatted, and mounted as swap (512MB), /jffs (12GB), and /opt (1GB)
adblock 20220518 unlock maximum protection


With the above information and settings this version fails to make 100% in the adblock test https://d3ward.github.io/toolz/adblock.html, and on the wifi side I noticed that it doesn't work.
I missed some settings, where is the problem?



adblock1.PNG
 Description:
 Filesize:  31.87 KB
 Viewed:  681 Time(s)

adblock1.PNG



adblock2.PNG
 Description:
 Filesize:  166.05 KB
 Viewed:  682 Time(s)

adblock2.PNG



adblock.PNG
 Description:
 Filesize:  23.61 KB
 Viewed:  682 Time(s)

adblock.PNG



_________________
Internet provider https://en.wikipedia.org/wiki/RCS_%26_RDS RCS & RDS 1Gbps
Linksys WRT1900ACS v.2 -OpenWrt/DD-WRT
WDR3600 rev.1.5 - OpenWrt
05dyna
DD-WRT Guru


Joined: 25 Jan 2008
Posts: 966

PostPosted: Sun May 29, 2022 15:51    Post subject: Reply with quote
oliver44 wrote:


With the above information and settings this version fails to make 100% in the adblock test https://d3ward.github.io/toolz/adblock.html, and on the wifi side I noticed that it doesn't work.

I missed some settings, where is the problem?


this is probably not want you want to hear but I was able to get 100% with Pihole. I stated out at 89% blocked from my existing block list and I then blacklisted the remaining ones that weren't blocked. good luck I know ads are a PIA



Screenshot 2022-05-29 at 11-31-58 Ad Blocker Test.png
 Description:
 Filesize:  32.9 KB
 Viewed:  647 Time(s)

Screenshot 2022-05-29 at 11-31-58 Ad Blocker Test.png


Goto page Previous  1, 2, 3 ... , 21, 22, 23  Next Display posts from previous:    Page 22 of 23
Post new topic   Reply to topic    DD-WRT Forum Index -> General Questions 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