What's new

AB-Solution 1.0 release

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

this is what I get

** YES MASTER! ** - RT-AC68U 380.57.4_HGG-FINAL Tue Feb 2 20:02:39 UTC 2016

Dave@RT-AC68U-D270:/tmp/home/root# sh ab-solution.sh

sh: can't open 'ab-solution.sh'
 
Like with any other ad blocker that is used, some sites will refuse to serve you.


Install a ssh client. I use Xshell by NetSarang, perpetually free for Home/Students. PuTTy is also used widely but cumbersome with settings.

Edit: Use your router credentials to login.
You probably have to enable ssh login first: Administration/System:
Enable SSH and best set SSH service port to something else than the standard 22, especially if you also enable Allow SSH access from WAN.

Actually, there is no need to ever enable SSH access from the WAN for an ASUS router using Merlin firmware. Simply configure an OpenVPN server on the router -- once you connect via an OpenVPN client, you can connect to the router as if you were on the LAN using a local IP address.

Terminal is definitely an acceptable ssh client on a Mac. ssh assumes that your client host username matches the server (i.e., router) username. If not, you need to specify it explicitly:

# ssh username:hostname
-- or --
# ssh username:IPAddress
 
Last edited:
yes I got ssh working but now I get this

** YES MASTER! ** - RT-AC68U 380.57.4_HGG-FINAL Tue Feb 2 20:02:39 UTC 2016

Dave@RT-AC68U-D270:/tmp/home/root# sh ab-solution.sh

sh: can't open 'ab-solution.sh'
 
yes I got ssh working but now I get this

** YES MASTER! ** - RT-AC68U 380.57.4_HGG-FINAL Tue Feb 2 20:02:39 UTC 2016

Dave@RT-AC68U-D270:/tmp/home/root# sh ab-solution.sh

sh: can't open 'ab-solution.sh'

Who is the owner of the ab-solution.sh file? Permissions?

# ls -al ab-solution.sh
 
I think its the path, /tmp/home/root How do I know where my flash drive is? Shouldn't be root I don't think

The following will show mounted external devices -- most likely /tmp/mnt/sda1, /tmp/mnt/sda2, /tmp/mnt/sdb1, or /tmp/mnt/sdb2, unless you have explicitly named your external device:

# cd /tmp/mnt
# ls
 
thanks got it installed. Now can someone point me to how the whitelist works

# cd adblocking
# vi whitelist.txt (add desired hostnames)
# cd ..
# sh ab-solution.sh
p
e
 
Who is the owner of the ab-solution.sh file? Permissions?

# ls -al ab-solution.sh
Permission is never the problem. The owner is always the router's admin as you either wget it with that account or the rights get set to admin when the USB Stick is plugged in.
 
Hi, is there any chance to see this on DD-WRT?
 
Welcome to AB-Solution Ad-blocking!

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
So I did the WGET and executed the script, hit "i" for install, rebooted... and nothing. I tried to execute the script again and it's not there. Does WGET in root get erased?
 
So I did the WGET and executed the script, hit "i" for install, rebooted... and nothing. I tried to execute the script again and it's not there. Does WGET in root get erased?
Did it tell you it needed to reboot first before it can be installed?
Download it again and then you can install it. There are several reasons you had to reboot first. The most likely was jffs was not enabled or needed a format.
All files in the /home/root/ directory get erased at a reboot. You can hit 666 after the install is successfull to move the script to the root directory of the device you install AB-Solution.
 
Hi, is there any chance to see this on DD-WRT?
Is there interest to have it ported?
It would mean an immensely larger audience, lots of hardware and manufacturers to support.
I am not sure I would have the time to do that. Maybe restrict it to ASUS devices only could work for me.
 
Did it tell you it needed to reboot first before it can be installed?
Download it again and then you can install it. There are several reasons you had to reboot first. The most likely was jffs was not enabled or needed a format.
All files in the /home/root/ directory get erased at a reboot. You can hit 666 after the install is successfull to move the script to the root directory of the device you install AB-Solution.
Hey thanks so much for the prompt reply. Yes it told me to reboot nd I did. Then I tried to execute the script again but it was gone (I think).

So I think where I screwed up is I tried installing WITHOUT a USB memory key just to the device intself. Is that supported? The wget worked, the script ran, but on reboot I assume it got erased. Are you saying if I type '666' it will install the script to nonvolitile memory and I won't need the USB?

OK so as an option, I have the USB, it's mounted and formatted (I think) as sda1... I can not figure out how to wget to sda1... is that possible? I tried cd /dev/tmp/sda1 but that doesn't work.
 
Is there interest to have it ported?
It would mean an immensely larger audience, lots of hardware and manufacturers to support.
I am not sure I would have the time to do that. Maybe restrict it to ASUS devices only could work for me.
OK i did it again with the USB mounted and it found it automagically and I think it's working!
 
Is there interest to have it ported?
It would mean an immensely larger audience, lots of hardware and manufacturers to support.
I am not sure I would have the time to do that. Maybe restrict it to ASUS devices only could work for me.

I'm quite sure that DD-WRT users like me (I have quite a powerful router like the WRT1900ACS) would be very interested in such solution. The only adblock approach now present on DD-WRT is based on privoxy and I don't know how it's mantained and it's not so well documented, at least by point of view. If you want, I could be one of the first DD-WRT beta tester user of you AB-solution :D
 

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top