Adblock for DD-WRT (version 2)

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


Joined: 07 Apr 2016
Posts: 160

PostPosted: Mon Apr 02, 2018 2:34    Post subject: Reply with quote
Added directvnow.com to the mywhitelist file and created a blank myblacklist file and ran the script. But, I don't see directvnow.com listed in either mphosts or mpdomains file.

Also, I am not able to use directvnow.com to stream shows. Anything I am missing? I am using your latest script.

This is mywhitelist file:

www.directvnow.com
directvnow.com

EDIT: I removed the mywhitelist file and ran the script with the option for the site and still doesn't work. It's driving me nuts and this is an important site and if I can't get it to work, I guess I have to start using the AdBlocker in chrome extension. Bummer!

./adbhostgen.sh --wl=directvnow.com --wl=www.directvnow.com
Sponsor
Yamaraj
DD-WRT User


Joined: 25 Jan 2017
Posts: 110

PostPosted: Mon Apr 02, 2018 5:12    Post subject: Reply with quote
Max Power wrote:
Great work, as always!

Probably too late to the party, but is there a way to match in reverse order for whitelist entries? So if you put google.com in mywhitelist it will whitelist anything that ENDS in google.com?

As of now, the script uses grep (BusyBox) which has its own limitations. Wildcard whitelisting may require Perl and/or extensive changes and rewrites. I'll keep enhancing the script and updating this thread with announcements of rolling alpha releases as and when it happens.

_________________

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
Yamaraj
DD-WRT User


Joined: 25 Jan 2017
Posts: 110

PostPosted: Mon Apr 02, 2018 5:13    Post subject: Reply with quote
RainGater wrote:
@Yamaraj, Awesome work! I am not sure why never thought of doing this until I saw your thread today... Really dumb of me :(

Btw, I see that you mentioned this in OP: "DO NOT try to run this script on your internal jffs". But, I set it up by using the Internal Flash Storage for jffs2 and after reboot, it filters all the ads. Any issues running this in internal flash storage? Now, I got rid of Adblock extension in Chrome.

Wonderful script! Thank you again!

Flash memory is relatively vulnerable to constant writes and rewrites, therefore it's prudent to disable internal jffs and partition/format/mount a USB thumb drive as /jffs (preferably /opt and swap too).

RainGater wrote:
Added directvnow.com to the mywhitelist file and created a blank myblacklist file and ran the script. But, I don't see directvnow.com listed in either mphosts or mpdomains file.

Also, I am not able to use directvnow.com to stream shows. Anything I am missing? I am using your latest script.

This is mywhitelist file:

www.directvnow.com
directvnow.com

EDIT: I removed the mywhitelist file and ran the script with the option for the site and still doesn't work. It's driving me nuts and this is an important site and if I can't get it to work, I guess I have to start using the AdBlocker in chrome extension. Bummer!

./adbhostgen.sh --wl=directvnow.com --wl=www.directvnow.com

Most, if not all, of the streaming sites make extensive use of CDNs, Javascript libraries, web players, and as such, whitelisting just their domains may or may not be enough. Here's a standard set of steps to follow whenever a site doesn't work:

1. Make sure mywhitelist file is in /jffs/dnsmasq
2. SSH into router, add domain name to mywhitelist, either via command line or an editor of your choice.
3. Run the script with your preferred command line args, e.g. -2s or -fqs2.
4. If the site still doesn't load, clear browser cache and reboot.
5. Pause protection. command line --pause or -p
6. Install DNSthingy Assistant plugin for Chrome and close all tabs except the site you need to whitelist.
7. Reload the page, click on the plugin icon and make a note of the domains listed therein.
8. Judiciously add relevant domains to mywhitelist and run the script again.
9. Check pi-hole forums and subreddit for more information.

Also, mphosts and mpdomains are essentially block lists. If that domain isn't listed in either, then you have successfully whitelisted it.

For now, add these to mywhitelist, run the script and reboot your system and router both, after clearing the browser cache:

Code:

www.directvnow.com
cdn.directv.com
directvapplications.hb.omtrdc.net
s.zkcdn.net
js.maxmind.com


NOTE: I have added these entries to the official whitelist, so you needn't add anything to mywhitelist for now. Just run the script again and post here or PM me.
UPDATE: Changes to the official whitelist reverted. If DirecTV wants trackers enabled to allow access, they can stuff it. Users are advised to add these entries to their own mywhitelist files.

_________________

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


Last edited by Yamaraj on Mon Apr 02, 2018 15:04; edited 1 time in total
RainGater
DD-WRT User


Joined: 07 Apr 2016
Posts: 160

PostPosted: Mon Apr 02, 2018 11:25    Post subject: Reply with quote
Yamaraj wrote:

NOTE: I have added these entries to the official whitelist, so you needn't add anything to mywhitelist for now. Just run the script again and post here or PM me.

Thank you for the detailed explanation and much appreciate it. I reran the script and still doesn't work. I don't see the entries in the mpdomains or mphosts files.

When I access directvnow.com, I get this message: "Your current location is unknown and required for this content. Look up location identification in the Help center for more info".

If I pause the protection, obviously, it works! I am surprised that no one is using directvnow in this thread up to this point Sad

EDIT: With the DNSThingy extension, these are the sites that pop up when going to directvnow.com. I added it to mywhitelist and still doesn't work.

Code:
www.directvnow.com
www.gstatic.com
s.go-mpulse.net
aeg-umsgw.quickplay.com
js-agent.newrelic.com
dtvn-discovery-sponsored.akamaized.net
Yamaraj
DD-WRT User


Joined: 25 Jan 2017
Posts: 110

PostPosted: Mon Apr 02, 2018 15:02    Post subject: Reply with quote
RainGater wrote:
I don't see the entries in the mpdomains or mphosts files.

mphosts and mpdomains are blocklists, as in the entries therein are blocked from access. If you are not seeing these in those two files, it means they are whitelisted. This is not the problem. I looked into DirecTV Now issues and it seems they have added a multitude of trackers. Which means they are collecting any and all data on you that they can to allow access to their streaming services. Even Pi-Hole users are facing the same issues.

Either add these to mywhitelist:
Code:
www.directvnow.com
cdn.directv.com
www.att.com
dpm.demdex.net
attservicesinc.tt.omtrdc.net
directvapplications.hb.omtrdc.net
s.go-mpulse.net
att.demdex.net
att.inq.com
quickplay.com
smetrics.att.com
d.agkn.com
ajax.googleapis.com
aeg-umsgw.quickplay.com
js-agent.newrelic.com
dtvn-discovery-sponsored.akamaized.net

and try again, or pause the script to allow access, and resume when you do not.

_________________

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
RainGater
DD-WRT User


Joined: 07 Apr 2016
Posts: 160

PostPosted: Mon Apr 02, 2018 16:58    Post subject: Reply with quote
Yamaraj wrote:
and try again, or pause the script to allow access, and resume when you do not.

I added them to the mywhitelist and still no go!

Pausing the script is not an option for me as we watch it all the time. Hmmm, your script looks very promising but directvnow doesn't want to play ball... Bummer!
labo
DD-WRT Guru


Joined: 30 Jan 2015
Posts: 676
Location: Texas, USA

PostPosted: Tue Apr 03, 2018 21:26    Post subject: Reply with quote
@Yamaraj,
Thanks for the continued efforts on this.
I think this is getting better and better. But still we are lacking of a comprehensive whitelist.
Could you please have a pool area where we can add valid lists of whitelist webpages by the dd-wrt users here? At least the must have sites that should work.

_________________
ASUS GT-BE98 PRO Main: Fiber 5gbps up/down
ASUS AXE16000: AI Mesh node
2 X ASUS RT-AX89X: AI Mesh nodes
QNAP QSW-1208-8C 12-Port 10GbE Switch
XS712T ProSafe 12-Port 10GbE Switch
3 X R9000 DD-WRT Mesh
Yamaraj
DD-WRT User


Joined: 25 Jan 2017
Posts: 110

PostPosted: Wed Apr 04, 2018 12:45    Post subject: Reply with quote
RainGater wrote:
I added them to the mywhitelist and still no go!

Pausing the script is not an option for me as we watch it all the time. Hmmm, your script looks very promising but directvnow doesn't want to play ball... Bummer!


That's disappointing. See here:
1. https://www.reddit.com/r/pihole/comments/5xp1my/directv_now_and_pihole/
2. https://www.reddit.com/r/DirecTVNow/comments/7fj689/anyone_else_having_problems_streaming_in_chrome/
3. https://www.reddit.com/r/DirecTVNow/comments/7ci0bz/just_started_subscription_but_it_just_loads_to_a/

They have a problem with Pi-Hole and browser level adblockers such as ABP and uBlock as well. Try their subreddit or support forums. Maybe someone will provide a more complete list of domains to whitelist. In the meantime, try clearing your browser cache and cookies, as they suggest in one of the above threads.

labo wrote:
@Yamaraj,
Thanks for the continued efforts on this.
I think this is getting better and better. But still we are lacking of a comprehensive whitelist.
Could you please have a pool area where we can add valid lists of whitelist webpages by the dd-wrt users here? At least the must have sites that should work.

Time and again I have requested users to do the same here or PM me or raise issues here: https://github.com/m-parashar/adbhostgen/issues to no avail. I will gladly compile a reference whitelist of acceptable domains, provided users pool their resources and review the list from time to time. There are some that believe the official whitelist should be left untouched and I mostly agree with this. We could add these domains to a downloadable mywhitelist and move the entries to whitelist after a careful analysis.

_________________

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
mac913
DD-WRT Guru


Joined: 02 May 2008
Posts: 1848
Location: Canada

PostPosted: Wed Apr 04, 2018 14:51    Post subject: Reply with quote
labo wrote:
@Yamaraj,
Thanks for the continued efforts on this.
I think this is getting better and better. But still we are lacking of a comprehensive whitelist.
Could you please have a pool area where we can add valid lists of whitelist webpages by the dd-wrt users here? At least the must have sites that should work.


A "better" whitelist is a very personal preference and a comprehensive whitelist will NOT work for all.

Having Yamaraj doning so much work for a few user will only to be counter-productive for others. Yamarja is doing a very job with the blacklist & whitelist files and the Script. It's our job to customize mywhitelist & myblacklist to our likings.

I can see Yamaraj having more levels of BITZ in the script to reduce the filtering.

_________________
Home Network on Telus 1Gb PureFibre - 10GbE Copper Backbone
2x R7800 - Gateway & WiFi & 3xWireGuard - DDWRT r53562 Std k4.9

Off Site 1

R7000 - Gateway & WiFi & WireGuard - DDWRT r54517 Std
E3000 - Station Bridge - DDWRT r49626 Mega K4.4

Off Site 2

R7000 - Gateway & WiFi - DDWRT r54517 Std
E2000 - Wired ISP IPTV PVR Blocker - DDWRT r35531


YAMon 3.4.6 | DNSCrypt-Proxy V2


Last edited by mac913 on Wed Apr 04, 2018 17:33; edited 1 time in total
RainGater
DD-WRT User


Joined: 07 Apr 2016
Posts: 160

PostPosted: Wed Apr 04, 2018 15:16    Post subject: Reply with quote
@Yamaraj, Didn't lose hope on your awesome work. Finally, nailed the list for directvnow and it works!

If you want to add it to the official list, please go ahead. Or, I will just keep it in mywhitelist.

With -fs2 option, it takes 27 minutes to generate mphosts and mpdomains on my Asus RT-87U. I am running it off of internal jffs (most of the processing is happening in /tmp before moving over to /jffs and don't see much impact on the flash) and setup the cron to update only ONCE a week.

# Size of /jffs/dnsmasq/mphosts: 24.3M
# Size of /jffs/dnsmasq/mpdomains: 3.1M
# Number of ad domains blocked: approx 876503
# Total time: 27:16 minutes

Code:
cdn.directv.com
device.maxmind.com
directvapplications.hb.omtrdc.net
directvnow.com
geoip-js.maxmind.com
js.maxmind.com
maxmind.com
s.zkcdn.net
www.directvnow.com
RainGater
DD-WRT User


Joined: 07 Apr 2016
Posts: 160

PostPosted: Thu Apr 05, 2018 0:56    Post subject: Reply with quote
@Yamaraj,

For xda site (https://forum.xda-developers.com/ - android developers site), we need to whitelist this: www.google-analytics.com
chorton
DD-WRT Novice


Joined: 06 Jul 2006
Posts: 12

PostPosted: Thu Apr 12, 2018 1:26    Post subject: Reply with quote
Yamaraj wrote:
@Wickiman
Code:
Additional configuration: OpenVPN client and an 8 GiB pendrive partitioned and formatted as swap, /jffs, and /opt running Kong's optware.


I recommend using a pendrive (I use 8 GiB) for /jffs. I'll update my original post with instructions and screenshots.

If you downloaded the 7z archive, it already includes the hosts file, however your router will auto generate fresh hosts file twice a week, as per included instructions. Note that if you make any changes, you should run the script and restart dnsmasq or reboot the router.

Yes, you can add kayak.com to whitelist, but you must run the script again and restart dnsmasq or reboot your router.

1. SSH to router
2. cd /jffs/dnsmasq
3. nano whitelist (add domains you don't want blocked), Ctrl+O and Ctrl+X to save and exit nano.
4. ./adbhostgen.sh
5. reboot



This seems like a stupid question but when I try to use nano I get the error nano: not found. Do I need another package installed to use it? Can I just open the file with a regular text editor and add the names to the blacklist or whitellist?

Another question is it now a good idea to stop using ublock origin, can it create any problems with this method?
KittyChampion
DD-WRT Novice


Joined: 19 Sep 2017
Posts: 23

PostPosted: Sat Apr 14, 2018 6:44    Post subject: Reply with quote
RainGater wrote:
Finally, nailed the list for directvnow and it works![/code]


How?
Yamaraj
DD-WRT User


Joined: 25 Jan 2017
Posts: 110

PostPosted: Sun Apr 15, 2018 5:06    Post subject: Reply with quote
chorton wrote:
This seems like a stupid question but when I try to use nano I get the error nano: not found. Do I need another package installed to use it? Can I just open the file with a regular text editor and add the names to the blacklist or whitellist?

Another question is it now a good idea to stop using ublock origin, can it create any problems with this method?

Not a stupid question at all. nano is, unfortunately, not installed by default. It's a part of my optware installation. You can use vi, but you should familiarize yourself with its modes and simple editing commands.

--

NOTE: Specific whitelists, confirmed working by users, will be uploaded here: https://github.com/m-parashar/adbhostgen/tree/master/whitelists
Yo can add these domains to your "mywhitelist" files as required.

_________________

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
Yamaraj
DD-WRT User


Joined: 25 Jan 2017
Posts: 110

PostPosted: Wed May 02, 2018 4:54    Post subject: Reply with quote
I have been busy with other things and offline life lately.

Any bugs, feature requests, list suggestions? I'll likely release a beta update by this weekend, so if there's anything I might include/fix things.

_________________

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
Goto page Previous  1, 2, 3 ... 11, 12, 13 ... 21, 22, 23  Next Display posts from previous:    Page 12 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