Adblock for DD-WRT (version 2)

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


Joined: 25 Jan 2017
Posts: 110

PostPosted: Sat Apr 11, 2020 5:28    Post subject: Reply with quote
Jay461 wrote:
=RESOLVED=

I was able to get HBOGO working again by whitelisting telegraph.api.hbo.com

Code

./adbhostgen.sh --wl=telegraph.api.hbo.com


Thank you for reporting and fixing it. Domain whitelisted in the official file.

Moose wrote:
Yamaraj,

I tried the new VERSION: 20200407 on the the old Kong Firmware: DD-WRT v3.0-r39855M std (05/25/19) and still had the problom curl: (28). Since Kong stopped doing DD-WRT Firmware I switched over to Firmware: DD-WRT v3.0-r40559 std (08/06/19) thinking maybe this would fix it but still getting: curl: (28) Connection timed out after 300469 milliseconds.

I'm a NOOB to all this so sorry for the question just not sure what the curl does. I've attached a pictures.

Thank you for all your help.
Moose

Fixed. Not in the script, but the whitelist. mine.nu was inaccessible. Running the script again should download the official whitelist automatically and whitelist the domain. However, blocklist downloads are attempted before the whitelist is updated and processed, so this might take two runs.

_________________

Routers
NETGEAR R7800 x2: DD-WRT v3.0-r42847 std (04/06/20)
NETGEAR R8500: DD-WRT v3.0-r41517 std (11/11/19)

Scripts
Adblock.sh on DD-WRT (v2) -- Github | Website
Ad-blocking on DD-WRT (v1) -- Github
Sponsor
joedow
DD-WRT Novice


Joined: 11 Feb 2018
Posts: 46

PostPosted: Mon Apr 13, 2020 6:45    Post subject: Reply with quote
hi Yamaraj,

sorry for reporting another problem: Adblocker is not working for me.

The new version, i could install it now, made it run, it generates the files with no errors. I made conf edits in GUI just like the tutorial on first page.

Made a fresh install, resseting the router settings. Build is stable 40559, router is TP LInk Archer C5.

Still is like the adblocker is not there. I get ads all over my network.

Please tell me what more info you need to find out the cause and fix it.

Thank You, Joe
Moose
DD-WRT Novice


Joined: 03 May 2008
Posts: 9

PostPosted: Tue Apr 14, 2020 20:19    Post subject: Reply with quote
Thank you kernel-panic69 and Yamaraj. It's working now.

Thanks
cursemex
DD-WRT Novice


Joined: 15 Dec 2014
Posts: 48

PostPosted: Mon Apr 20, 2020 1:16    Post subject: Reply with quote
joedow wrote:
hi Yamaraj,

sorry for reporting another problem: Adblocker is not working for me.

The new version, i could install it now, made it run, it generates the files with no errors. I made conf edits in GUI just like the tutorial on first page.

Made a fresh install, resseting the router settings. Build is stable 40559, router is TP LInk Archer C5.

Still is like the adblocker is not there. I get ads all over my network.

Please tell me what more info you need to find out the cause and fix it.

Thank You, Joe


It's works. I notice it more on my phone when browsing than on my desktop though.

Yamaraj wrote:

This script, like Pi-Hole and others, operates at domain level not on page elements and as such cannot use those lists. Although quite effective, it cannot block 100% of ads, especially those leveraging browser features like Javascript, frames etc. For that adding another layer of protection like uBlock Origin is recommended.


As he said, try to add uBlock origin to your browser. I personally use nano adblocker, which is based on uBlock.

I haven't tried it myself, but if you have time try to play with the BLITZ level(Increase it to 2 or 3). I'd be interested to hear your results if you do so Very Happy
joedow
DD-WRT Novice


Joined: 11 Feb 2018
Posts: 46

PostPosted: Mon Apr 20, 2020 4:58    Post subject: Reply with quote
Hi guys,

Today i regenerated with the -2 blitz level and it seems to work better. Any ideea why lvl 2 is better than lvl 3 for me?
I always check first on speedtest.net. Eith lvl 3 blitz is full of ads. With lvl 2 no ads.

Just a thought: whouldnt be easyer just to copy these files to usb rather to generate them?

Tnx, Joe

Update: the adblock is working just a few minutes for me. Same on blitz -1. Tp link Archer C5 has 128Mb of Ram..
I will look for logs to see any errors

Update 2: i didnt see this one coming: i generated with cmd
Sh adblock.sh -3 --wget
The mphosts file is under 1Mb. It do it fast. And it works! Further testing offciurse, but for now it holds and it works.
Yamaraj
DD-WRT User


Joined: 25 Jan 2017
Posts: 110

PostPosted: Mon Apr 20, 2020 13:59    Post subject: Reply with quote
joedow wrote:
Hi guys,

Today i regenerated with the -2 blitz level and it seems to work better. Any ideea why lvl 2 is better than lvl 3 for me?
I always check first on speedtest.net. Eith lvl 3 blitz is full of ads. With lvl 2 no ads.

Just a thought: whouldnt be easyer just to copy these files to usb rather to generate them?

Tnx, Joe

Update: the adblock is working just a few minutes for me. Same on blitz -1. Tp link Archer C5 has 128Mb of Ram..
I will look for logs to see any errors

Update 2: i didnt see this one coming: i generated with cmd
Sh adblock.sh -3 --wget
The mphosts file is under 1Mb. It do it fast. And it works! Further testing offciurse, but for now it holds and it works.


Even the default (BLITZ=1) should block enough ads for most. I recommend the following steps:

1. Walk through all the installation steps, ensure the directories, paths, settings, and files are correct.
2. If your firmware does not come with curl, install through entware. BusyBox wget is severely limited.
3. Clear your browser cache and reboot your router and system(s).

If you encounter any problems, include logs and/or screenshots.

_________________

Routers
NETGEAR R7800 x2: DD-WRT v3.0-r42847 std (04/06/20)
NETGEAR R8500: DD-WRT v3.0-r41517 std (11/11/19)

Scripts
Adblock.sh on DD-WRT (v2) -- Github | Website
Ad-blocking on DD-WRT (v1) -- Github
Jay461
DD-WRT Novice


Joined: 18 Jul 2018
Posts: 49

PostPosted: Thu Apr 23, 2020 14:52    Post subject: Curl: error Reply with quote
Everything was working good up untill yesterday, internet connection was acting weird. I tried to first update my adblock script and it returned an error, I then ran debug-no luck. I followed by running: curl -s -k ..... and I get the same error.

curl: (22) The requested URL returned error: 500 Internal server Error

I have zero knowledge about writing scripts etc. Can one of the experts help me resolve this issue? TIA



Curl error.PNG
 Description:
 Filesize:  35.97 KB
 Viewed:  13757 Time(s)

Curl error.PNG


Jay461
DD-WRT Novice


Joined: 18 Jul 2018
Posts: 49

PostPosted: Thu Apr 23, 2020 19:05    Post subject: Reply with quote
**RESOLVED**

After running the code from the beginning on page 1
eliminated the error: curl: (22) The requested URL returned error: 500 Internal server Error.

How do I change BLITZ Levels to default and revert back as well?

Thanks


Last edited by Jay461 on Thu Apr 23, 2020 20:30; edited 2 times in total
kernel-panic69
DD-WRT Guru


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

PostPosted: Thu Apr 23, 2020 20:16    Post subject: Reply with quote
How's about not TL;DR'ing page one: https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=307533
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
DD-WRT Releases 2023 (PolitePol)
DD-WRT Releases 2023 (RSS Everything)

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


Joined: 24 Apr 2020
Posts: 1

PostPosted: Fri Apr 24, 2020 10:28    Post subject: Adblock.sh: 0.1.2.3 justification Reply with quote
Hi all,

Just wondering why the ads blackhole cannot be neither 0.0.0.0 or 127.0.0.1 and therefore 0.1.2.3 is the default one.

Since I've some web pages taking forever to load, I was thinking that perhaps it could be more efficient to have the ads pointing localy to lo instead.

Thanks for your thoughts on the matter.
0Legolas0
DD-WRT Novice


Joined: 14 Jan 2018
Posts: 16

PostPosted: Sat May 02, 2020 17:48    Post subject: Which host to whitelist for CNN Reply with quote
Hi All
I am able to access cnn.com via the broswer, but he CNN app on my android phone/tablet/.... etc throw a blank screen and don't start. If I disable this wonderful script, the app loads/functions.

Do any of you know which host to whitelist for CNN app to work?

BTW, overtime I ended-up having to whitelist the below:

ae01.alicdn.com
alicdn.com
aliexpress.com
bleacherreport.com
dickssportinggoods.com
evite.com
g.alicdn.com
hrblock.com
ikeahackers.net
img.im.alicdn.com
insideevs.com
jalopnik.com
lifehacker.com
mediamonkey.com
pool.ntp.org
seekingalpha.com
wiki.wemos.cc


Thanks in advance
0Legolas0
DD-WRT Novice


Joined: 14 Jan 2018
Posts: 16

PostPosted: Sun May 03, 2020 18:17    Post subject: Re: Adblock.sh: 0.1.2.3 justification Reply with quote
dragonii wrote:
Hi all,

Just wondering why the ads blackhole cannot be neither 0.0.0.0 or 127.0.0.1 and therefore 0.1.2.3 is the default one.

Since I've some web pages taking forever to load, I was thinking that perhaps it could be more efficient to have the ads pointing localy to lo instead.

Thanks for your thoughts on the matter.




You can. See the -i option....

root@NetgearAC1750_DDWRT:/jffs/dnsmasq# ./adbhostgen.sh --help

USAGE:
adbhostgen.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
[-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
[-q | --quiet] Print outout to log file only
[-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 adbhostgen.sh to the latest version
[-v | --version] Print adbhostgen.sh version and exit

EXAMPLES:
adbhostgen.sh -s2 --ip=172.31.255.254 --bl=example1.com --wl=example2.com
adbhostgen.sh -3Fqs -b example1.com -w example2.com --wl=example3.com
CantRepeat
DD-WRT User


Joined: 18 Oct 2017
Posts: 153

PostPosted: Fri May 22, 2020 11:04    Post subject: Reply with quote
Is this the same as the adblocking already in DD-WRT?

If not, do they work together or is redundant to use both?

_________________
-Tim
joszsz
DD-WRT Novice


Joined: 26 May 2020
Posts: 1

PostPosted: Tue May 26, 2020 7:53    Post subject: Reply with quote
Thanks for this awesome script!

I do have a bit of trouble with setting it up as in the OP. When I add
conf-file=/jffs/dnsmasq/mpdomains

it seems to conflict with other options I configured for my guest WiFi;

interface=br1
dhcp-option=br1,3,x.x.x.x
dhcp-range=br1,x.x.x.x,x.x.x.x,255.255.255.0,12h

only adding
addn-hosts=/jffs/dnsmasq/mphosts
works, and also seems to block ads, when I use this website to check if it's working;
https://thepcspy.com/blockadblock/

So my question is 2 fold;
- Why do we need to add the conf-file parameter?
- If it's necessary and not everything is blocked when not added, how would I go about doing this without breaking my guest WiFi?
betabloccante
DD-WRT Novice


Joined: 17 Jun 2020
Posts: 1

PostPosted: Wed Jun 17, 2020 16:21    Post subject: Reply with quote
Hi, why adblock work only on wify devices?
Do you need to configure anything else on the router?
Thanks
Goto page Previous  1, 2, 3 ... 19, 20, 21, 22, 23  Next Display posts from previous:    Page 20 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