Go Back   EQEmulator Home > EQEmulator Forums > General > General::General Discussion

General::General Discussion General discussion about EverQuest(tm), EQEMu, and related topics.
Do not post support topics here.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #15  
Old 04-28-2010, 04:36 PM
steve
Discordant
 
Join Date: Jan 2002
Posts: 305
Default

For Tomato Firmware users:

1) Goto Administration>Scheduler. In the 'Custom 1' box, setup a time you want the router to update the hostfile (preferably once per week. I use Sunday at 4am). Check Enabled, select time and days.

2) Paste the following into the 'command box':
Code:
xyz=allowlist;hij=adblock.tmp;abc=dnsmasq_adblock.conf;tip=192.168.1.1;wget -q -O /tmp/$abc 'http://pgl.yoyo.org/adservers/serverlist.php?hostformat=dnsmasq&showintro=0&mimetype=plaintext';[ -f /tmp/$xyz ] && (cat /tmp/$abc | grep -v -f /tmp/$xyz>>/tmp/$hij; mv -f /tmp/$hij /tmp/$abc);[ $? -eq 0 -a `grep ^address= /tmp/$abc|wc -l` -gt 0 ] && (logger -t adblock -p 5 Server download OK;cat /tmp/$abc|sed 's/127.0.0.1/'$tip'/g'>/etc/$abc;[ ! -s /cifs1 ] && mv -f /tmp/$abc /cifs1/$abc.bak || rm /tmp/$abc;[ -h /etc/dnsmasq.custom ] && service dnsmasq restart) || (logger -t adblock -p 4 Server download failed;[ ! -s /etc/$abc -a -s /cifs1/$abc.bak ] && (logger -t adblock -p 5 Data recovered from backup;cat /cifs1/$abc.bak|sed 's/127.0.0.1/'$tip'/g'>/etc/$abc;[ -h /etc/dnsmasq.custom ] && service dnsmasq restart));unset xyz hij abc tip
3) Click 'Save' at the bottom of the page.

4) Now goto Administration>Scripts. Click on the 'Init' tab if it's not already selected, and paste the following code into it and click 'Save'. NOTE: You can add as many 'echo' lines as you like to remove those hostnames from the blocked hostname list. I added Google Analytics because it stalls a lot of pages from loading if they use it.
Code:
echo "google-analytics">/tmp/allowlist
echo "ssl.google-analytics.com">>/tmp/allowlist
[ ! -f /tmp/dnsmasq.chk ] && (ln -s /etc/dnsmasq_adblock.conf /etc/dnsmasq.custom;touch /tmp/dnsmasq.chk)
5) Click on the 'WAN Up' tab at the top. Paste the following code into it, and click 'Save':
Code:
[ ! -f /etc/dnsmasq_adblock.conf ] && eval `nvram get sch_c1_cmd`
ps | grep [p]ixelserv
if [ $? == 1 ]; then
    wget -P /var http://pixelserv.webs.com/pixelserv
    chmod +x /var/pixelserv
    /var/pixelserv
fi
6) Goto 'Administration>Admin Access' and change 'Local Access' to HTTPS only (so the pixelserv server can run on port 80) and enter a port to run the router webserver on - I used 8080. Click 'Save' at the bottom.

7) Reboot router and if all went all, advertisements will be blocked on 99% of all websites and will be replaced with a 1x1 pixel transparent image - no red X's or boxes where the ads would normally be located.

I believe that's all the steps. At least all that I can remember from setting it up. If anyone tries this and it does/doesn't work, be sure to let me know. One thing to note is I just made the webs account to host the pixelserv - not sure how reliable they are, but I think it should be ok. The pixelserv binary is downloaded everytime the router is rebooted and is only 10kb.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 04:21 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3