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!

AB-Solution 1.0 release

Discussion in 'Asuswrt-Merlin' started by thelonelycoder, Feb 15, 2016.

  1. thelonelycoder

    thelonelycoder Part of the Furniture

    Joined:
    Jan 23, 2014
    Messages:
    3,305
    Location:
    Switzerland
    Welcome to AB-Solution Ad-blocking!

    Please check the AB-Solution website for latest version and discussion link.

    The important part:
    The install process is as simple as one can make a shell script install.
    Download the latest version from GitHub and place the file ab-solution.sh onto a ext2, ext3 or ext4 formatted USB Stick.
    Plug it into the router, open a ssh terminal and start the install with
    Code:
    sh ab-solution.sh
    Your path may be different but for many it is sh /tmp/mnt/sda1/ab-solution.sh
    Within a few minutes the installation is finished and ads are blocked.
    You can also wget the latest version by entering this into the terminal:
    Code:
    wget https://raw.githubusercontent.com/decoderman/AB-Solution/master/ab-solution.sh --no-check-certificate
    Note: ALL previous installs of the AdBlock-wchfa can be updated without the need to remove it first.
    Even a install of "Adblocking with combined hosts files" is reliably detected and replaced.

    The script should remain on the router for later use as it is no longer just a install script.

    Remember to clear your OS's DNS cache as well as your browsers. This is important.
    Hit CTRL-F5 for a complete refresh of a webpage.

    The Background of AB-Solution:
    This is a continuation of AdBlocking with combined hosts file, that led to the automated version, aptly named Adblock WCHFA. The intensive beta phase is over and a better suited name was suggested by @ICDeadPpl the other day. Many thanks, loved that name from the start!

    Many thanks also to the brave beta testers. Your input and suggestions were and are a great help and motivates extremely.

    The long version, lets just list the highlights.
    The install script is more like a control center now than just a installer.
    - See the attached screenshots for an overview
    - Turn on or off Ad-Blocking in seconds
    - Turn on or off logging in seconds
    - Three types of amalgamated hosts files to chose from
    - Change hosts file type in seconds (the largest might take a minute or two to process though)
    - Process whitelist without the need to rerun the update script. Thanks @faria for the real fast method!
    - Follow the logfile without the need to enter the command (# tail -f /var/log/mylife...)

    Then, improvements were made as follows:
    - removes blank and empty lines in black- and whitelist.txt. This caused many a problem
    - services-start and dnsmasq.postconf sensibly delay the adding of the entries to dnsmasq. This also caused a lot of grief for many and I hope to have it solved, for the time being.
    - Syslog entries clearly define when and why the scripts are run. Look for this scripts name in the log..
    - Final file check are made before the install script proudly declares that Ads be gone now!

    Here's how the control center looks like:
    http://i.imgur.com/RAnMIBg.png
     
    Last edited: Jan 27, 2017
    golgi42, elradix, halex4u and 6 others like this.
  2. Kronyx

    Kronyx Regular Contributor

    Joined:
    Jan 25, 2016
    Messages:
    64
    It works, but I had to reboot my router, Nice work !
     
    Last edited: Feb 16, 2016
  3. ICDeadPpl

    ICDeadPpl New Around Here

    Joined:
    Sep 27, 2012
    Messages:
    6
    I had the same problem, solved it by rebooting the router first.
     
  4. Kronyx

    Kronyx Regular Contributor

    Joined:
    Jan 25, 2016
    Messages:
    64
    Yep, got it !

    Thanks !
     
  5. thelonelycoder

    thelonelycoder Part of the Furniture

    Joined:
    Jan 23, 2014
    Messages:
    3,305
    Location:
    Switzerland
    I just run it directly from per wget from github in the terminal. Runs just fine.
    What is the output if you enter ls at the directory? it should list the file there, just like the attached pic: like this.png
     
  6. thelonelycoder

    thelonelycoder Part of the Furniture

    Joined:
    Jan 23, 2014
    Messages:
    3,305
    Location:
    Switzerland
    The Godfather! Is he happy?
     
  7. Kronyx

    Kronyx Regular Contributor

    Joined:
    Jan 25, 2016
    Messages:
    64
    I had nothing, I hit enter and nothing on the screen.
     
  8. Kronyx

    Kronyx Regular Contributor

    Joined:
    Jan 25, 2016
    Messages:
    64
    It worked when I rebooted my router.
     
  9. thelonelycoder

    thelonelycoder Part of the Furniture

    Joined:
    Jan 23, 2014
    Messages:
    3,305
    Location:
    Switzerland
    You were the first poster in this thread, and you are negatively impacting the spread of this fine piece of work.. ;-)
     
  10. ICDeadPpl

    ICDeadPpl New Around Here

    Joined:
    Sep 27, 2012
    Messages:
    6
    Yes! Very smooth and easy to setup.
    Haven't tried whitelisting yet, I'll try that tomorrow.
     
    thelonelycoder likes this.
  11. thelonelycoder

    thelonelycoder Part of the Furniture

    Joined:
    Jan 23, 2014
    Messages:
    3,305
    Location:
    Switzerland
    By the way, there is a hidden menu option to move the install script from wherever it is to the used device.
    666 is the magic number and may be used with a liiitle bit of caution. It should work just fine tought!
    11 is another helpful number, it refreshes the screen. Actually it restarts the script the same way when you make changes.
     
  12. bayern1975

    bayern1975 Very Senior Member

    Joined:
    Sep 22, 2015
    Messages:
    547
    will try this new adblock script....should i remove all older content first or i install script trough terminal over old one?

    sent from Kodi 17 Krypton
     
  13. visortgw

    visortgw Regular Contributor

    Joined:
    Jun 18, 2015
    Messages:
    135
    Excellent work! I discovered what appears to be a minor bug. The auto-update day is not set until you enable logging. Logging can be immediately disabled, not affecting the auto-update day. Other than that, it appears to be flawless! :)
     
    thelonelycoder likes this.
  14. thelonelycoder

    thelonelycoder Part of the Furniture

    Joined:
    Jan 23, 2014
    Messages:
    3,305
    Location:
    Switzerland
    Removing them yourself is the saver way, if you remember where they are. AB-Solution tries as best it can to find such installs and remove it. But you never know.
     
  15. thelonelycoder

    thelonelycoder Part of the Furniture

    Joined:
    Jan 23, 2014
    Messages:
    3,305
    Location:
    Switzerland
    Indeed, the cron job is installed irrespective whether logging is selected or not during install.
    It's just a minor glitch in the UI that does not write the date in the config file at the end of the setup. The job itself will run.
    You can check that by typing cru l (lower L) into a terminal. It will list at least one job. Update hosts is the name.

    Will be fixed with the next point release.
     
  16. visortgw

    visortgw Regular Contributor

    Joined:
    Jun 18, 2015
    Messages:
    135
    Question: I have been unable to view video on cbs.com due to the ad blocking on the router. I added the following hosts to the whitelist as indicated in discussion on the AdBlock-wchfa beta thread, but it does not help:

    livepassdl.conviva.com
    cbsi.com
    secure-us.imrworldwide.com
    livepass.conviva.com

    This did not work for me for the beta, and it still does not work. Any thoughts?

    On a positive note, the ability to toggle ad blocking on or off in AB-Solution is fantastic!
     
  17. thelonelycoder

    thelonelycoder Part of the Furniture

    Joined:
    Jan 23, 2014
    Messages:
    3,305
    Location:
    Switzerland
    If there only were an app for that!
    As I am in the Confoederatio Helvetica I cant help you as I have no access to cbs.com videos. You said in the other thread that using the standard hosts file helped?
     
  18. visortgw

    visortgw Regular Contributor

    Joined:
    Jun 18, 2015
    Messages:
    135
    That was actually someone else. It does not help by loading the standard hosts file in my situation.
     
  19. GDT

    GDT Occasional Visitor

    Joined:
    Feb 24, 2014
    Messages:
    33
    Just updated with "medium settings", it works great!!! Thank you!
     
  20. unknownUser

    unknownUser New Around Here

    Joined:
    Feb 5, 2016
    Messages:
    3
    This is a good idea. Running And updating the Script in the USB, so no wearing out of the router's Flash Happen!
     
    thelonelycoder likes this.

Share This Page