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

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!

Diversion - the Router Ad-Blocker

Discussion in 'Asuswrt-Merlin' started by thelonelycoder, Aug 25, 2018.

  1. thelonelycoder

    thelonelycoder Part of the Furniture

    Joined:
    Jan 23, 2014
    Messages:
    6,987
    Location:
    Switzerland
    This is an experimental feature, provided by Diversion. This IS the thread for it. I am not going elsewhere with that discussion.
    As it is an experimental feature, documentation is sparse.
    But here's how it works: Whenever the grabbing feature (opt/share/diversion/file/yt-blocking.div) finds a new *.googlevideo.com in the Dnsmasq log file, it adds it to opt/share/diversion/list/yt_blacklist. That file is loaded into Dnsmasq and next time one of these domains is requested, it gets diverted to the forced IP address(es) which can be viewed in b 8.

    Forcing all *.googlevideo.com domains to the same and only forced IP address presumably effects in fewer or no video ads shown.
    The forced IP changes at a certain interval, the change is logged to the router's Syslog, along with any new domain names it grabbed.
    This short explanation will have to do for now.
     
    buckZor, martinr, Treadler and 10 others like this.
  2. Chuckles67

    Chuckles67 Occasional Visitor

    Joined:
    Apr 22, 2017
    Messages:
    49
    Location:
    California
    Any suggestion for how to time schedule Diversion to enable and disable?

    During working day, both of us find some work-related websites are loading slow with Diversion enabled: sometimes login prompts do not execute. I could work around this - figuring out IP addresses, and whitelisting. The other user here does not have the patience not technical skill to do this, and frequently new websites turn up due to nature of the work. So I've had to disable Diversion, unfortunately, to avoid hindering work.

    What I'd like to do is set Diversion to enable on a time schedule: once or twice a day outside of work hours, to remove ads for non-work browsing. It worked really well on news websites, and I'm missing it!
     
  3. L&LD

    L&LD Part of the Furniture

    Joined:
    Dec 9, 2013
    Messages:
    13,017
    Don't turn off Diversion. Simply use Cloudflare or Google DNS in DNSFilter for the work devices as needed.

    You may be able to toggle those from your phone too. :)
     
  4. Chuckles67

    Chuckles67 Occasional Visitor

    Joined:
    Apr 22, 2017
    Messages:
    49
    Location:
    California
    Ah - thanks. Currently I've got DNS Filter set On, with Router as default. So if I add a DNSFilter custom rule for a work laptop to, say, 8.8.8.8 for Google DNS, then that work laptop will not get ad-blocking... intriguing!

    Also I just found this, which kind of implies my DNSFilter default should maybe set no filtering (not Router)
    https://diversion.ch/faq-reader/how-to-exclude-a-client-from-ad-blocking.html

    Update: I kept my DNS Filter set On with Router as default (I'm using DNS Privacy and want devices to default to DNS Privacy), and tested a work computer set to use a DNS Filter Custom user-defined DNS (8.8.8.8) and the work computer now works just fine with Diversion enabled: with no slow loading of a known website that had this problem. Thanks for this useful tip.
     
    Last edited: Jun 30, 2020
    L&LD, kernol and thelonelycoder like this.
  5. rod178

    rod178 Occasional Visitor

    Joined:
    Oct 13, 2015
    Messages:
    10
    Desktop or Android etc ?
     
  6. rod178

    rod178 Occasional Visitor

    Joined:
    Oct 13, 2015
    Messages:
    10
    Is Diversion compatible with Unbound Manager?
     
  7. joe scian

    joe scian Senior Member

    Joined:
    Apr 22, 2018
    Messages:
    484
    yes - it can be used with Diversion or Adblock.
     
  8. Treadler

    Treadler Very Senior Member

    Joined:
    Nov 9, 2017
    Messages:
    711
    Location:
    South Australia
    Yes, works well.
     
  9. rod178

    rod178 Occasional Visitor

    Joined:
    Oct 13, 2015
    Messages:
    10

    Looking at b.8 I get -

    googlevideo doamains in yt_blacklist: 146
    the forced IPv4 address is: 74.125.12.138

    Question: where is 74.125.12.138 situated?
     
  10. thelonelycoder

    thelonelycoder Part of the Furniture

    Joined:
    Jan 23, 2014
    Messages:
    6,987
    Location:
    Switzerland
    In the yt_blacklist and saved to the diversion config file.
     
    rod178 likes this.
  11. thelonelycoder

    thelonelycoder Part of the Furniture

    Joined:
    Jan 23, 2014
    Messages:
    6,987
    Location:
    Switzerland
    Don't set an arbitrary IP there, especially not the pixelserv-tls or 0.0.0.0 IP.
     
  12. 5stringdeath

    5stringdeath Regular Contributor

    Joined:
    Oct 19, 2019
    Messages:
    90
    Did Diversion move again in the router UI? I updated to 384.18 and neither Diversion nor uiDivstats are in the LAN tab anymore. Reinstalled both via AMTM and diversion seems to be running correctly.

    It was working correctly on the .18 beta
     
  13. Makaveli

    Makaveli Very Senior Member

    Joined:
    Nov 4, 2016
    Messages:
    782
    Location:
    Canada
    uiDivstats is in the LAN tab for me.
     
  14. 5stringdeath

    5stringdeath Regular Contributor

    Joined:
    Oct 19, 2019
    Messages:
    90
    Yea I had to toggle the UI for Diversion itself for it to show up. Entware.net is having connections issues so I think my reinstall of uiDiv may have gotten broken for now. It'll sort out I guess.
     
  15. rod178

    rod178 Occasional Visitor

    Joined:
    Oct 13, 2015
    Messages:
    10

    74.125.12.138 was system generated, I have not set any IP other than 192.168.1.2 for pixelserv-tls. My Router's IP is 192.168.1.1
     
  16. thelonelycoder

    thelonelycoder Part of the Furniture

    Joined:
    Jan 23, 2014
    Messages:
    6,987
    Location:
    Switzerland
    I'm just telling you not to tinker with the wrong settings, that's all.
     
    Treadler, martinr, L&LD and 1 other person like this.
  17. QuikSilver

    QuikSilver Very Senior Member

    Joined:
    Jan 30, 2019
    Messages:
    684
    Location:
    BFE
    [​IMG]

    ;)
     
    Treadler, Marin and thelonelycoder like this.
  18. RAH-66

    RAH-66 Regular Contributor

    Joined:
    Sep 1, 2018
    Messages:
    109
    Yep, it really works, but only on the desktop (browser Edge Chronium) and does not work at all on smart TVs.
     
  19. tekrich

    tekrich Occasional Visitor

    Joined:
    Jan 30, 2020
    Messages:
    49
    Location:
    UK
    With regards to the YouTube experimental blocking, is there a way I can assist this more?

    I guess I should be not using any ad-block on browsers? To be fair the only reason now to use a block on a browser is to remove the mass of white space you get from having no ads on a page after Diversion has blocked it.
     
  20. Beherit

    Beherit Regular Contributor

    Joined:
    Sep 19, 2016
    Messages:
    114
    Starting yesterday, I can't use Diversion any longer. My RT-AC87U router suddently stopped working, neither LAN nor WiFi worked and I couldn't connect to the WebUI nor SSH to the router.

    I managed to get it working again by starting it without the USB drive and started turning features off one by one until I could identify it was Diversion being the culprit.

    As soon as I turn Diversion on, dnsmasq locks up using ~50% CPU according to htop. Uninstalling and doing a clean reinstall of Diversion doesn't solve the issue.

    Any idea what could be causing this and how I can get Diversion working again?