trying to get adblock working. startup cmd gives error

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Author Message
onthegorepairs
DD-WRT Novice


Joined: 08 May 2022
Posts: 6

PostPosted: Sun May 08, 2022 23:42    Post subject: trying to get adblock working. startup cmd gives error Reply with quote
The guide I am following is:

https://www.howtogeek.com/51477/how-to-remove-advertisements-with-pixelserv-on-dd-wrt/

I followed all the directions exact, except that I created a folder in: /jffs/tmp because creating the dns folder in /jffs/ would just erase itself after router reboots. When I try running the "/jffs/tmp/dns/disable_adds.sh" command in the window, I get this error:

sh: eval: line 7: /jffs/tmp/dns/disable_adds.sh: not found

After confirming that the folder doesn't disappear upon reboot, and that both files have the correct permissions, I tried entering other commands for mounting the jffs partition (which shouldn't be needed anyways since jffs is already enabled) but this did not make any difference. This is supposed to be something simple, but I fail at doing something even basic as this. The firmware version is: DD-WRT v3.0-r47618 std (11/05/21)

The router is a Netgear R6250 and should have enough onboard memory for the jffs stuff. I apologize for only having a basic understanding of this stuff. If there is a way to get this working I would be extremely happy!

Thanks!

-Mark



dd-wrt startup command error.png
 Description:
startup command error
 Filesize:  109.22 KB
 Viewed:  2399 Time(s)

dd-wrt startup command error.png


Sponsor
onthegorepairs
DD-WRT Novice


Joined: 08 May 2022
Posts: 6

PostPosted: Sun May 08, 2022 23:53    Post subject: Reply with quote
Here is a picture taken from my other computer, that shows the related files


dd-wrt jffs files.jpg
 Description:
these are the files, just so you know where they are and what they are called.
 Filesize:  565.02 KB
 Viewed:  2389 Time(s)

dd-wrt jffs files.jpg


kernel-panic69
DD-WRT Guru


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

PostPosted: Mon May 09, 2022 0:55    Post subject: Reply with quote
That script runs via startup script when the router boots up. You probably can't run it via the commands box "run commands" button.
_________________
"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
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12834
Location: Netherlands

PostPosted: Mon May 09, 2022 5:51    Post subject: Reply with quote
If you have setup permanent storage the right way /jffs should not disappear on reboot.

Are yo using an USB stick or have you "JFFS2 Support" Enabled on Administration page (you cannot do both!)

These instructions are rely old, I would use a more recent version.

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, 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
onthegorepairs
DD-WRT Novice


Joined: 08 May 2022
Posts: 6

PostPosted: Mon May 09, 2022 19:39    Post subject: Reply with quote
I am using the onboard memory, not a usb stick. Also, I am pretty sure the jff2 is setup properly, as shown in the first picture. At least the files copied to jff2/tmp don't dissapear. I followed the instructions verbatim from the link that I shared. if you have a better/more recent guide I would sure like to see it!

And to the first post, I would assume you could run the command from the window if it was able to find the file in question. There are still plenty of pop ups (when going on certain sites) so I don't think the command is being ran correctly on startup.
Thanks again
-Mark
egc
DD-WRT Guru


Joined: 18 Mar 2014
Posts: 12834
Location: Netherlands

PostPosted: Mon May 09, 2022 20:02    Post subject: Reply with quote
https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=331271


https://wiki.dd-wrt.com/wiki/index.php/Ad_blocking

And there are many more

_________________
Routers:Netgear R7000, R6400v1, R6400v2, EA6900 (XvortexCFE), E2000, E1200v1, 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: 14125
Location: Texas, USA

PostPosted: Mon May 09, 2022 20:45    Post subject: Reply with quote
onthegorepairs wrote:
And to the first post, I would assume you could run the command from the window if it was able to find the file in question. There are still plenty of pop ups (when going on certain sites) so I don't think the command is being ran correctly on startup.

Looking at the script in question, it should log to syslog if it runs successfully on startup. The commands window may require special finesse (syntax) to run the script successfully, but if you wanted to test it on the fly without rebooting, then you should probably use telnet/ssh, not the webUI. Considering the article is from 12 years ago or so, and it calls for extra optional configuration if you want a more robust solution. It also advises from the beginning to also use a browser-based extension in conjunction with.

NOTE: Also consider that at the time the article was written, your router or any other Broadcom ARM device did not exist, so this solution may only apply to WRT54/MIPS devices to begin with. I didn't check the script in depth to check, but.

_________________
"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
onthegorepairs
DD-WRT Novice


Joined: 08 May 2022
Posts: 6

PostPosted: Mon May 09, 2022 22:11    Post subject: Reply with quote
thank you for the links and helpful suggestions. Under services >> adblocking there is something called privoxy, anyone recommend it? if so, how is the best way to set it up? this is a real interesting rabbit hole. i'm also very impressed with these forums! thanks again!
bushant
DD-WRT Guru


Joined: 18 Nov 2015
Posts: 2028

PostPosted: Mon May 09, 2022 22:35    Post subject: Reply with quote
I have tried about every adblocker to come come down the pipe over the last few years
and the one from @eibgrad that @egc pointed out is IT for me.

https://pastebin.com/aySi7RhY

I varied from the setup instructions due /jffs on removable drive so no size limitations.
YMMV

_________________
Forum Guide Lines (with helpful pointers about how to research your router, where and what firmware to download, where and how to post and many other helpful tips!)
How to get help the right way

Before asking for help - Read the forum guidelines AND Upgrade DD-WRT!
Adblock by eibgrad + Blocklist Collection
kernel-panic69
DD-WRT Guru


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

PostPosted: Mon May 09, 2022 22:47    Post subject: Reply with quote
I have tested Privoxy on my R7000P awhile back. The only caveat I know of is client configuration to use the proxy. I tested it without browser add-ons such as uBlock and was impressed. I didn't explore the wiki all that much, and I don't recall if there is any helpful information in the built-in helpfile(s) in DD-WRT.

https://forum.dd-wrt.com/wiki/index.php/Privoxy_Custom_Config

_________________
"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
onthegorepairs
DD-WRT Novice


Joined: 08 May 2022
Posts: 6

PostPosted: Tue May 10, 2022 21:43    Post subject: Reply with quote
bushant wrote:
I have tried about every adblocker to come come down the pipe over the last few years
and the one from @eibgrad that @egc pointed out is IT for me.

https://pastebin.com/aySi7RhY

I varied from the setup instructions due /jffs on removable drive so no size limitations.
YMMV


so I ran the command found in the script and turned on logging (wget -qO - bit.ly/ddwrt-installer|tr -d '\r'|sh -s aySi7RhY startup) and that seemed to work fine. But in the logs it says that /tmp/blacklisted_domains does not exist. is this where i put the file you linked too? this seems like the last piece of the puzzle. i'm not quite sure what the command i entered in does, but it looks like i am at least halfway their.
onthegorepairs
DD-WRT Novice


Joined: 08 May 2022
Posts: 6

PostPosted: Wed May 11, 2022 19:18    Post subject: Reply with quote
now my jffs partition doesn't mount, and shows up as empty and read only. I have tried disabling and re-enabling, erasing the jffs partition, no matter what I do it no longer seems to work (and doesn't show space info). I can restore my router settings using a backup, but don't want to do this unless the jffs partition is needed (using the script bushant shared). just figured I would give an update incase anyone knows of a quicker resolution. thanks again for the help guys!
Alozaros
DD-WRT Guru


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

PostPosted: Thu May 12, 2022 10:27    Post subject: Reply with quote
onthegorepairs wrote:
now my jffs partition doesn't mount, and shows up as empty and read only. I have tried disabling and re-enabling, erasing the jffs partition, no matter what I do it no longer seems to work (and doesn't show space info). I can restore my router settings using a backup, but don't want to do this unless the jffs partition is needed (using the script bushant shared). just figured I would give an update incase anyone knows of a quicker resolution. thanks again for the help guys!


if you name this partition to a jffs and turn automount it must mount automatically, otherwise use the manual mounting...and yep for best results, you must use drive formatted to ext2,3 or 4

_________________
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
kernel-panic69
DD-WRT Guru


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

PostPosted: Thu May 12, 2022 11:50    Post subject: Reply with quote
He's using internal flash jffs storage.
_________________
"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
Display posts from previous:    Page 1 of 1
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