ad-blocking with DD-WRT revisited (simple)

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2, 3, 4, 5 ... 12, 13, 14  Next
Author Message
uncle bob
DD-WRT User


Joined: 31 Aug 2008
Posts: 148

PostPosted: Mon Mar 02, 2009 12:12    Post subject: Reply with quote
frater wrote:
You can only get rid of those "page not found" when you run pixelserv or something like it.
You can run pixelserv on a system that's capable of running perl.


there was idea to put pixelserv functionality on the router
can we has it please ?
Sponsor
uncle bob
DD-WRT User


Joined: 31 Aug 2008
Posts: 148

PostPosted: Mon Mar 02, 2009 12:16    Post subject: Reply with quote
barryware wrote:
Why are you guys blocking the adds? Has anyone seen the swimsuit adds on this forum? That's good stuff Very Happy


where ?! where is it ?! ;-)

ok here is business model maybe idea.
business entity that scans thru all ads for malware trackware and allows only safe ones pass thru. And of course one would need dd-wrt firmware for that Wink
mr_skot
DD-WRT Novice


Joined: 07 Mar 2009
Posts: 2

PostPosted: Sat Mar 07, 2009 14:23    Post subject: Re: ad-blocking with DD-WRT revisited (simple) Reply with quote
frater wrote:
I've been asked to start a new thread to get this add-blocking to work.


Forgive me if this is a newbie question, if this script provides this great functionality shouldn't it be added to the 'access restriction' portion of the routers config with something as simple as a checkbox?

I'd love to use this but I am afraid to jinx how well the router is running now.

This would eliminate the need to have to add startup scripts and potentially muck something up.

Just a thought.

-mr_skot

DD-WRT v24-sp2 (09/19/0Cool mega
WRT54G-TM
phuque99
DD-WRT User


Joined: 20 Oct 2008
Posts: 446

PostPosted: Sat Mar 07, 2009 16:00    Post subject: Re: ad-blocking with DD-WRT revisited (simple) Reply with quote
mr_skot wrote:
frater wrote:
I've been asked to start a new thread to get this add-blocking to work.


Forgive me if this is a newbie question, if this script provides this great functionality shouldn't it be added to the 'access restriction' portion of the routers config with something as simple as a checkbox?

I'd love to use this but I am afraid to jinx how well the router is running now.

This would eliminate the need to have to add startup scripts and potentially muck something up.

Just a thought.

-mr_skot

DD-WRT v24-sp2 (09/19/0Cool mega
WRT54G-TM


Being able to do something doesn't mean it needs to be added to the code. Personally, I hate code bloat. Bloating the source code and firmware is going increase its size and stability. Such functionality shouldn't be a core router's code and make its core functionality unstable: traffic routing.

The ability to customize and to run script is a wonderful thing and should be kept that way. Hacks and features should be added by whoever that wants this in the script section of the router, not in the core.
mr_skot
DD-WRT Novice


Joined: 07 Mar 2009
Posts: 2

PostPosted: Sat Mar 07, 2009 18:51    Post subject: Re: ad-blocking with DD-WRT revisited (simple) Reply with quote
phuque99 wrote:

The ability to customize and to run script is a wonderful thing and should be kept that way. Hacks and features should be added by whoever that wants this in the script section of the router, not in the core.


Understood. Fraters script is working perfectly on my router.

Although I'm trying to figure out how to append more sites I'd like to block into the /tmp/dlhosts file automagically when the router starts.

Time to scour the forums for answers.
Andir
DD-WRT Novice


Joined: 08 Mar 2009
Posts: 1

PostPosted: Sun Mar 08, 2009 6:16    Post subject: Reply with quote
edit: it seems to be working now.
MKruer
DD-WRT Novice


Joined: 15 Feb 2009
Posts: 18

PostPosted: Sun Mar 08, 2009 19:12    Post subject: Re: ad-blocking with DD-WRT revisited (simple) Reply with quote
phuque99 wrote:
mr_skot wrote:
frater wrote:
I've been asked to start a new thread to get this add-blocking to work.


Forgive me if this is a newbie question, if this script provides this great functionality shouldn't it be added to the 'access restriction' portion of the routers config with something as simple as a checkbox?

I'd love to use this but I am afraid to jinx how well the router is running now.

This would eliminate the need to have to add startup scripts and potentially muck something up.

Just a thought.

-mr_skot

DD-WRT v24-sp2 (09/19/0Cool mega
WRT54G-TM


Being able to do something doesn't mean it needs to be added to the code. Personally, I hate code bloat. Bloating the source code and firmware is going increase its size and stability. Such functionality shouldn't be a core router's code and make its core functionality unstable: traffic routing.

The ability to customize and to run script is a wonderful thing and should be kept that way. Hacks and features should be added by whoever that wants this in the script section of the router, not in the core.

Although I have no control over it, I hope that the guys developing this continue down the modular route. Right now it’s somewhat in place, but could/should be refined further. http://www.dd-wrt.com/wiki/index.php/What_is_DD-WRT%3F#File_Versions even the Micro could have stuff stripped out of it. Maybe they will opt to go down that route at some point in the future and have all non-core functions become more like add-on, and allow us the newbie’s to go to a special page inside the router and download and install packages for those specific features you want.
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Sun Mar 08, 2009 19:33    Post subject: Re: ad-blocking with DD-WRT revisited (simple) Reply with quote
mr_skot wrote:

Understood. Fraters script is working perfectly on my router.

Although I'm trying to figure out how to append more sites I'd like to block into the /tmp/dlhosts file automagically when the router starts.

Time to scour the forums for answers.


I don't really understand your problem. The code already does it on startup (you have to put it in commands -> save startup).

You can already have the file /jffs/hosts and it will be appended to /dlhosts

_________________
Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge

DD-WRT v24-sp2 vpn (c) 2010 NewMedia-NET GmbH
Release: 12/16/10 (SVN revision: 15758M)
GDixon
DD-WRT Novice


Joined: 24 Mar 2009
Posts: 10

PostPosted: Tue Mar 24, 2009 18:29    Post subject: rogue usage Reply with quote
excellent script , works well on a wrtg54 v. 2.2

My question is with the first line rogue = , by having that in the script should it be returning a o.o.o.o ip instead of the 127.0.0.0 ip when something is denied?
The reason I ask is because it always comes back as the 127.0.0.0 ip (local) when i test it using telnet and pinging something like double click.
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Tue Mar 24, 2009 21:09    Post subject: Reply with quote
It should return the IP you define in _rogue.
Take a look at the file /tmp/dlhosts.

It should look like this (I have pixelserv running on 192.168.10.5)
Code:
# head -n10 /tmp/dlhosts
192.168.10.5    ad.a8.net
192.168.10.5    asy.a8ww.net
192.168.10.5    acezip.net
192.168.10.5    www.acezip.net
192.168.10.5    phpadsnew.abac.com
192.168.10.5    a.abnad.net
192.168.10.5    b.abnad.net
192.168.10.5    c.abnad.net
192.168.10.5    d.abnad.net
192.168.10.5    e.abnad.net

_________________
Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge

DD-WRT v24-sp2 vpn (c) 2010 NewMedia-NET GmbH
Release: 12/16/10 (SVN revision: 15758M)
GDixon
DD-WRT Novice


Joined: 24 Mar 2009
Posts: 10

PostPosted: Tue Mar 24, 2009 21:50    Post subject: Reply with quote
the code below is the one i'm using and it returns 127.0.0.1, not the expected _rogue one of 0.0.0.0 / any ideas on where i screwed up ?

Code:
_rogue=0.0.0.0
echo -e "#!/bin/sh\nn=1\nwhile sleep 60\ndo\n\twget -q -O - http://www.mvps.org/winhelp2002/hosts.txt | grep \"^127.0.0.1\" | grep -v localhost | awk '{print \"$_rogue\\\t\"\$2}' | tr -d '\\\015' >/tmp/dlhosts\n" >/tmp/write_dlhosts
echo -e "\t[ \`grep -il doubleclick /tmp/dlhosts\` ] && break\n\t[ \$n -gt 5 ] && break\n\tlet n+=1\ndone\nkillall -HUP dnsmasq" >>/tmp/write_dlhosts
chmod +x /tmp/write_dlhosts
/tmp/write_dlhosts &
gaping46and2
DD-WRT Novice


Joined: 19 Mar 2009
Posts: 2

PostPosted: Tue Mar 24, 2009 22:05    Post subject: Reply with quote
What would running this script do for me that using Adblock Plus in Firefox doesn't? Would this help in loading pages faster, by not trying to download banner ads, etc?
GDixon
DD-WRT Novice


Joined: 24 Mar 2009
Posts: 10

PostPosted: Tue Mar 24, 2009 23:52    Post subject: Reply with quote
they compliment one another and with the script i don't need to fiddle with the hosts file on every system on line, just load it in the router and they all get to take advantage .
frater
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2777

PostPosted: Wed Mar 25, 2009 7:47    Post subject: Reply with quote
No, it looks alright (did a compare with examdiff)

Can you post the result of?
Code:
cat /tmp/write_dlhosts

Code:
#!/bin/sh
n=1
while sleep 60
do
        wget -q -O - http://www.mvps.org/winhelp2002/hosts.txt | grep "^127.0.0.1" | grep -v localhost | awk '{print "192.168.10.5\t"$2}' | tr -d '\015' >/opt/dlhosts

        [ `grep -il doubleclick /opt/dlhosts` ] && break
        [ $n -gt 5 ] && break
        let n+=1
done
killall -HUP dnsmasq

_________________
Asus RT16N + OTRW
Kingston 4GB USB-disk 128 MB swap + 1.4GB ext3 on /opt + 2 GB ext3 on /mnt
Copperjet 1616 modem in ZipB-config
Asterisk, pixelserv & Pound running on router
Another Asus RT16N as WDS-bridge

DD-WRT v24-sp2 vpn (c) 2010 NewMedia-NET GmbH
Release: 12/16/10 (SVN revision: 15758M)
gaping46and2
DD-WRT Novice


Joined: 19 Mar 2009
Posts: 2

PostPosted: Wed Mar 25, 2009 16:36    Post subject: Reply with quote
Is there a way to add additional addresses manually that are not included in the supplied host file through that link, or would that be better done on each individual computer on the network (though would be time consuming and not convenient)?
Goto page Previous  1, 2, 3, 4, 5 ... 12, 13, 14  Next Display posts from previous:    Page 4 of 14
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