1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Ad Blocking

Discussion in 'Tomato Firmware' started by Bill_S, Jan 2, 2012.

  1. Bill_S

    Bill_S Network Guru Member

    I am using Tomato Version 1.28 on a Linksys WRT54GL router and I would like to install a simple adv blocking script. I have tried to install various ones listed on this forum but it is really confusing. Once someone posts one many people jump in and make suggestions and the person that posts the original makes changes but it is hard to tell where the latest working script is within the posts.
    Can someone point me to the exact location of a simple script with installation instructions for my version of Tomtao and my router? In addition, can you give me a website or method to test if the script is working?
    Thank you very much for the help.
     
  2. Bill_S

    Bill_S Network Guru Member

    Thanks, did what you advised and looked at the log file after the restarting router and found this.
    Dec 31 22:00:54 Router daemon.crit dnsmasq[450]: cannot read /etc/adblock.conf: No such file or directory
    Dec 31 22:00:54 Router daemon.crit dnsmasq[450]: FAILED to start up
    Dec 31 22:00:54 Router user.notice root: ADBLOCK ERROR: restarting dnsmasq...
    Dec 31 22:00:54 Router daemon.crit dnsmasq[455]: cannot read /etc/adblock.conf: No such file or directory
    Dec 31 22:00:54 Router daemon.crit dnsmasq[455]: FAILED to start up

    Dates are not correct but the log is.

    Can you also suggest I way to test if it is working such as a website that has a lot of advertising that will be blocked with this
     
  3. Bill_S

    Bill_S Network Guru Member

    Sorry, my error, I had something in Dnsmasq custom configuration from another ad blocking script that was causing the problem. Once I removed it the script ran without errors. But would still like to test on a known website if anyone can suggest one.
    Thanks larbol for your help.
     
  4. Bill_S

    Bill_S Network Guru Member

    Perfect, no ad.
    Thanks again larsbol.
     
  5. Bill_S

    Bill_S Network Guru Member

    Update, I was looking at the log file on my router and found the following entries, can anyone tell me what they mean, is the ad blocking working or is something broken?

    Jan 8 14:06:40 ROUTER user.notice root: ADBLOCK: http://mirror1.malwaredomains.com/files/justdomains
    Jan 8 14:06:42 ROUTER user.notice root: ADBLOCK: http://www.malwaredomainlist.com/hostslist/hosts.txt
    Jan 8 14:06:55 ROUTER user.notice root: ADBLOCK: http://winhelp2002.mvps.org/hosts.txt
    Jan 8 14:06:59 ROUTER user.notice root: ADBLOCK: 36010 entries
    Jan 8 14:06:59 ROUTER user.notice root: ADBLOCK: sorting hosts...
    Jan 8 14:10:12 ROUTER user.notice root: ADBLOCK: hosts sorted.
    Jan 8 14:10:12 ROUTER user.notice root: ADBLOCK: 28606 entries
    Jan 8 14:10:17 ROUTER daemon.info dnsmasq[99]: exiting on receipt of SIGTERM
    Jan 8 14:10:20 ROUTER daemon.crit dnsmasq[535]: error at line 28606 of /tmp/gen
    Jan 8 14:10:20 ROUTER daemon.crit dnsmasq[535]: FAILED to start up
    Jan 8 14:10:20 ROUTER user.notice root: ADBLOCK ERROR: restarting dnsmasq...
    Jan 8 14:10:20 ROUTER daemon.info dnsmasq[542]: started, version 2.55 cachesize 150
    Jan 8 14:10:20 ROUTER daemon.info dnsmasq[542]: compile time options: no-IPv6 GNU-getopt no-RTC no-DBus no-I18N DHCP no-scripts no-TFTP
     
  6. marshcroft

    marshcroft Networkin' Nut Member

    Bill,

    I have the same thing, wasted time updating my router today trying different firmwares.
     
  7. marshcroft

    marshcroft Networkin' Nut Member

    Jan 8 16:25:08 unknown daemon.info pixelserv[958]: /tmp/mnt/PIXELSERV/pixelserv V27 compiled: Dec 12 2010 21:49:05 from pixelserv27.c Jan 8 16:25:08 unknown daemon.notice pixelserv[960]: Listening on br0 192.168.1.2:80 Jan 8 16:25:20 unknown user.notice root: ADBLOCK: http://pgl.yoyo.org/as/serverlist.php?hostformat=nohtml Jan 8 16:25:21 unknown user.notice root: ADBLOCK: http://mirror1.malwaredomains.com/files/justdomains Jan 8 16:25:21 unknown user.notice root: ADBLOCK: http://www.malwaredomainlist.com/hostslist/hosts.txt Jan 8 16:25:24 unknown user.notice root: ADBLOCK: http://winhelp2002.mvps.org/hosts.txt Jan 8 16:25:28 unknown user.notice root: ADBLOCK: http://hosts-file.net/hphosts-partial.asp Jan 8 16:25:43 unknown cron.err crond[533]: time disparity of 22100964 minutes detected Jan 8 16:25:58 unknown user.notice root: ADBLOCK: http://hostsfile.mine.nu/Hosts Jan 8 16:25:58 unknown user.notice root: ADBLOCK: http://www.abuse.ch/spyeyetracker/blocklist.php?download=domainblocklist Jan 8 16:25:59 unknown user.notice root: ADBLOCK: http://www.abuse.ch/zeustracker/blocklist.php?download=domainblocklist Jan 8 16:25:59 unknown user.notice root: ADBLOCK: https://easylist-downloads.adblockplus.org/easylist.txt Jan 8 16:26:01 unknown user.notice root: ADBLOCK: 132318 entries Jan 8 16:26:01 unknown user.notice root: ADBLOCK: sorting hosts... Jan 8 16:30:06 unknown user.notice root: ADBLOCK: hosts sorted. Jan 8 16:30:06 unknown user.notice root: ADBLOCK: 72028 entries Jan 8 16:30:08 unknown daemon.info dnsmasq[576]: exiting on receipt of SIGTERM Jan 8 16:30:09 unknown daemon.crit dnsmasq[1266]: error at line 72028 of /tmp/gen Jan 8 16:30:09 unknown daemon.crit dnsmasq[1266]: FAILED to start up Jan 8 16:30:09 unknown user.notice root: ADBLOCK ERROR: restarting dnsmasq...
     
  8. marshcroft

    marshcroft Networkin' Nut Member

    OK found it, winhelp2002.mvps.org/hosts.txt update that was causing the issue. You can disable it for now until they fix it.
    I found it on the master forum for this script at the end

    http://www.linksysinfo.org/index.php?threads/all-u-need-ad-blocking.33191/page-13

    While you are at it you may want to add these ones in also for some added protection
    http://www.abuse.ch/spyeyetracker/blocklist.php?download=domainblocklist
    http://www.abuse.ch/zeustracker/blocklist.php?download=domainblocklist
    https://easylist-downloads.adblockplus.org/easylist.txt
    If the script is too big then just trim off the header at the top of the script for the space.
     
  9. Bill_S

    Bill_S Network Guru Member

  10. marshcroft

    marshcroft Networkin' Nut Member

    This is how I have mine set, delete your ##4 out
    You will see I have 1 2 3 5 8 9 10 running, 4 is out for now, 6 and 7 kills just about everything out there on the net so I disabled it but they are personal preference if you want them then put 6 and 7 back into the GETS line.

    OPTIMISE="Y"
    GETS="1 2 3 5 8 9 10"
    TRIM_BEGIN=3
    S1="http://pgl.yoyo.org/as/serverlist.php?hostformat=nohtml" #44K
    S2="http://mirror1.malwaredomains.com/files/justdomains" #189K
    S3="http://www.malwaredomainlist.com/hostslist/hosts.txt" #97K
    S4="http://winhelp2002.mvps.org/hosts.txt" #620K
    S5="http://hosts-file.net/hphosts-partial.asp" #460K
    S6="http://hostsfile.mine.nu/Hosts" #2641K
    S7="http://support.it-mate.co.uk/downloads/hosts.txt" #3851K
    S8="http://www.abuse.ch/spyeyetracker/blocklist.php?download=domainblocklist"
    S9="http://www.abuse.ch/zeustracker/blocklist.php?download=domainblocklist"
    S10="https://easylist-downloads.adblockplus.org/easylist.txt"
     
  11. Bill_S

    Bill_S Network Guru Member

    Great, thanks. Did you get any error messages after you make these adjustments? Can't test mine because my wife is on the IP phone and she will kill me if I reboot now.
     
  12. marshcroft

    marshcroft Networkin' Nut Member

    After I made the change I didnt get an error, glad I checked as my time is set to the wrong zone now

    Jan 8 23:06:33 unknown daemon.info pixelserv[1127]: /jffs/pixelserv V27 compiled: Dec 12 2010 21:49:05 from pixelserv27.c
    Jan 8 23:06:34 unknown daemon.notice pixelserv[1129]: Listening on br0 192.168.1.2:80
    Jan 8 23:06:43 unknown user.notice root: ADBLOCK: http://pgl.yoyo.org/as/serverlist.php?hostformat=nohtml
    Jan 8 23:06:44 unknown user.notice root: ADBLOCK: http://mirror1.malwaredomains.com/files/justdomains
    Jan 8 23:06:45 unknown user.notice root: ADBLOCK: http://www.malwaredomainlist.com/hostslist/hosts.txt
    Jan 8 23:06:52 unknown user.notice root: ADBLOCK: http://hosts-file.net/hphosts-partial.asp
    Jan 8 23:06:52 unknown user.notice root: ADBLOCK: http://www.abuse.ch/spyeyetracker/blocklist.php?download=domainblocklist
    Jan 8 23:06:53 unknown user.notice root: ADBLOCK: http://www.abuse.ch/zeustracker/blocklist.php?download=domainblocklist
    Jan 8 23:06:53 unknown user.notice root: ADBLOCK: https://easylist-downloads.adblockplus.org/easylist.txt
    Jan 8 23:06:54 unknown user.notice root: ADBLOCK: 23771 entries
    Jan 8 23:06:54 unknown user.notice root: ADBLOCK: sorting hosts...
    Jan 8 23:07:05 unknown cron.err crond[559]: time disparity of 22101006 minutes detected
    Jan 8 23:07:37 unknown user.notice root: ADBLOCK: hosts sorted.
    Jan 8 23:07:37 unknown user.notice root: ADBLOCK: 22556 entries
    Jan 8 23:07:38 unknown daemon.info dnsmasq[609]: exiting on receipt of SIGTERM
    Jan 8 23:07:38 unknown daemon.info dnsmasq[1377]: started, version 2.59 cachesize 150
    Jan 8 23:07:38 unknown daemon.info dnsmasq[1377]: compile time options: IPv6 GNU-getopt no-RTC no-DBus no-i18n DHCP TFTP no-

    conntrack no-IDN
    Jan 8 23:07:38 unknown daemon.info dnsmasq-dhcp[1377]: DHCP, IP range 192.168.1.110 -- 192.168.1.120, lease time 1d
    Jan 8 23:07:38 unknown daemon.info dnsmasq[1377]: reading /etc/resolv.dnsmasq
     
  13. Bill_S

    Bill_S Network Guru Member

    Thanks again, will let you know what happens when I reboot the router.
     
  14. Bill_S

    Bill_S Network Guru Member

    Ok, just rebooted the router and all is fine. I get the same message about the time disparity but I believe that is do to the firmware and is adjusted in the boot process.
     
  15. marshcroft

    marshcroft Networkin' Nut Member

    Disparity, is due to the router when being rebooted goes to the firmware date either December or Jan, then when it kicks in the timeupdate you get the error, in reality its just a info message saying how much time it modified your router by so its safe to ignore.
     
  16. Bill_S

    Bill_S Network Guru Member

    That takes care of my problems, thank you very much Marshcroft, for the help.
     
  17. JTD121

    JTD121 Networkin' Nut Member

    Dumb question; I have read the first page or so of this thread, is there a 'minimum' requirement, router-wise, with RAM, CPU, etc for this to work, well, transparently/seemlessly?

    Obviously, I'd probably have to take out the larger items (S6, S7 in the default config), but I wonder, if this is something to consider for a lowly WTR54G? Or stick with ABP in Firefox?
     
  18. marshcroft

    marshcroft Networkin' Nut Member

    JTD121, it depends on the model of the 54G. If you have 32 MB RAM then use it, 16meg I would test it but test it, 8 meg dont touch it stay with Firefox if you dont know what you have then take a look here
    http://en.wikipedia.org/wiki/Linksys_WRT54G_series
     
  19. JTD121

    JTD121 Networkin' Nut Member

    Yeah, I have a 16MB RAM router. I don't have anything really running on it as far as extras, mostly just Tomato running stock (well, Toastmans' builds). I guess I'll stick with the ABP extensions
     
  20. marshcroft

    marshcroft Networkin' Nut Member

  21. fubdap

    fubdap Addicted to LI Member

    @Marshcroft,
    Looking at your settings on post #12. Just curious. The TRIM_BEGIN=3. My understanding is S1 and S2 are files with hostname only which are copied without formatting by Adblock.
    S3 to Sxx are file formatted to replace hosts file, these files will be formatted to works with AdBlock. The TRIM_BEGIN tells AdBlock which sources need formatting (from S3 to the end).


    It looks like S8 and S9 are hostname that do not need formatting. Should they be moved up to S3 and S4 and then change the TRIM_BEGIN to 5? Again, this is out of curiosity. I am not sure if my understanding is correct.
     
  22. Bill_S

    Bill_S Network Guru Member

    Thanks Marshcroft, I put 4 back in. By the way, is the data downloaded only when the router reboots or is there a specified time that it runs?
    Is fubdap correct aobut the TRIM_BEGIN and moving S8 & S9?
     
  23. marshcroft

    marshcroft Networkin' Nut Member

    I did play with that originally, it does make sence though as they don't show the 127.0.0.1 in the file but everytime DNSMASK would not start similar issue to s4 when we saw that broken. I also never saw a difference in number of hosts loaded up.

    As for the update of the links, it states that a WanUp will trigger this, I am using JFFS instead of a USB flash drive, due to I found the JFFS much faster and no other reason. I do see though that a WAN down and WAN up doesnt reload the hosts as the PIXELSERV is already loaded into JFFS memory, therefore I have set my Router to do a scheduled reboot every morning at 4am in my case.
     

Share This Page