Script: Clean, Lean and Mean Adblocking

Discussion in 'Tomato Firmware' started by haarp, Apr 23, 2013.

  1. jerrm

    jerrm Network Guru Member

    That shouldn't really matter. Just point the clients directly to your DNS service instead of google, opendns, etc.

    DNS resolution currently follows this path:
    host -> dnsmasq -> smartdns

    For the desired units, you just need to change it to:
    host -> smartdns
     
  2. rs232

    rs232 Network Guru Member

    Interesting...
    I'm wondering is this below could be a starting point to use Easylist or in general URL based filtering.

    Code:
    root@tomato213w:/tmp# wget -qO- https://google.com/ | grep -Eo "(http|https)://[\da-z./?A-Z0-9\D=_-]*"
    http://schema.org/WebPage
    https://www.google.co.uk/imghp?hl=en
    https://maps.google.co.uk/maps?hl=en
    https://play.google.com/?hl=en
    https://www.youtube.com/?gl=GB
    https://news.google.co.uk/nwshp?hl=en
    https://mail.google.com/mail/?tab=wm
    https://drive.google.com/?tab=wo
    http://www.google.co.uk/intl/en/options/
    http://www.google.co.uk/history/optout?hl=en
    https://accounts.google.com/ServiceLogin?hl=en
    https://www.google.co.uk/
    https://plus.google.com/103583604759580854844
    https://www.google.co.uk/setprefdomain?prefdom=US
    
    I'm not sure what would be the best way to apply a filter without using a proxy though... perhaps iptables layer7 detection?

    Completely untested and for discussion only:
    Code:
    iptables -I FORWARD -p tcp --match multiport --dports 80,443 -s 0.0.0.0/0 -m string --string "$URLgoesHERE" --algo kmp -j DROP
    Or perhaps adblock could act as non caching proxy?
     
  3. jerrm

    jerrm Network Guru Member

    Nothing short of a full blown man-in-the-middle ssl proxy config with custom certs installed on the clients could see the https urls.

    The string module won't work because you would need to match the component parts of the url in the http header.

    The best choice for http in stock Tomato would be the web module.

    Either way would be inefficient, needing hundreds of individual rules.
     
  4. Bantuman

    Bantuman New Member Member

    Edit: Problem solved, Needed to tick Advanced-->DHCP/DNS-->Use internal DNS.
    Thanks anyway.

    adblock status:

    blocklist: down

    I've gone over the instructions several times and reinstalled twice. Everything seems to work as expected, no strange errors in the log, at least none I can see. But the blocklist stays down.

    Asus RT N-16: Tomato 1.28.0000 MIPSR2-131 K26 USB AIO
    Bridged (vlan2) to a cable modem.

    logs are at pastebin.ca/3175543. Sorry it's not a link, I can't seem to post either the code itself or a proper link to it.

    Any help would be appreciated.

    E.E.
     
    Last edited: Sep 27, 2015
  5. animaciek

    animaciek Serious Server Member

    I'm trying to install via code below but no joy. Config files are copied to my local USB drive but neither adblock or pixelserv is starting. Any help please!

    export PREFIX=/tmp/mnt/Tomato_USB/opt/bin
    wget -O - http://goo.gl/GfA7cQ | sh

    Connecting to goo.gl (64.15.124.218:80)
    Connecting to tomato-adblock.weebly.com (199.34.228.53:80)
    - 100% |*******************************| 2286 0:00:00 ETA
    Connecting to tomato-adblock.weebly.com (199.34.228.53:80)
    adblock-install.zip 32% |********** | 110k 0:00:02 ETA
    adblock-install.zip 100% |*******************************| 341k 0:00:00 ETA
    Archive: adblock-install.zip
    inflating: adblock-2015-09-14.zip
    inflating: pixelserv-install.zip
    Archive: adblock-2015-09-14.zip
    inflating: adblock.sh
    inflating: adblockweb.sh
    inflating: adblock.changelog
    inflating: adblock.ini.default
    inflating: adblock.ini.readme
    Archive: pixelserv-install.zip
    creating: pixelserv/arm/
    inflating: pixelserv/arm/LICENSE
    inflating: pixelserv/arm/README.md
    inflating: pixelserv/arm/pixelserv.tomatoware.performance.dynamic
    inflating: pixelserv/arm/pixelserv.tomatoware.performance.static
    inflating: pixelserv/arm/VERSION
    creating: pixelserv/mips/
    inflating: pixelserv/mips/LICENSE
    inflating: pixelserv/mips/README.md
    inflating: pixelserv/mips/pixelserv.tomatoware.performance.dynamic
    inflating: pixelserv/mips/pixelserv.tomatoware.performance.static
    inflating: pixelserv/mips/VERSION
    creating: pixelserv/mipsK24/
    inflating: pixelserv/mipsK24/LICENSE
    inflating: pixelserv/mipsK24/README.md
    inflating: pixelserv/mipsK24/pixelserv.mips.performance.dynamic
    inflating: pixelserv/mipsK24/pixelserv.mips.performance.static
    adblock-install: installing /tmp/mnt/Tomato_USB/opt/bin/adblock.changelog
    adblock-install: installing /tmp/mnt/Tomato_USB/opt/bin/adblock.ini.readme
    adblock-install: installing /tmp/mnt/Tomato_USB/opt/bin/adblock.ini.default
    adblock-install: installing /tmp/mnt/Tomato_USB/opt/bin/adblock.sh
    adblock-install: installing /tmp/mnt/Tomato_USB/opt/bin/adblockweb.sh
    adblock-install: installing /tmp/mnt/Tomato_USB/opt/bin/pixelserv.tomatoware.performance.static
    adblock-install: creating 'pixelserv' link for /tmp/mnt/Tomato_USB/opt/bin/pixelserv.tomatoware.performance.static
    adblock-install: installing default config file /tmp/mnt/Tomato_USB/opt/bin/adblock.ini
     
  6. jerrm

    jerrm Network Guru Member

    The install only installs the files.

    Are you running the script? If so, what is the output.
     
  7. glennsamuel32

    glennsamuel32 Network Newbie Member

    Would it be possible to disable updating and just use a large custom blocklist ( about 350,000 host names) ?
    I tried commenting out all the download links and added my custom list, but that gave out an error and the 16 mb blocklist became an empty file on reboot...
     
  8. pharma

    pharma Network Guru Member

    Not sure why that's happening. I maintain a separate list which I pasted into the blacklist section (AdblockWeb --> Edit lists --> Blacklist. A Blacklist.txt is created and stored (USB in my case) and remains intact after reboots.

    I pretty much used the method in the link below with Jerrm's latest Adblock on a USB drive. Works excellent and extremely easy to maintain.
    https://github.com/RMerl/asuswrt-merlin/wiki/Disable-Windows-10-tracking

    For reference ...
    http://www.linksysinfo.org/index.ph...and-mean-adblocking.68464/page-16#post-265584
     
  9. jerrm

    jerrm Network Guru Member

    If using my mod, set SOURCES="" to use only local blacklists, seems to work OK here.
     
    Goggy likes this.
  10. glennsamuel32

    glennsamuel32 Network Newbie Member

    Thx for the replies...

    I'm using this to install...
    wget -O - http://goo.gl/GfA7cQ | sh

    As Adblock wasn't running on startup, I added /opt/adblock/./adblock.sh
    to the Firewall start...
    I'm guessing that's the mistake I'm making :(

    It works just fine except I cannot use my custom lists...
    Any advise is much appreciated...thx...

    btw, I'm using Shibby's latest firmware on a RT-N66U...
     
  11. jerrm

    jerrm Network Guru Member

    Blacklist only option works OK here.

    Post your config file, output of adblock, and first few lines of the blacklist.
     
  12. glennsamuel32

    glennsamuel32 Network Newbie Member

    @jerrm

    Thanks for your input...
    I'll try this in the weekend and report back...
     
  13. glennsamuel32

    glennsamuel32 Network Newbie Member

    hmmm...it's working fine now :)
    I must have messed up somewhere earlier...

    Thx again @jerrm and @pharma for helping me out...
     
  14. DracoMilesX

    DracoMilesX Networkin' Nut Member

    I am trying to install adblock with the script but when it's installing it keeps on saying cp: can't preserve permissions ... Operation not permitted. It basicly says it for every file. Tryed it from web interface and ssh.
     
  15. jerrm

    jerrm Network Guru Member

    What type of volume is it being copied to? Are the files making it to the destination?
     
  16. DracoMilesX

    DracoMilesX Networkin' Nut Member

    It's copied to a usb stick put into my RT-N66U (/tmp/mnt/RouterUSB01/adblock)

    The files are are making it into the destination.
     
  17. jerrm

    jerrm Network Guru Member

    What type of volume? FAT/NTFS/Ext2-3-4?
     
  18. DracoMilesX

    DracoMilesX Networkin' Nut Member

    /dev/sdb1 on /tmp/mnt/RouterUSB01 type vfat (rw,nodev,noatime,fmask=0022,dmask=0022,codepage=cp850,iocharset=utf8,shortname=winnt,flush)

    edit: By the looks of it it works when I format it as NTFS. The permission change from 755 to 777 once mounted as well.

    Also wondering is it possible to get AdvancedTomato support for the tomato link? It doesn't seem to add it now
     
    Last edited: Oct 2, 2015
  19. JoeyJoeJoe

    JoeyJoeJoe Guest

    I noticed the padding on the refresh looks weird when the uptime hits a certain count. Either making it always have space or changing the unit/truncating when it gets so high. That or I could just restart.

    01.png
     
  20. Katjubu

    Katjubu Network Newbie Member

    Running into a problem installing on a FAT32 USB drive. Using the install script I get normal output until this:

    ln: /tmp/mnt/ADBLOCK/pixelserv: Operation not permitted
    Am I doing something wrong? Also, It works if I manually install Pixelserv to the flash drive.
     
  21. jerrm

    jerrm Network Guru Member

    FAT probably doesn't supports links.

    I don't think I've had a FAT volume of any kind mounted in over ten years, I just don't think about it. I'll modify the install at some point, until then either manually copy or set pixelbin in the config file.
     
    Last edited: Oct 4, 2015
  22. windom

    windom Serious Server Member

    From what I can see, you are trying to copy to a vfat filesystem. VFAT cannot store unix-type file permissions, hence the error. This goes along with link problem mentioned above. If you cannot install manually, IMHO, your best best is to format the destination drive to ext(234) before running the script again.

    Fare thee well.

    -w-
     
  23. QSxx

    QSxx Network Guru Member

    Any way of getting unzip to work on K24 releases (or rather is there a version of K24 with unzip included)?

    I'm trying to setup adblock on my old WRT54G-TM for my dad's house but without much success atm (yes i know i can install script manually - i was aiming at doing it remotely/automatically).

    ATM install script fails with unzip not found error :/
     
  24. jerrm

    jerrm Network Guru Member

    No plans to move to tar files, but I'll look at it the next time I push a new version out. Don't expect anything soon.
     
  25. Link2User

    Link2User Networkin' Nut Member


    I got it working copied in the block in the .txt and did the mods you suggested, and it displays "Done."

    But it doesn't seem to block anything.

    Also is there any conflict between adblock and p2partisan ?
     
  26. rs232

    rs232 Network Guru Member

    Not that I'm aware of
     
  27. QSxx

    QSxx Network Guru Member

    Any way to make this run on ubuntu machine? Just for blocklist generation? I'm trying to include larger source files but it fails due to limited ram on my WRT54G, RT-N12 and RT-N16...

    So far it fails with
    Code:
    qs@holodeck3:~/adblock$ wget -O - http://goo.gl/GfA7cQ | sh
    --2015-10-11 10:49:27--  http://goo.gl/GfA7cQ
    Resolving goo.gl (goo.gl)... 208.117.229.213, 208.117.229.216, 208.117.229.219, ...
    Connecting to goo.gl (goo.gl)|208.117.229.213|:80... connected.
    HTTP request sent, awaiting response... 301 Moved Permanently
    Location: http://tomato-adblock.weebly.com/uploads/6/0/0/7/60074921/adblock-install.sh [following]
    --2015-10-11 10:49:27--  http://tomato-adblock.weebly.com/uploads/6/0/0/7/60074921/adblock-install.sh
    Resolving tomato-adblock.weebly.com (tomato-adblock.weebly.com)... 199.34.228.53
    Connecting to tomato-adblock.weebly.com (tomato-adblock.weebly.com)|199.34.228.53|:80... connected.
    HTTP request sent, awaiting response... 200 OK
    Length: 2286 (2,2K) [application/octet-stream]
    Saving to: ‘STDOUT’
    
    100%[===============================================================================================================>] 2.286       --.-K/s   in 0,001s 
    
    2015-10-11 10:49:28 (1,51 MB/s) - written to stdout [2286/2286]
    
    sh: 20: Bad substitution
     
  28. jerrm

    jerrm Network Guru Member

    Nothing in the script is meant to be portable. It assumes Tomato as the platform. I have no interest at all in chasing down issues on other platforms.

    That said, first thing to do under Ubuntu would be to not use dash as the shell, I think busybox is usually linked up as static-sh on Ubuntu.
     
  29. WaLLy3K

    WaLLy3K Networkin' Nut Member

    I run my router in PPPoE mode, and will often need to hit the disconnect button to troubleshoot WAN issues. It seems that when WAN is disconnected/reconnected this way, Adblock will stop working. The issue however, is getting it to start again, as it'll provide an error message similar to this:

    Code:
    Another instance found (/var/run/adblock.pid - 54321), exiting!
    Unfortunately, the only way I know to resolve this is to rm the adblock.pid, and then attempt to restart it. To work around this, maybe we can detect if Adblock is working using a similar method to the following:

    Code:
    AD_IPTA=`iptables -L | grep adblk.fw  2> /dev/null | wc -l`
    AD_PIXSV=`pidof pixelserv &> /dev/null; echo $?`
    if [[ $AD_IPTA -gt "0" -a $AD_PIXSV -eq "0" ]]; then
        AD_STATUS="Running"
    else
        AD_STATUS="Inactive"
    fi
     
    Last edited: Oct 18, 2015
  30. arthur king

    arthur king Networkin' Nut Member

    adblock script was shutdown wile updateing was runing.
    when adblock is up script only runs wile updateing.
    adblock.pid is removed when script dune
    a new adblock.pid is made when script is run again.
     
  31. jerrm

    jerrm Network Guru Member

    The pid file has nothing to do with whether adblock is active, it only exists during the initialization/update process.

    The easiest test to see if adblock is active is to nslookup the test host "adblock.is.loaded." Running without pixelserv and/or iptables are both valid.

    The problem is probably adblock being loaded in wanup. Wanup is almost always the wrong place to load anything - especially if there are connectivity issues.

    As for what is hanging the update, nc and wget will sometimes hanging indefinitely are probably the biggest issues in general. Adding a separate watchdog is possible, but has always seemed a step too far for this script. I have never really liked the script's test/wait for connection logic, but not enough reports trace back to it being a problem .
     
  32. WaLLy3K

    WaLLy3K Networkin' Nut Member

    The problem is though, that adblock will refuse to start if that file exists, despite the fact it was killed due to the disconnect/reconnect - which is a pretty annoying issue for me.

    If that file was ignored during the adblock start/restart process, everything would be fine.
     
  33. jerrm

    jerrm Network Guru Member

    The proper debugging step would be to check the logs and see where it is hanging, and properly kill the prior instance. Deleting the pid file is NOT the right answer..

    Running from wanup is a bad idea.
     
  34. WaLLy3K

    WaLLy3K Networkin' Nut Member

    So from what I've understood of your posts, Adblock will normally survive a disconnect/reconnect if not called from within WAN Up.

    Since I'm not aware of a better way to launch my programs when a WAN IP is detected (SSH tunnels, sunset app, etc), I've exported a firstrun variable in my init script, to be checked and unset in my WAN Up script, so adblock doesn't keep getting called when I reconnect.
     
    Last edited: Oct 19, 2015
  35. jerrm

    jerrm Network Guru Member

    To kill a running update instance: kill $( cat /var/run/adblock.pid ).

    Load from init after system has initialized:
    Code:
    #wait for system and wan to initialize
    A=30
    while [ $A -gt 0 ] ; do
      A=$(( $A - 1 ))
      if [ -f /var/notice/iptables -a -f /var/notice/sysup -a -f /var/notice/wan ] ; then sleep 10 ; break; fi
      sleep 10
    done
    
    #now do stuff
    /path/to/adblock.sh &
    
    Or if you insist from wanup, don't attempt to start if it was already initialized:
    Code:
    nslookup adblock.is.loaded || adblock.sh &
    I use the init method. Anything I do that is not a standard Tomato GUI setting is started from init.
     
    Last edited: Oct 19, 2015
  36. WaLLy3K

    WaLLy3K Networkin' Nut Member

    I'm trying this at the moment, and adblock is still working between disconnects (for anyone interested!):

    Init:
    Code:
    nvram set init=1
    Wanup:
    Code:
    if [[ -z `nvram get init` ]]; then
        logger "Exiting: Not initial launch of 'WAN Up' script"
        exit
    fi
    
    /path/to/adblock.sh
    nvram unset init
     
    Last edited: Oct 19, 2015
  37. jerrm

    jerrm Network Guru Member

    There is no relationship between init and wanup where a variable exported in init should be seen by wanup. I'm surprised adblock ever gets loaded in this scenario, maybe something to do with pppoe connections(which I thankfully have not had to deal with for 3 years or more).

    I'd be curious to see the output of "set >> /tmp/wanup_env.txt" added as the first line of wanup.
     
  38. WaLLy3K

    WaLLy3K Networkin' Nut Member

    You're right. Having performed a full reboot, it clearly doesn't work (yay, haste). Instead, I've updated what I've done above with an nvram variable.

    It seems to be a neater option than waiting for System/WAN to initialise from Init and adblock doesn't have that annoying issue any more. Thanks!
     
  39. jerrm

    jerrm Network Guru Member

    The nslookup approach:
    Code:
    nslookup adblock.is.loaded || adblock.sh &
    Should accomplish the same thing.
     
  40. tytus123

    tytus123 New Member Member

    HI

    When use on my pc custom DNS eg. 8.8.8.8 adblock not work :)
     
  41. jerrm

    jerrm Network Guru Member

    Normal behavior. DNS must be pointed to dnsmasq on the router. Configure the router to intercept dns requests if you want to discourage LAN users from bypassing adblock.
     
    Goggy and Malakai like this.
  42. BrandonS

    BrandonS Serious Server Member

    I have set dnsmasq_logqueries=0 to disable logging after having it on a bit so the webpage still shows the previous logs. Where is this info kept so I can rm it? I've poked around /var and such and can't find it.
     
  43. jerrm

    jerrm Network Guru Member

    If you haven't set log-facility then it is syslog, which is normally /var/log/messages.

    No real need to delete as normal Tomato log syslog rotation will clear it out.
     
  44. BrandonS

    BrandonS Serious Server Member

    Got it, thank you.
     
  45. sithfish

    sithfish Serious Server Member

    Without having to go through 1600 posts, how and what do I add to the blacklist to stop ads in YouTube?

    Sent from my Nexus 7 using Tapatalk
     
  46. DracoMilesX

    DracoMilesX Networkin' Nut Member

  47. sithfish

    sithfish Serious Server Member

    Thanks very much. I'll look into it when I'm free.

    Sent from my Nexus 7 using Tapatalk
     
  48. bingo1105

    bingo1105 Networkin' Nut Member

    Just a quick observation... at my house, I use a 172.16.X.X network and a /24 subnet mask. The adblock script does not specify a netmask and assumes a /16 when creating the bridge interface since 172.16.X.X is a class B subnet. This does cause some slightly odd behavior so I manually edit the script and add the proper subnet mask. No big deal, but I wonder if there's a way to specify the correct subnet mask rather than leave it assumed? Perhaps read lan_netmask from NVRAM and use that explicitly?

    I really love these scripts... thanks to everyone responsible for putting them together!
     
  49. jerrm

    jerrm Network Guru Member

    Next update will have the fix.
     
    AndreDVJ likes this.
  50. jerrm

    jerrm Network Guru Member

    Adblock Updated

    Minor Update

    SCRIPT UPDATED 2015-11-08
    adblock - use appropriate netmask when setting up redirip
    install - update pixelserv to @HunterZ's V35.HZ13
    install - change from zip to tar archive (support older builds without unzip)
    install - reduce warnings/errors when installing to fat/cifs
    install - use copy if link doesn't work for pixelserv (for fat/cifs)

    SCRIPT UPDATED 2015-09-14
    adblock - add /mmc folders to config file search paths
    adblock/web - add warning text if dnsmasq logging is enabled without syslog enabled or log-facility set
    install - add support for K24 pixelserv build
    install - update pixelserv to @HunterZ's V.35HZ12 releases

    SCRIPT UPDATED 2015-09-06
    adblock - add most likely webscript url to log output
    adblock - add quietfire config option to disable firewall autorun syslog output, defaults to quietfire=1
    adblock - make adding link to tomato ui the default ( tomatolink=1 )
    adblock - whitelist/blacklist - better handling of comments
    adblock/web - force ps -w to better handle long paths
    web - change "resolved hosts" report logic, now shows requesting IP, see this discussion
    web - add option to use old "resolved hosts" report, set web_oldresolvedhosts=1 in config


    Download from post 379: http://www.linksysinfo.org/index.ph...-and-mean-adblocking.68464/page-4#post-237877
     
    Last edited: Nov 9, 2015
    losefrag, reimer, Goggy and 1 other person like this.
  51. JoeyJoeJoe

    JoeyJoeJoe Guest

    @jerrm Thanks again for your efforts. What does this mean: ifconfig: SIOCSIFFLAGS: Cannot assign requested address?
     
  52. jerrm

    jerrm Network Guru Member

    Sounds like a bug, probably something isn't parsing correctly. Post or PM these lines from adblock output(along with any additional errors):
    Code:
    ADBLOCK[3134]: 64258 unique hosts to block
    ADBLOCK[3134]: Setting up 192.168.0.254 netmask 255.255.255.0 on br0:adblk
    ADBLOCK[3134]: Setting up pixelserv on 192.168.0.254
    ADBLOCK[3134]: pixelserv[3605]: /opt/bin/pixelserv version: V35.HZ13 compiled: Oct  6 2015 22:35:24 options: 192.168.0.254
    and:
    Code:
    ifconfig $(nvram get lan_ifname)
    and:
    Code:
    which awk
     
  53. JoeyJoeJoe

    JoeyJoeJoe Guest

    Code:
    Nov 10 17:39:18 R7000 user.notice ADBLOCK[4819]: Running as /mnt/RALLY2/adblock/adblock.sh restart
    Nov 10 17:39:18 R7000 user.notice ADBLOCK[4819]: Using config file /mnt/RALLY2/adblock/config
    Nov 10 17:39:18 R7000 user.notice ADBLOCK[4819]: Requested list mode is OPTIMIZE
    Nov 10 17:39:18 R7000 user.notice ADBLOCK[4819]: Logging previously enabled
    Nov 10 17:39:18 R7000 user.notice ADBLOCK[4819]: Logging to /mnt/RALLY2/logs/dnsmasq.log
    Nov 10 17:39:18 R7000 user.notice ADBLOCK[4819]: Creating web link /www/user/adblock.sh
    Nov 10 17:39:18 R7000 user.notice ADBLOCK[4819]: Web interface should be available at http://192.168.1.1/user/adblock.sh
    Nov 10 17:39:18 R7000 user.notice ADBLOCK[4819]: Adding tomato menu item
    Nov 10 17:39:18 R7000 user.notice ADBLOCK[4819]: Stopping
    Nov 10 17:39:18 R7000 user.notice ADBLOCK[4819]: CONF file /etc/dnsmasq.custom truncated
    Nov 10 17:39:18 R7000 daemon.info pixelserv[1984]: 10766 uts, 236 req, 239 avg, 1165 rmx, 579 tav, 10000 tmx, 0 err, 9 tmo, 8 cls, 0 nou, 0 pth, 11 nfe, 2 ufe, 0 gif, 0 bad, 43 txt, 0 jpg, 0 png, 0 swf, 0 ico, 156 ssl, 3 sta, 0 stt, 0 204, 4 rdr, 0 pst, 0 hed
    Nov 10 17:39:18 R7000 daemon.notice pixelserv[1984]: exit on SIGTERM
    Nov 10 17:39:18 R7000 user.notice ADBLOCK[4819]: Restarting dnsmasq
    Nov 10 17:39:18 R7000 user.debug preinit[1]: 182: pptp peerdns disabled
    Nov 10 17:39:18 R7000 daemon.info dnsmasq[5044]: started, version 2.73 cachesize 1500
    Nov 10 17:39:18 R7000 daemon.info dnsmasq[5044]: compile time options: IPv6 GNU-getopt no-RTC no-DBus no-i18n no-IDN DHCP DHCPv6 no-Lua TFTP no-conntrack ipset Tomato-helper auth DNSSEC loop-detect inotify
    Nov 10 17:39:18 R7000 daemon.info dnsmasq[5044]: asynchronous logging enabled, queue limit is 5 messages
    Nov 10 17:39:18 R7000 daemon.info dnsmasq-dhcp[5044]: DHCP, IP range 192.168.1.2 -- 192.168.1.51, lease time 1d
    Nov 10 17:39:18 R7000 daemon.info dnsmasq[5044]: reading /etc/resolv.dnsmasq
    Nov 10 17:39:18 R7000 daemon.info dnsmasq[5044]: using nameserver xxxxxxxxxxxx#53
    Nov 10 17:39:18 R7000 daemon.info dnsmasq[5044]: using nameserver xxxxxxxxxxxx#53
    Nov 10 17:39:18 R7000 daemon.info dnsmasq[5044]: read /etc/hosts - 2 addresses
    Nov 10 17:39:18 R7000 daemon.info dnsmasq[5044]: read /etc/dnsmasq/hosts/hosts - 3 addresses
    Nov 10 17:39:18 R7000 daemon.info dnsmasq-dhcp[5044]: read /etc/dnsmasq/dhcp/dhcp-hosts
    Nov 10 17:39:18 R7000 user.notice ADBLOCK[4819]: ..
    Nov 10 17:39:18 R7000 user.notice ADBLOCK[4819]: Done.
    Nov 10 17:39:18 R7000 user.notice ADBLOCK[4819]: Download starting
    Nov 10 17:39:19 R7000 user.notice ADBLOCK[4819]: Unchanged: http://winhelp2002.mvps.org/hosts.txt (Last-Modified: Thu, 22 Oct 2015 04:50:34 GMT)
    Nov 10 17:39:19 R7000 user.notice ADBLOCK[4819]: Unchanged: http://someonewhocares.org/hosts/hosts (Last-Modified: Mon, 09 Nov 2015 23:52:29 GMT)
    Nov 10 17:39:19 R7000 user.notice ADBLOCK[4819]: Unchanged: http://hosts-file.net/ad_servers.txt (Last-Modified: Tue, 10 Nov 2015 12:51:48 GMT)
    Nov 10 17:39:19 R7000 user.notice ADBLOCK[4819]: Unchanged: http://adaway.org/hosts.txt (Last-Modified: Tue, 25 Aug 2015 22:42:21 GMT)
    Nov 10 17:39:20 R7000 user.notice ADBLOCK[4819]: Unchanged: http://sysctl.org/cameleon/hosts (Last-Modified: Sat, 19 Sep 2015 09:06:03 GMT)
    Nov 10 17:39:38 R7000 user.notice ADBLOCK[4819]: Unchanged: http://www.malwaredomainlist.com/hostslist/hosts.txt (Last-Modified: Mon, 09 Nov 2015 00:05:13 GMT)
    Nov 10 17:39:38 R7000 user.notice ADBLOCK[4819]: Filters unchanged
    Nov 10 17:39:38 R7000 user.notice ADBLOCK[4819]: Setting up  on br0:adblk
    Nov 10 17:39:38 R7000 user.notice ADBLOCK[4819]: Setting up pixelserv on 192.168.1.254
    Nov 10 17:39:38 R7000 daemon.info pixelserv[5290]: /mnt/RALLY2/adblock/pixelserv version: V35.HZ13 compiled: Nov  8 2015 23:33:28 options: 192.168.1.254
    Nov 10 17:39:38 R7000 daemon.err pixelserv[5294]: Abort: Cannot assign requested address - :192.168.1.254:80
    Nov 10 17:39:38 R7000 user.notice ADBLOCK[4819]: pixelserv[5290]: /mnt/RALLY2/adblock/pixelserv version: V35.HZ13 compiled: Nov  8 2015 23:33:28 options: 192.168.1.254
    Nov 10 17:39:39 R7000 user.notice ADBLOCK[4819]: Writing File /etc/dnsmasq.custom
    Nov 10 17:39:39 R7000 user.notice ADBLOCK[4819]: CONF file /etc/dnsmasq.custom changed
    Nov 10 17:39:39 R7000 user.notice ADBLOCK[4819]: Restarting dnsmasq
    Nov 10 17:39:39 R7000 daemon.info dnsmasq[5044]: exiting on receipt of SIGTERM
    Nov 10 17:39:39 R7000 user.debug preinit[1]: 182: pptp peerdns disabled
    Nov 10 17:39:39 R7000 user.notice ADBLOCK[4819]: .....
    Nov 10 17:39:39 R7000 user.notice ADBLOCK[4819]: Done.
    Nov 10 17:39:39 R7000 user.notice ADBLOCK[4819]: Exiting /mnt/RALLY2/adblock/adblock.sh 0
    Code:
    ADBLOCK[4819]: Running as /mnt/RALLY2/adblock/adblock.sh restart
    ADBLOCK[4819]: Using config file /mnt/RALLY2/adblock/config
    ADBLOCK[4819]: Requested list mode is OPTIMIZE
    ADBLOCK[4819]: Logging previously enabled
    ADBLOCK[4819]: Logging to /mnt/RALLY2/logs/dnsmasq.log
    ADBLOCK[4819]: Creating web link /www/user/adblock.sh
    ADBLOCK[4819]: Web interface should be available at http://192.168.1.1/user/adblock.sh
    ADBLOCK[4819]: Adding tomato menu item
    ADBLOCK[4819]: Stopping
    ADBLOCK[4819]: CONF file /etc/dnsmasq.custom truncated
    ADBLOCK[4819]: Restarting dnsmasq
    ADBLOCK[4819]: ..
    ADBLOCK[4819]: Done.
    ADBLOCK[4819]: Download starting
    ADBLOCK[4819]: Unchanged: http://winhelp2002.mvps.org/hosts.txt (Last-Modified: Thu, 22 Oct 2015 04:50:34 GMT)
    ADBLOCK[4819]: Unchanged: http://someonewhocares.org/hosts/hosts (Last-Modified: Mon, 09 Nov 2015 23:52:29 GMT)
    ADBLOCK[4819]: Unchanged: http://hosts-file.net/ad_servers.txt (Last-Modified: Tue, 10 Nov 2015 12:51:48 GMT)
    ADBLOCK[4819]: Unchanged: http://adaway.org/hosts.txt (Last-Modified: Tue, 25 Aug 2015 22:42:21 GMT)
    ADBLOCK[4819]: Unchanged: http://sysctl.org/cameleon/hosts (Last-Modified: Sat, 19 Sep 2015 09:06:03 GMT)
    ADBLOCK[4819]: Unchanged: http://www.malwaredomainlist.com/hostslist/hosts.txt (Last-Modified: Mon, 09 Nov 2015 00:05:13 GMT)
    ADBLOCK[4819]: Filters unchanged
    ADBLOCK[4819]: Setting up  on br0:adblk
    ifconfig: SIOCSIFFLAGS: Cannot assign requested address
    ADBLOCK[4819]: Setting up pixelserv on 192.168.1.254
    ADBLOCK[4819]: pixelserv[5290]: /mnt/RALLY2/adblock/pixelserv version: V35.HZ13 compiled: Nov  8 2015 23:33:28 options: 192.168.1.254
    ADBLOCK[4819]: Writing File /etc/dnsmasq.custom
    ADBLOCK[4819]: CONF file /etc/dnsmasq.custom changed
    ADBLOCK[4819]: Restarting dnsmasq
    ADBLOCK[4819]: .....
    ADBLOCK[4819]: Done.
    ADBLOCK[4819]: Exiting /mnt/RALLY2/adblock/adblock.sh 0
    Code:
    br0        Link encap:Ethernet  HWaddr
               inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
               UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
               RX packets:1735289 errors:0 dropped:0 overruns:0 frame:0
               TX packets:3236048 errors:0 dropped:0 overruns:0 carrier:0
               collisions:0 txqueuelen:0
               RX bytes:137607947 (131.2 MiB)  TX bytes:4774028831 (4.4 GiB)
    
    /usr/bin/awk
    
     
  54. jerrm

    jerrm Network Guru Member

    Now try:
    Code:
    ifconfig br0 | awk -F ' +|:' '/inet addr/{sub(/[0-9]*$/,'222',$4); print $4" netmask "$8}'
    which ifconfig
     
  55. JoeyJoeJoe

    JoeyJoeJoe Guest

    192.168.1.222 netmask 255.255.255.0
    /sbin/ifconfig
     
  56. JoeyJoeJoe

    JoeyJoeJoe Guest

    Could this be related to pixelserv crapping out? It seems to time out after running for a while delays page loads.
     
  57. HorseCalledHorse

    HorseCalledHorse LI Guru Member

    Noticed today that if I stop adblock using the web interface, when I start it again it seems to think pixelserv is down and reports it as such even though the log files show pixelserv has loaded.
     
  58. AndreDVJ

    AndreDVJ LI Guru Member

    Confirmed here. Something is odd with the way web interface calls the restart and this is the error message:
    Code:
    ADBLOCK[5036]: Setting up  on br0:adblk
    ifconfig: SIOCSIFFLAGS: Cannot assign requested address
    From what I could understand it could not set up a virtual interface. If you do an ifconfig, you won't find adblk alias.

    When restart is called from the web interface, this piece of code is executed differently than when restart is called from SSH. I added stuff to log what's in the variable to syslog and "HEYHEY" text to help me find the output...:
    Code:
        #########################################################
        # redirip can be explicitly set in the config file,    #
        # but make sure it is valid as no checks are done    #
        #                            #
        # PIXEL_IP still needs to be set to non-zero for     #
        # pixelserv to be started                #
        #########################################################
        [ "$redirip" = "" ] && {
            rediripandmask=$(ifconfig $BRIDGE | awk -F ' +|:' '/inet addr/{sub(/[0-9]*$/,'$PIXEL_IP',$4); print $4" netmask "$8}')
            logger $rediripandmask "HEYHEY"
            redirip=${rediripandmask%% *}
            logger $redirip "HEYHEY"
        }
    
    Restarting from SSH:
    Code:
    Jan  5 11:32:56 R7000 user.notice ADBLOCK[4031]: Running as /opt/bin/adblock.sh restart
    Jan  5 11:32:57 R7000 user.notice ADBLOCK[4031]: Using config file /opt/bin/adblock.ini
    Jan  5 11:32:57 R7000 user.notice ADBLOCK[4031]: Ignoring extra config file /opt/etc/adblock.ini
    Jan  5 11:32:57 R7000 user.notice root: 192.168.1.254 netmask 255.255.255.0 HEYHEY
    Jan  5 11:32:57 R7000 user.notice root: 192.168.1.254 HEYHEY
    Jan  5 11:32:57 R7000 user.notice ADBLOCK[4031]: Requested list mode is OPTIMIZE
    Jan  5 11:32:57 R7000 user.notice ADBLOCK[4031]: Creating web link /www/user/adblock.sh
    Jan  5 11:32:57 R7000 user.notice ADBLOCK[4031]: Web interface should be available at http://192.168.1.1/user/adblock.sh
    Restarting from web interface:
    Code:
    Jan  5 11:33:21 R7000 user.notice root: 192.168.1.254 netmask 255.255.255.0 HEYHEY
    Jan  5 11:33:21 R7000 user.notice root: 192.168.1.254 HEYHEY
    Jan  5 11:33:22 R7000 user.notice root: 192.168.1.254 netmask 255.255.255.0 HEYHEY
    Jan  5 11:33:22 R7000 user.notice root: 192.168.1.254 HEYHEY
    Jan  5 11:33:23 R7000 user.notice root: 192.168.1.254 netmask 255.255.255.0 HEYHEY
    Jan  5 11:33:23 R7000 user.notice root: 192.168.1.254 HEYHEY
    Jan  5 11:33:24 R7000 user.notice ADBLOCK[5036]: Running as /opt/bin/adblock.sh restart
    Jan  5 11:33:24 R7000 user.notice ADBLOCK[5036]: Using config file /opt/bin/adblock.ini
    Jan  5 11:33:24 R7000 user.notice ADBLOCK[5036]: Ignoring extra config file /opt/etc/adblock.ini
    Jan  5 11:33:24 R7000 user.notice ADBLOCK[5036]: Requested list mode is OPTIMIZE
    Jan  5 11:33:25 R7000 user.notice ADBLOCK[5036]: Creating web link /www/user/adblock.sh
    Jan  5 11:33:25 R7000 user.notice ADBLOCK[5036]: Web interface should be available at http://192.168.1.1/user/adblock.sh
    
    You can see that this piece of code is called more than once, for some reason. Let me know how to contribute further.

    EDIT: Ignore the system date, I'm not home for the next two weeks (and been out for a while), and where I'm staying, my router (Yes double NAT) is behind some firewall and NTP client does not work.
     
  59. jerrm

    jerrm Network Guru Member

    Didn't get a chance to look at it last night. Think I know the issue, with a relatively easy fix. I'll try to post tonight.

    It's only an issue in the web ui, so for now either revert to the last version or start from the command line - it could even be from Tools->System Commands.
     
  60. jerrm

    jerrm Network Guru Member

    Adblock Updated

    Any users who installed the 2015-11-08 version should update.
    Fixes an issue starting/restarting adblock using the webui introduced in 2015-11-08 release.

    SCRIPT UPDATED 2015-11-11
    adblock - properly initialize redirip for recursive webui calls
    adblock - check/post error if both PIXEL_IP and redirip are set

    SCRIPT UPDATED 2015-11-08
    adblock - use appropriate netmask when setting up redirip
    install - update pixelserv to @HunterZ's V35.HZ13
    install - change from zip to tar archive (support older builds without unzip)
    install - reduce warnings/errors when installing to fat/cifs
    install - use copy if link doesn't work for pixelserv (for fat/cifs)

    SCRIPT UPDATED 2015-09-14
    adblock - add /mmc folders to config file search paths
    adblock/web - add warning text if dnsmasq logging is enabled without syslog enabled or log-facility set
    install - add support for K24 pixelserv build
    install - update pixelserv to @HunterZ's V.35HZ12 releases

    Download from post 379: http://www.linksysinfo.org/index.ph...-and-mean-adblocking.68464/page-4#post-237877
     
    Last edited: Nov 12, 2015
  61. tmr250z

    tmr250z Network Guru Member

    I don’t know if this is a bug or if this is just some problem with my setup:

    If I enable logging by adding “log-queries” to the Dnsmasq Custom configuration in the Tomato GUI, then restart adblock, in the adblock webui everything looks fine, adblock status says logging is up and recently blocked/resolved hosts are displayed.

    But if I enable logging by adding “dnsmasq_logqueries=1” to the adblock.ini config file, then restart adblock, in the adblock webui recently blocked/resolved hosts are displayed, but adblock status says logging is down and that it’s not enabled, even though it is working.
     

    Attached Files:

  62. pharma

    pharma Network Guru Member

    See if it helps by changing where you put “dnsmasq_logqueries=1” in the config file.
    In your config file does the statement order resemble the following?

    dnsmasq_logqueries=1
    dnsmasq_custom="conf-dir=/etc/dnsmasq"
    dnsmasq_custom="log-facility=/tmp/mnt/USB_DISK/dnsmasq.log"
    tomatolink=1

    Edit: Just rebooted router with no issues using 2015-11-11 Adblock version . Also restarted via AdBlock homepage actions without any logging problem.
     
    Last edited: Nov 12, 2015
  63. tmr250z

    tmr250z Network Guru Member

    I figured it out, it was just a problem with my setup.

    I had a bunch of commented out notes in the Dnsmasq custom configuration that had apparently filled it to its capacity. So "dnsmasq_logqueries=1" couldn't add log-queries to dnsmasq.custom and dnsmasq.conf like it's supposed to. Once I deleted a lot of those notes, enough space was cleared out for "dnsmasq_logqueries=1" to do its job properly. I then restarted adblock, checked the adblock webui, and all was well.
     
  64. Beast

    Beast Network Guru Member

    Which setting takes priority? The adblock.INI file or the settings in the adblock.sh

    I noticed several settings are redundant between the two.

    TIA
     
  65. HorseCalledHorse

    HorseCalledHorse LI Guru Member

    ^^ Thanks for the quick fix, jerrm! And thanks for keeping this alive and well. I'd hate to live without it!
     
  66. jerrm

    jerrm Network Guru Member

    For my mod, the script contains the default settings. The only item required in the .ini is SOURCES, unless you want/need to customize.
     
  67. phuklok1

    phuklok1 Network Guru Member

    jerrm, the combo of your script and HunterZ's pixelserv MIPS compilation is beyond awesome. Future super minor request for the script. It would be great to be able to set a different update time for host file updates from the config file rather than having to manually edit the actual script each upgrade. For example I set it for 5:10am every other day rather than 2:10 everyday. Editing is not a big deal of course so this is not a really important change for its own sake, but it would be convenient to keep the setting easily accessible permanently. Thanks for all the work you put into this.
     
  68. jerrm

    jerrm Network Guru Member

    Set it in the .ini file. No need to edit the script. See "Scheduling Updates" here.
     
    Last edited: Nov 14, 2015
    Goggy likes this.
  69. phuklok1

    phuklok1 Network Guru Member

    Thanks... sorry for missing that! I am still using the older config file.
     
  70. reaper

    reaper New Member Member

    Hi, have a server VPN and a client VPN on Tomato shibby; should I expect issues or concern with the script messing with iptables?
     
  71. Nuno18

    Nuno18 Serious Server Member

    Hello. I use a VPN client on my tomato firmware. I have some kind of problem so either the script runs normally?
     
  72. Nuno18

    Nuno18 Serious Server Member

    @jerrm

     
  73. jerrm

    jerrm Network Guru Member

    Need more info before I could hazard a guess.

    Make sure you are running the current version, describe the behavior, post or PM the output of "adblock.sh debug" with and without the VPN active.
     
  74. Nuno18

    Nuno18 Serious Server Member

    Ok thank you @jerrm, I'll do it then.

    But I am not able to do the installation script, now see:

    root @ RT-a0639130d39e: / tmp / home / root # export adblock = / opt / bin
    root @ RT-a0639130d39e: / tmp / home / root # wget -O - http://goo.gl/GfA7cQ | sh
    Connecting to goo.gl (216.58.210.110:80)
    Connecting to tomato-adblock.weebly.com (199.34.228.53:80)
    - 100% |****************************************************************************************************************************************************| 2475 00:00:00 ETA
    adblock-install: PREFIX not set, default folders looking for
    mkdir: can not create directory '/ opt / adblock': Read-only file system
    mkdir: can not create directory '/ jffs / adblock': Read-only file system
    mkdir: can not create directory '/ mmc / adblock': Read-only file system
    mkdir: can not create directory '/ cifs1 / adblock': Read-only file system
    mkdir: can not create directory '/ cifs2 / adblock': Read-only file system
    adblock-install: PREFIX not set or the default folder accessible
    adblock-install: aborting

    What am I doing wrong? I am using ssh!

    Already got it! Is this okay?

    ADBLOCK[1915]: Running as /tmp/adblock/opt/bin/adblock.sh cron
    ADBLOCK[1915]: Using config file /tmp/adblock/opt/bin/adblock.ini
    ADBLOCK[1915]: Requested list mode is OPTIMIZE
    ADBLOCK[1915]: Creating web link /www/user/adblock.sh
    ADBLOCK[1915]: Web interface should be available at http://192.168.2.35/user/adblock.sh
    ADBLOCK[1915]: Skip adding tomato link, could not find insertion point in tomato.js
    ADBLOCK[1915]: Config or script has changed - rebuilding list
    ADBLOCK[1915]: Download starting
    ADBLOCK[1915]: Downloading: http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext
    Connecting to pgl.yoyo.org (213.230.210.230:80)
    ADBLOCK[1915]: Downloading: http://winhelp2002.mvps.org/hosts.txt
    Connecting to winhelp2002.mvps.org (216.155.126.40:80)
    - 100% |****************************************************************************************************************************************************| 64535 0:00:00 ETA
    ADBLOCK[1915]: Completed: http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext
    - 100% |****************************************************************************************************************************************************| 507k 0:00:00 ETA
    ADBLOCK[1915]: Completed: http://winhelp2002.mvps.org/hosts.txt
    ADBLOCK[1915]: Downloaded
    ADBLOCK[1915]: Generating /tmp/adblock/opt/bin/adblock/blocklist - OPTIMIZE mode
    ADBLOCK[1915]: Blocklist generated - 2 seconds
    ADBLOCK[1915]: 10466 unique hosts to block
    ADBLOCK[1915]: Setting up 192.168.2.254 netmask 255.255.255.0 on br0:adblk
    ADBLOCK[1915]: Setting up pixelserv on 192.168.2.254
    ADBLOCK[1915]: pixelserv[2241]: /tmp/adblock/opt/bin/pixelserv version: V35.HZ13 compiled: Nov 8 2015 23:33:28 options: 192.168.2.254
    ADBLOCK[1915]: Writing File /etc/dnsmasq.custom
    ADBLOCK[1915]: CONF file /etc/dnsmasq.custom changed
    ADBLOCK[1915]: Restarting dnsmasq
    ADBLOCK[1915]: ..
    ADBLOCK[1915]: Done.
     
    Last edited: Nov 17, 2015
  75. WaLLy3K

    WaLLy3K Networkin' Nut Member

    I'm occasionally seeing errors like this pop up on the Adblock webpage:

    Examples of such lines in my dnsmasq.log file include:

     
  76. jerrm

    jerrm Network Guru Member

    I can't duplicate the behavior. If you can, post the log immediately before and after seeing the behavior,
     
  77. WaLLy3K

    WaLLy3K Networkin' Nut Member

     
  78. sp83tr

    sp83tr New Member Member

    I have the 2015-11-11 version of this script on an ASUS RT-N66U running Shibby's Tomato v132.

    I noticed an issue with logging and the "adblock status" page.

    My script has been up and running for 11 days (since November 22) and logs blocked/resolved hosts to a file on an external USB drive using "log-facility=/mnt/sda1/adblock/xxx.log".

    However, I noticed that the adblock status page only correctly lists recently blocked hosts. The list of recently resolved hosts stopped updating at 11:58 pm on November 30.

    The log file itself is still growing and hosts are still being resolved, but this is not being reflected in the status page.

    Does anyone have suggestions for how I can work this out? If you need more specific info I'd be happy to help.

    On another note, is there a way to limit the size of the dnsmasq log file using the "Dnsmasq Custom configuration" field? This file gets large quickly, and this logging is not affected by the settings applied under "Administration > Logging".
     
    Last edited: Dec 3, 2015
  79. WaLLy3K

    WaLLy3K Networkin' Nut Member

    Huh, I had exactly the same issue at the same time and date (also logging to my USB drive using log-facility). Since I didn't need the data anyway, I just wiped the log:

    Code:
    >/mnt/sda1/adblock/xxx.log
     
  80. jerrm

    jerrm Network Guru Member

    This is an artifact of the log date format being alpha, so in a reverse sort, "Nov" is before "Dec." Folks with log rotation probably won't notice.

    The most reasonable, least performance impacting fix would be to limit the report to the current month. I'm not sure it's worth the cycles to fixup the date to sort across months properly.
     
    WaLLy3K likes this.
  81. Nuno18

    Nuno18 Serious Server Member

    Hello! My pixelserver is giving this error:

    pixelserv info:
    ERROR: No response from pixelserv...
    pixelserv is not runnng on router for 192.168.2.254

    Can anyone help me?
     
  82. sp83tr

    sp83tr New Member Member

    Aha, that makes sense. For the same reason I usually have my systems use the YYYYMMDD format. I like your suggestion to limit the report to the current month. I'll do that.
     
  83. Beast

    Beast Network Guru Member

    Hi

    I have the 2015-11-11 version of this script on an RT-N16. As of late I have been seeing those you can SKIP this add in 4 seconds stuff on youtube. I haven't seen one of those adds since installing adblock version3.9e, that we used to paste in the script section of Tomato. When I see one of these adds and right mouse click on it see it's url.
    I get this [ ], so I added [ youtu.be ] to the blacklist and checked the generated block list.

    https://youtu.be/ UHQ...... <------- deleted must of the letters

    address=/webcounter.be/192.168.1.254
    address=/youtu.be/192.168.1.254 <-------- There it is....
    address=/event.2leva.bg/192.168.1.254

    It is there as you can see, yet these adds keep poping up anyways. And they always have that youtu.be url.

    Any ideas as to why. I would reinstall the script from last year but I can't find it, I may have deleted it.
    I read up on the youtu.be a little. Its some kind of shortening of the original url. But youtube has had this in place for some time. So I am not sure why all of a sudden I getting
    those adds again.

    TIA
     
    Last edited: Dec 4, 2015
  84. Nuno18

    Nuno18 Serious Server Member

    Is there any reason for jerrm script block ads on my iOS diveces and do not block ads in my computer?

    Thanks!
     
  85. WaLLy3K

    WaLLy3K Networkin' Nut Member

    If your computer already has a DNS server set, you'll either need to remove it, or enable "Intercept DNS port (UDP 53)" from within Advanced > DHCP/DNS on your router which will force all clients to use Adblock (unless they use a VPN).
     
    visceralpsyche, Nuno18 and Goggy like this.
  86. Nuno18

    Nuno18 Serious Server Member

    Thank you @WaLLy3K, so was the DNS server that was active in the Windows connection and no longer remembered.

    Google's DNS already have configured on my router and also have an OpenVPN client connection to all network traffic.


    Sent from my iPad using Tapatalk
     
  87. Mojonba

    Mojonba Network Guru Member

    .
     
    Last edited: Dec 9, 2015
  88. Nathaniel Cowles

    Nathaniel Cowles Networkin' Nut Member

    I deleted everything and installed the latest adblock. I still get this strange behavior occasionally but all is working fine again only with a reboot:
     

    Attached Files:

  89. IngoPan

    IngoPan Serious Server Member

    Hallo,

    Does some1 know if this adblock script is running on OpenWRT too without any modifications ?
     
  90. jerrm

    jerrm Network Guru Member

    Almost certainly not. This is designed for Tomato and uses several tomato specific features.
     
  91. GLuDeRo

    GLuDeRo Serious Server Member

    You are not the only one. I found out that sometime refreshing the list causes this problem. Only way out is

    rm -rf /opt/etc/adblock

    And try running it from scrach


    Sent from my iPhone using Tapatalk
     
  92. Connor McCaffrey

    Connor McCaffrey Networkin' Nut Member

    curious if this adblock method is working for ipv6 and all youtube adds with this method, i have an adblocker on my ubiquiti edgerouter but i cant get all youtbe ads gone!! i have it working on my pc with adblock but not on iphones

    except i think it would be very difficult to get it going without using tomato as my router, with ipv4 would be no problem, but if ipv6 is dhcpv6-pd then im not sure if i can have my tomato router handle that unless it is the gateway router rather then just ap and dhcp server
     
  93. Beast

    Beast Network Guru Member

    Running latest adblock script on RT-N16.

    I have been getting more and more youtube adds (the ones that show before the main video). I would try the older version but I deleted it.

    Also I read somewhere that youtube has changed/implemented a new way in which theses add are done. The new way fools addblock programs some how.

    Before this I never ever saw one of those adds in years.
     
  94. jsnepo

    jsnepo Serious Server Member

    How do I view the adblock status? Whenever I click on it from the GUI, it gives me a message that logging must be enabled in DNSMasq. I've been trying to find it to no avail?
     
  95. Almaz

    Almaz Networkin' Nut Member

  96. jsnepo

    jsnepo Serious Server Member

  97. Lambo029

    Lambo029 Serious Server Member

    is there any way we can use Ad Block Plus script? or uBlock script
     
  98. WaLLy3K

    WaLLy3K Networkin' Nut Member

    In a word, no, sadly.

    This script works by using your router to cache DNS entries, which can be then served out to all the clients on the network. Except, all the blocked entries (domains, EG: google.com) instead of listing their correct IP address, are forwarded to pixelserv which results in a blank page. This technique is called DNS spoofing.

    ABP and uBlock take advantage of the browser being able to read the whole URL (EG: https://www.google.com/search?q=Tomato+by+Shibby), and apply a filter based off whatever matches.

    Due to the ever-increasing adoption of HTTPS, the "search?q=Tomato+by+Shibby" part of URL is hidden from the router, so such lists can't be applied without something like a MITM Proxy which is resource intensive, but more importantly, is outside the scope of this project due to the sheer differences in technique.
     
    jerrm likes this.
  99. Michael Malone

    Michael Malone Network Newbie Member

    I am using adblock-2015-11-11 installed thru the weblink on my Linksys e1200v2 w/ 8MB Flash and 32MB Ram and using a JFFS partition. I had a lot of trouble due to overfilling with host blocklists which prevented me from saving my re-edited config. I fixed it by stopping dnsmasq using WinSCP and deleting the sources in /jffs and restarting dnsmasq. I mistakenly thought the hosts were being downloaded to /tmp and believed there was still plenty of room. Maybe this will help someone. I would rather the files not be downloaded or stored in /jffs due to flash erosion. Can this be adjusted to /tmp?

    Linksys Linksys E1200 v2.0
    Flash Size 8MB
    Tomato Firmware 1.28.0000 MIPSR2-132 K26 Max
    jerrm Script adblock-2015-11-11.zip

    JFFS Enabled
    Total / Free Size 1,216.00 KB / 240.00 KB

    Hosts: Enabled & Updated

    http://adaway.org/hosts.txt
    http://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext
    http://winhelp2002.mvps.org/hosts.txt
    http://www.malwaredomainlist.com/hostslist/hosts.txt

    Working fine .....
     
    Last edited: Jan 26, 2016
  100. crusher9

    crusher9 Serious Server Member

    anyone has a solution to block youtube ads on chromecast or mobile devices?
     
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice