What's new

AB-Solution 1.07 is out!

  • 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!

@thelonelycoder - Thank you so much for this, relatively easy to install and get running on my Asus RT-1900P and it does what it is supposed to do, grateful for all your efforts and best of luck with the pool.
Thanks mate.
And the pool is fine now, with a new pump. The old one had a short in the winding, a fact I found out only after repairing the bearings.
 
That is life my friend :) Well, at least you learned for next time.
Yeah, but I'm not sure I'll remember that in 20 years when it next breaks (the pump is german quality).
 
Anyway, enough of pumps and private matters.
I am full swing back at coding and it looks like there may be a 1.08-beta2 release for the brave and not faint of heart to test out sometime this weekend.
Pixelserve-tls is well on its way. Start looking forward to IPv6 support and https adblocking.
 
Anyway, enough of pumps and private matters.
I am full swing back at coding and it looks like there may be a 1.08-beta2 release for the brave and not faint of heart to test out sometime this weekend.
Pixelserve-tls is well on its way. Start looking forward to IPv6 support and https adblocking.
Gimme Gimme Gimmie, I am ready to rip into this thing :)
 
Anyway, enough of pumps and private matters.
I am full swing back at coding and it looks like there may be a 1.08-beta2 release for the brave and not faint of heart to test out sometime this weekend.
Pixelserve-tls is well on its way. Start looking forward to IPv6 support and https adblocking.

Sounds promising ;)
 
Quick request: Can anyone using IPv6 get me the name for the IPv6 address variable in nvram?
For IPv4 it's lan_ipaddr.
Thanks.
 
Quick request: Can anyone using IPv6 get me the name for the IPv6 address variable in nvram?
For IPv4 it's lan_ipaddr.
Thanks.
Try
ipv6_rtr_addr

Now, I'd have to check a bit further, but there may be a different var if you are a 6rd tunnel. I think the above will work for the rest.
 
Try
ipv6_rtr_addr

Now, I'd have to check a bit further, but there may be a different var if you are a 6rd tunnel. I think the above will work for the rest.
Thought so, my 6to4 has this too.
 
I am using ab-solution also, on my Netgear R7000 , with Xwrt Vortex
I was long looking for a professional adblock solution and was using different scripts since months. Only today I stumbled over your ab-solution and I think it's perfect!
:) Greetings from Austria!
 
Hi,

Nice to use, just replaced my previous adblock solution based on your previous script by this one :)

I just found a little glitch :

If big(s) filesystem(s) is(are) mounted in /tmp/mnt (typically CIFS on NAS), the script is pretty long to run as the "find_adblock_device()" function parse all /tmp/mnt with find to detect $confFile.

;-)

btw, thx for your great work
You can look forward to the next release: This is now eliminated in the 1.08-beta3 version.
 
My setup:
Asus RT87U
Merlin fw 380.59
USB drive formatted ext3
usb: USB ext2 fs at /dev/sda1 mounted on /tmp/mnt/AB-Solution.

Can someone point me to a tutorial on how to install Ab-Solution from scratch? I have read through all 18 pages and I'm not finding the instructions to install. I did the wget and when I go into the /tmp/mnt/AB-Solution, it's empty
I currently have a USB drive formatted to ext3 and mounted as sda1
1. What settings do I need to enable on my router?
2. How to install this from scratch?

Thanks.
 
My setup:
Asus RT87U
Merlin fw 380.59
USB drive formatted ext3
usb: USB ext2 fs at /dev/sda1 mounted on /tmp/mnt/AB-Solution.

Can someone point me to a tutorial on how to install Ab-Solution from scratch? I have read through all 18 pages and I'm not finding the instructions to install. I did the wget and when I go into the /tmp/mnt/AB-Solution, it's empty
I currently have a USB drive formatted to ext3 and mounted as sda1
1. What settings do I need to enable on my router?
2. How to install this from scratch?

Thanks.

Run

wget https://raw.githubusercontent.com/decoderman/AB-Solution/master/ab-solution.sh --no-check-certificate

Then run sh ab-solution.sh

The script is not found in /tmp/mnt/Ab-solution

It is most likely located in /tmp/mnt/sda1/

You should also check that you have jffs partition enabled
 
Run

wget https://raw.githubusercontent.com/decoderman/AB-Solution/master/ab-solution.sh --no-check-certificate

Then run sh ab-solution.sh

The script is not found in /tmp/mnt/Ab-solution

It is most likely located in /tmp/mnt/sda1/

You should also check that you have jffs partition enabled


I think I got it installed now but I have a couple of questions:
1. Will I lose Ab-Solution on my USb or have to set it up again when I reboot my router?
2. if I exit from Ab-soultion menu does ad-blocker still run in the background?
I used ad blocker add-on my firefox and now the sites I used to have blocked with ad-blocker shows ads when I go to that webpage now with my firefox ad-blocker disbaled
 
You will not loose it after a reboot no

It will run in the background yes.
You will have to enable it and then reset cache on your computer.
 
I think I got it installed now but I have a couple of questions:
1. Will I lose Ab-Solution on my USb or have to set it up again when I reboot my router?
2. if I exit from Ab-soultion menu does ad-blocker still run in the background?
I used ad blocker add-on my firefox and now the sites I used to have blocked with ad-blocker shows ads when I go to that webpage now with my firefox ad-blocker disbaled
Log in with an ssh client to the router. Then enter:
curl -O https://raw.githubusercontent.com/decoderman/AB-Solution/master/ab-solution.sh
This downloads version 1.07 to the /home/root/ directory of your router. This is also the start directory for your ssh client.
So now you enter:
sh ab-solution.sh
This will bring you to the AB-Solution Menu. Type i and hit Enter to start the install. It will guide you through the install process.
Once installation is finished the Menu will appear and show what services are active.
During the install, ab-solution.sh was copied to /tmp/mnt/sda1/
Next time you log in with ssh you'll have to start AB-Solution with:
sh /tmp/mnt/sda1/ab-solution.sh
to get to the menu.

If installed correctly - the script will tell you whether or not it was - AB-Solution is installed and will run and update automatically on your router.
 
Last edited:
adv-log-stats.sh
Code:
#!/bin/sh
L=10
AL=1
LINE=--------------------------------
dir=/tmp/mnt/USB/adblocking/logs
printf "\nThe top $L requested domains were:\n$LINE\n"
awk '/query\[A]/ {print $6}' $dir/dnsmasq.log | awk '{for(i=1;i<=NF;i++)a[$i]++}END{for(o in a) printf "\n%s  %s ",a[o],o}' | sort -nr | head -$L
printf "\nThe top $L blocked ad domains were:\n$LINE\n"
awk '/is 0.0.0.0/ {print $6}' $dir/dnsmasq.log | awk '{for(i=1;i<=NF;i++)a[$i]++}END{for(o in a) printf "\n%s  %s ",a[o],o}' | sort -nr | head -$L
printf "\nThe top $L blocked custom domains were:\n$LINE\n"
awk '/is 10.0.0.1/ {print $6}' $dir/dnsmasq.log | awk '{for(i=1;i<=NF;i++)a[$i]++}END{for(o in a) printf "\n%s  %s ",a[o],o}' | sort -nr | head -$L
rm -f temp*
printf "\nThe top $L noisiest name clients:\n$LINE\n"
awk '/from 192.168.1./ {print $8}' $dir/dnsmasq.log | awk '{for(i=1;i<=NF;i++)a[$i]++}END{for(o in a) printf "\n%s  %s ",a[o],o}' | sort -nr | head -$L > temp1
for i in $(awk '{print $2}' temp1); do
grep -e "$i" $dir/dnsmasq.log | awk '{print $6}'| awk '{for(i=1;i<=NF;i++)a[$i]++}END{for(o in a) printf "\n %s %s",a[o],o}' | sort -nr | head -1 >> temp2
CH="$(awk 'END{print $1}' temp2)"
TH="$(awk -v AL="$AL" 'FNR==AL{print $1}' temp1)"
let AL=AL+1
awk -v CH="$CH" -v TH="$TH" 'BEGIN{print ((CH * 100)/TH)"%"}' >> temp3
done
awk 'NR==FNR{a[FNR]=$0 " -";next} {print a[FNR],$0}' temp2 temp3 > temp4
awk 'NR==FNR{a[FNR]=$0 " -";next} {print a[FNR],$0}' temp1 temp4
printf "\nTop $L domains for top $L clients:\n$LINE\n"
for i in $(awk '{print $2}' temp1); do
printf "$i:\n"
grep -e "$i" $dir/dnsmasq.log | awk '{print $6}'| awk '{for(i=1;i<=NF;i++)a[$i]++}END{for(o in a) printf "\n %s %s",a[o],o}' | sort -nr | head -$L
done
rm -f temp*

Gives you the same output as log-stats.sh but also includes the top 10 domains for the top 10 clients with the number of hits for each - change default of 10 by modifying L variable.
Just to let you know: log-stats and adv-log-stats will be part of the upcoming next release.
Thanks for your contribution.
 
Hello all,

I installed 1.07 on a Asuswrt merlin 380.61 running on an AC87U router. I used uBlock but after installation, clear cache and restart of Chrome, I do still get the same number of blocked items in the uB logo. Is that normal?

Example of the log when I refresh the page (aliexpress)
Code:
Aug 25 15:18:56 dnsmasq[9705]: query[A] fr.aliexpress.com from 10.0.0.3
Aug 25 15:18:56 dnsmasq[9705]: forwarded fr.aliexpress.com to 80.10.246.132
Aug 25 15:18:56 dnsmasq[9705]: forwarded fr.aliexpress.com to 8.8.4.4
Aug 25 15:18:56 dnsmasq[9705]: reply fr.aliexpress.com is <CNAME>
Aug 25 15:18:56 dnsmasq[9705]: reply us-aebridge.aliexpress.com is <CNAME>
Aug 25 15:18:56 dnsmasq[9705]: reply us-aebridge.aliexpress.com.gds.alibabadns.com is 198.11.132.250
Aug 25 15:18:58 dnsmasq[9705]: query[A] message.aliexpress.com from 10.0.0.3
Aug 25 15:18:58 dnsmasq[9705]: forwarded message.aliexpress.com to 80.10.246.132
Aug 25 15:18:58 dnsmasq[9705]: query[A] lighthouse.aliexpress.com from 10.0.0.3
Aug 25 15:18:58 dnsmasq[9705]: forwarded lighthouse.aliexpress.com to 80.10.246.132
Aug 25 15:18:58 dnsmasq[9705]: reply message.aliexpress.com is <CNAME>
Aug 25 15:18:58 dnsmasq[9705]: reply wildcard.alicdn.com.edgekey.net is <CNAME>
Aug 25 15:18:58 dnsmasq[9705]: reply e11956.b.akamaiedge.net is 23.34.184.64
Aug 25 15:18:58 dnsmasq[9705]: reply lighthouse.aliexpress.com is <CNAME>
Aug 25 15:18:58 dnsmasq[9705]: reply wildcard.alicdn.com.edgekey.net is <CNAME>
Aug 25 15:18:58 dnsmasq[9705]: reply e11956.b.akamaiedge.net is 23.34.184.64
Aug 25 15:18:58 dnsmasq[9705]: query[AAAA] rgom10-en.url.trendmicro.com from 127.0.0.1
Aug 25 15:18:58 dnsmasq[9705]: forwarded rgom10-en.url.trendmicro.com to 80.10.246.132
Aug 25 15:18:58 dnsmasq[9705]: reply rgom10-en.url.trendmicro.com is <CNAME>
Aug 25 15:18:58 dnsmasq[9705]: reply trendmicro.com.edgesuite.net is <CNAME>
Aug 25 15:18:58 dnsmasq[9705]: query[AAAA] trendmicro.com.edgesuite.net from 127.0.0.1
Aug 25 15:18:58 dnsmasq[9705]: forwarded trendmicro.com.edgesuite.net to 80.10.246.132
Aug 25 15:18:58 dnsmasq[9705]: reply trendmicro.com.edgesuite.net is <CNAME>
Aug 25 15:18:58 dnsmasq[9705]: query[AAAA] a151.g.akamai.net from 127.0.0.1
Aug 25 15:18:58 dnsmasq[9705]: forwarded a151.g.akamai.net to 80.10.246.132
Aug 25 15:18:58 dnsmasq[9705]: query[A] rgom10-en.url.trendmicro.com from 127.0.0.1
Aug 25 15:18:58 dnsmasq[9705]: forwarded rgom10-en.url.trendmicro.com to 80.10.246.132
Aug 25 15:18:58 dnsmasq[9705]: reply rgom10-en.url.trendmicro.com is <CNAME>
Aug 25 15:18:58 dnsmasq[9705]: reply trendmicro.com.edgesuite.net is <CNAME>
Aug 25 15:18:58 dnsmasq[9705]: reply a151.g.akamai.net is 92.123.182.82
Aug 25 15:18:58 dnsmasq[9705]: reply a151.g.akamai.net is 92.123.182.49
Aug 25 15:19:00 dnsmasq[9705]: query[A] atmamos.alicdn.com from 10.0.0.3
Aug 25 15:19:00 dnsmasq[9705]: forwarded atmamos.alicdn.com to 80.10.246.132
Aug 25 15:19:00 dnsmasq[9705]: reply atmamos.alicdn.com is <CNAME>
Aug 25 15:19:00 dnsmasq[9705]: reply us-scproxy.alicdn.com is <CNAME>
Aug 25 15:19:00 dnsmasq[9705]: reply us-scproxy.alicdn.com.gds.alibabadns.com is 205.204.101.7
Aug 25 15:19:01 dnsmasq[9705]: query[A] hotproducts.aliexpress.com from 10.0.0.3
Aug 25 15:19:01 dnsmasq[9705]: forwarded hotproducts.aliexpress.com to 80.10.246.132
Aug 25 15:19:02 dnsmasq[9705]: query[A] www.google.com from 10.0.0.50
Aug 25 15:19:02 dnsmasq[9705]: cached www.google.com is 172.217.20.36
Aug 25 15:19:02 dnsmasq[9705]: query[AAAA] www.google.com from 10.0.0.50
Aug 25 15:19:02 dnsmasq[9705]: forwarded www.google.com to 80.10.246.132
Aug 25 15:19:02 dnsmasq[9705]: reply www.google.com is 2a00:1450:4001:802::2004
Aug 25 15:19:02 dnsmasq[9705]: query[A] hotproducts.aliexpress.com from 10.0.0.3
Aug 25 15:19:02 dnsmasq[9705]: forwarded hotproducts.aliexpress.com to 8.8.4.4
Aug 25 15:19:02 dnsmasq[9705]: forwarded hotproducts.aliexpress.com to 80.10.246.132
Aug 25 15:19:02 dnsmasq[9705]: reply hotproducts.aliexpress.com is <CNAME>
Aug 25 15:19:02 dnsmasq[9705]: reply hotproducts.aliexpress.com.gds.alibabadns.com is <CNAME>
Aug 25 15:19:02 dnsmasq[9705]: reply wildcard.alicdn.com.edgekey.net is <CNAME>
Aug 25 15:19:02 dnsmasq[9705]: reply e11956.b.akamaiedge.net is 23.34.184.64
Aug 25 15:19:04 dnsmasq[9705]: query[A] feedback.aliexpress.com from 10.0.0.3
Aug 25 15:19:04 dnsmasq[9705]: forwarded feedback.aliexpress.com to 80.10.246.132
Aug 25 15:19:04 dnsmasq[9705]: reply feedback.aliexpress.com is <CNAME>
Aug 25 15:19:04 dnsmasq[9705]: reply wildcard.alicdn.com.edgekey.net is <CNAME>
Aug 25 15:19:04 dnsmasq[9705]: reply e11956.b.akamaiedge.net is 23.34.184.64
Aug 25 15:19:04 dnsmasq[9705]: query[A] freight.aliexpress.com from 10.0.0.3
Aug 25 15:19:04 dnsmasq[9705]: forwarded freight.aliexpress.com to 80.10.246.132
Aug 25 15:19:04 dnsmasq[9705]: reply freight.aliexpress.com is <CNAME>
Aug 25 15:19:04 dnsmasq[9705]: reply freight.aliexpress.com.gds.alibabadns.com is <CNAME>
Aug 25 15:19:04 dnsmasq[9705]: reply wildcard.alicdn.com.edgekey.net is <CNAME>
Aug 25 15:19:04 dnsmasq[9705]: reply e11956.b.akamaiedge.net is 23.34.184.64
Aug 25 15:19:04 dnsmasq[9705]: query[A] promotion.aliexpress.com from 10.0.0.3
Aug 25 15:19:04 dnsmasq[9705]: forwarded promotion.aliexpress.com to 80.10.246.132
Aug 25 15:19:04 dnsmasq[9705]: reply promotion.aliexpress.com is <CNAME>
Aug 25 15:19:04 dnsmasq[9705]: reply wildcard.alicdn.com.edgekey.net is <CNAME>
Aug 25 15:19:04 dnsmasq[9705]: reply e11956.b.akamaiedge.net is 23.34.184.64
Aug 25 15:19:04 dnsmasq[9705]: query[A] us.ae.aliexpress.com from 10.0.0.3
Aug 25 15:19:04 dnsmasq[9705]: forwarded us.ae.aliexpress.com to 80.10.246.132
Aug 25 15:19:04 dnsmasq[9705]: query[A] my.aliexpress.com from 10.0.0.3
Aug 25 15:19:04 dnsmasq[9705]: forwarded my.aliexpress.com to 80.10.246.132
Aug 25 15:19:05 dnsmasq[9705]: query[A] us.ae.aliexpress.com from 10.0.0.3
Aug 25 15:19:05 dnsmasq[9705]: forwarded us.ae.aliexpress.com to 8.8.4.4
Aug 25 15:19:05 dnsmasq[9705]: forwarded us.ae.aliexpress.com to 80.10.246.132
Aug 25 15:19:05 dnsmasq[9705]: query[A] my.aliexpress.com from 10.0.0.3
Aug 25 15:19:05 dnsmasq[9705]: forwarded my.aliexpress.com to 8.8.4.4
Aug 25 15:19:05 dnsmasq[9705]: forwarded my.aliexpress.com to 80.10.246.132
Aug 25 15:19:05 dnsmasq[9705]: reply us.ae.aliexpress.com is <CNAME>
Aug 25 15:19:05 dnsmasq[9705]: reply wildcard.alicdn.com.edgekey.net is <CNAME>
Aug 25 15:19:05 dnsmasq[9705]: reply e11956.b.akamaiedge.net is 23.34.184.64
Aug 25 15:19:05 dnsmasq[9705]: reply my.aliexpress.com is <CNAME>
Aug 25 15:19:05 dnsmasq[9705]: reply wildcard.alicdn.com.edgekey.net is <CNAME>
Aug 25 15:19:05 dnsmasq[9705]: reply e11956.b.akamaiedge.net is 23.74.206.140
Aug 25 15:19:14 dnsmasq[9705]: query[A] mail.google.com from 10.0.0.3
Aug 25 15:19:14 dnsmasq[9705]: forwarded mail.google.com to 8.8.4.4
Aug 25 15:19:14 dnsmasq[9705]: reply mail.google.com is <CNAME>
Aug 25 15:19:14 dnsmasq[9705]: reply googlemail.l.google.com is 216.58.208.229

Did I miss anything? I would have expect some resolutions to be 0.0.0.0 as per the hosts-adblock file and the number in uB logo to decrease. Therefore I don't feel it worth for me to get rid of uBlock on the navigator.

Did i miss anything?

My goal is to save CPU when watching Youtube videos has my computer lags too much because of the quantities of ads. I did select 3 : shooter40sw file

Merci
XabiX
 

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