Adblock for DD-WRT (version 2)

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


Joined: 13 Jan 2018
Posts: 98
Location: Sarasota

PostPosted: Sun Mar 04, 2018 23:01    Post subject: Reply with quote
I have an hard drive attached to the rear USB port of my R7000. It's a single NTFS partition with three directories (Music, Pictures, Video) all mounted to /opt and conveniently available on my LAN.

I suspect that to enable AdBlocking more is involved than just adding dnsmasq as a fourth directory and populating it with the contents of the github 7z file.

Questions:
1. Can I use a hard drive instead of a pendrive?
2. If so, does the hard drive need to be partitioned?
3. How the heck do I execute chmod +x?

Thanks in advance.
Sponsor
mac913
DD-WRT Guru


Joined: 02 May 2008
Posts: 1848
Location: Canada

PostPosted: Mon Mar 05, 2018 4:50    Post subject: Reply with quote
awm34x wrote:
I have an hard drive attached to the rear USB port of my R7000. It's a single NTFS partition with three directories (Music, Pictures, Video) all mounted to /opt and conveniently available on my LAN.

I suspect that to enable AdBlocking more is involved than just adding dnsmasq as a fourth directory and populating it with the contents of the github 7z file.

Questions:
1. Can I use a hard drive instead of a pendrive?
2. If so, does the hard drive need to be partitioned?
3. How the heck do I execute chmod +x?

Thanks in advance.


The R7000 had another USB port in the front.

_________________
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
awm34x
DD-WRT User


Joined: 13 Jan 2018
Posts: 98
Location: Sarasota

PostPosted: Mon Mar 05, 2018 5:14    Post subject: Reply with quote
I'd prefer not to use the front USB port as my wife's fussy about aesthetics.

BTW, I'm a Windows 10 user with no Linux background.
Yamaraj
DD-WRT User


Joined: 25 Jan 2017
Posts: 110

PostPosted: Mon Mar 05, 2018 5:57    Post subject: Reply with quote
awm34x wrote:
I'd prefer not to use the front USB port as my wife's fussy about aesthetics.

BTW, I'm a Windows 10 user with no Linux background.

Well, in that case you can either get one of those tiny pendrives (SanDisk Cruzer Fit) or a USB hub with any 8GB+ pendrive, and follow this post. Since you have no Linux/Unix background, I can't recommend resizing and partitioning your existing disk which likely contains important data.

To answer your other question, you can SSH into your router and use chmod to make binaries/scripts executable.

_________________

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


Joined: 13 Jan 2018
Posts: 98
Location: Sarasota

PostPosted: Mon Mar 05, 2018 13:12    Post subject: Reply with quote
Thanks for the suggestions. I'll give partitioning the hard drive a try (many freeware products available) and see if I can't extend the scope of your work. My HDD has tons of unused capacity so I'll grab 20-30Gb and partition it as FAT32 and go from there.

Duh, hadn't thought of a USB hub but will use that as a fallback.
Yamaraj
DD-WRT User


Joined: 25 Jan 2017
Posts: 110

PostPosted: Mon Mar 05, 2018 14:05    Post subject: Reply with quote
awm34x wrote:
My HDD has tons of unused capacity so I'll grab 20-30Gb and partition it as FAT32 and go from there.

Duh, hadn't thought of a USB hub but will use that as a fallback.

You'll need two ext3 partitions - for /jffs and /opt, preferably 1-2GB each, and optionally a swap partition (256/512MB). Pendrive/hub is a much better idea.

_________________

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


Joined: 13 Jan 2018
Posts: 98
Location: Sarasota

PostPosted: Mon Mar 05, 2018 19:08    Post subject: Reply with quote
It seems to be working ok without a swap partition.

I added www.nydailynews.com to the whitelist and it sort of works -- for 8+ seconds until it reverts to the attached message.



Screenshot-2018-3-5 Breaking News, World News, US and Local News - NY Daily News.png
 Description:
 Filesize:  9.03 KB
 Viewed:  5007 Time(s)

Screenshot-2018-3-5 Breaking News, World News, US and Local News - NY Daily News.png


Yamaraj
DD-WRT User


Joined: 25 Jan 2017
Posts: 110

PostPosted: Mon Mar 05, 2018 19:51    Post subject: Reply with quote
awm34x wrote:
It seems to be working ok without a swap partition.

I added www.nydailynews.com to the whitelist and it sort of works -- for 8+ seconds until it reverts to the attached message.

Because some of these sites now use JS anti-adblock measures to force you into disabling your ad blockers. Except in our case, we can't even do that. We are using DNS level ad blocking. No worries, you can still load these sites.

Solution:
If you're using Google Chrome,

1. Settings > Advanced > Content Settings > Javascript
2. Click on add button in "block" section
3. Type [*.]nydailynews.com and save
4. Refresh the site. You'll lose some interface options that depend on Javascript, but at least the site will function sans ads.

For Firefox, Safari, etc: https://www.wikihow.com/Disable-JavaScript
Do not disable javascript globally, add exceptions instead, as explained above.

_________________

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


Joined: 13 Jan 2018
Posts: 98
Location: Sarasota

PostPosted: Mon Mar 05, 2018 20:51    Post subject: Reply with quote
Thanks again.
Yamaraj
DD-WRT User


Joined: 25 Jan 2017
Posts: 110

PostPosted: Tue Mar 06, 2018 12:14    Post subject: Reply with quote
VERSION: 20180306
Major code rewrite, cleanup, and update. An installer file (installer.sh) now available. Installer and 7z/tar.gz archives now include an ARM7L version of static compiled curl (mpcurl) and latest certificates, for systems that don't have /usr/bin/curl. Users are advised to upgrade to this version.

Note: I request users of this script to provide details on their systems (router, architecture, RAM, DD-WRT version etc), bug reports, suggestions, hosts and domains for black/whitelisting, and code improvements.

_________________

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


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

PostPosted: Tue Mar 06, 2018 12:20    Post subject: Reply with quote
@Yamaraj,
If I update to this version as is, will it preserve my existing whitelist and blacklists?
Thanks,

_________________
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: Tue Mar 06, 2018 12:59    Post subject: Reply with quote
labo wrote:
@Yamaraj,
If I update to this version as is, will it preserve my existing whitelist and blacklists?
Thanks,

It will, provided:

1. You do not use the installer or extract 7z/tar.gz archives into /jffs/dnsmasq, overwriting existing files.

2. You (re)download files after reading this post. I have just updated the release to preserve existing blacklist/whitelist.

Best course of action: update everything except blacklist and whitelist, then run the script. The script will preserve your entries and merge them with the official 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
awm34x
DD-WRT User


Joined: 13 Jan 2018
Posts: 98
Location: Sarasota

PostPosted: Tue Mar 06, 2018 13:29    Post subject: Reply with quote
Sorry, but I'm confused. Have downloaded adbhostgen.7z and am prepared to copy its content into an empty /jffs/dnsmasq (and chmod +x adbhostgen.sh).

Is that the correct update procedure (as I have but a single entry to add to the whitelist)?
Yamaraj
DD-WRT User


Joined: 25 Jan 2017
Posts: 110

PostPosted: Tue Mar 06, 2018 13:44    Post subject: Reply with quote
Wait 30 minutes. I am uploading a new version which will preserve your custom myblacklist/mywhitelist files sans any risks.
_________________

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


Joined: 13 Jan 2018
Posts: 98
Location: Sarasota

PostPosted: Tue Mar 06, 2018 14:12    Post subject: Reply with quote
I admire your dedication and responsiveness. Thanks again.
Goto page Previous  1, 2, 3, 4, 5 ... 21, 22, 23  Next Display posts from previous:    Page 4 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