What's new
  • 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!

Status
Not open for further replies.
You want the third field from the right?
Code:
awk '/query\[AAAA]|query\[A]/ {print $(NF-2)}' /opt/var/log/dnsmasq.log
I was looking for an awk equivalent of Python's -3 index for "third from the end".

This does exactly that. Cool!
 
I was looking for an awk equivalent of Python's -3 index for "third from the end".

This does exactly that. Cool!
Add the sort -u on the end to get a unique sort of domain names, eliminating dupes
Code:
 awk '/query\[AAAA]|query\[A]/ {print $(NF-2)}' dnsmasq.log | sort -u
 
You want the third field from the right?
Code:
awk '/query\[AAAA]|query\[A]/ {print $(NF-2)}' /opt/var/log/dnsmasq.log
Thanks Colin, works perfect!

@tomsk: You'll have to wait for AB4 to make use of your new found extra info without impacting the stats...
 
@thelonelycoder You can add these Adblock Lists Updated by Onee-chan in Ad Blocking Solution as a default like shooter40sw list, only the recommended ones marked with an asterisk *

edit: here is the txt file.
I take this into consideration. Just know that I am very conservative with adding new sources to the preconfigured blocking file lists I include in AB.
Compiling your own lists is relatively simple in AB3 and will be even more simpler in AB4.
 
Thanks Colin, works perfect!

@tomsk: You'll have to wait for AB4 to make use of your new found extra info without impacting the stats...
Thanks TLC .... and awesome seeing the community in action solving this one...
 
I take this into consideration. Just know that I am very conservative with adding new sources to the preconfigured blocking file lists I include in AB.
Compiling your own lists is relatively simple in AB3 and will be even more simpler in AB4.

It was easy to add this host list in AB-Solution, thanks to WinSCP, but I hope you add these Adblock list by default.

01. First download and install WinSCP: (use protocol SCP to login)
02. After in PuTTY start AB-Solution with the command:
  • ab-solution
03. In AB-Solution you do the following: (press enter step)
  1. blocking file: b
  2. Enter Blocking File: 7 (Custom)
  3. Enter blocking file: 7 (Empty file)
  4. blocking file: b
  5. Enter Blocking File: + (enable additional hosts)
  6. Do you want to keep Custom blocking file: 1 (Keep file type)
04. Open WinSCP and go to:
  • /mnt/test/adblocking/custom_files/ (test is the name of my USB)
05. Double click on custom_hosts_list.txt
06. Add these block list (are shooter40sw + Additional and Onee-chan recommended with an *)
Code:
https://someonewhocares.org/hosts/zero/hosts
https://pgl.yoyo.org/adservers/serverlist.php?hostformat=hosts&mimetype=plaintext&useip=0.0.0.0
https://hosts-file.net/ad_servers.txt
https://hosts-file.net/grm.txt
https://hosts-file.net/emd.txt
https://hosts-file.net/exp.txt
https://hosts-file.net/hjk.txt
https://hosts-file.net/mmt.txt
https://hosts-file.net/psh.txt
https://raw.githubusercontent.com/StevenBlack/hosts/master/alternates/fakenews-gambling-porn/hosts
https://raw.githubusercontent.com/notracking/hosts-blocklists/master/hostnames.txt
https://raw.githubusercontent.com/crazy-max/WindowsSpyBlocker/master/data/hosts/spy.txt
https://raw.githubusercontent.com/WindowsLies/BlockWindows/master/hosts
https://raw.githubusercontent.com/hoshsadiq/adblock-nocoin-list/master/hosts.txt
https://zerodot1.gitlab.io/CoinBlockerLists/hosts
https://raw.githubusercontent.com/Clefspeare13/pornhosts/master/0.0.0.0/hosts
https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/pornography-hosts
https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/snuff-hosts
https://raw.githubusercontent.com/Sinfonietta/hostfiles/master/gambling-hosts
07. Go back to PuTTY and in AB-Solution type "u" and press enter. (end)


If you want to add the Adblock Lists, without the need of WinSCP, Do the following:
  • in PuTTY edit the txt file: vi /mnt/test/adblocking/custom_files/custom_hosts_list.txt
  • Copy and Paste the list above, just pressing once right click in PuTTY.
  • For typing press "I", to quit typing press "ESC", to delete line press "ESC" and then write "dd" and press "ENTER"
  • To save and quit editor quit typing with "ESC" and write ":wq" and hit "ENTER"
  • Go back to AB-Solution type "u" and press enter. (end)

Edit:

- I use the version of StevenBlack hosts that also blocks fakenews, gambling and porn.
- I deleted adblock.mahakala.is because it gives me problems with
facebook.
- I delete the hosts that are already included in StevenBlack hosts, but leave these someonewhocares.org and pgl.yoyo.org, because some of your hosts are not added are not added on the StevenBlack hosts.
- StevenBlack hosts use CoinBlocker version browser (2,500 hosts) and in this post is the full version (12,000 hosts)
 

Attachments

  • custom_hosts_list.txt
    1.2 KB · Views: 288
Last edited:
I have some questions about A B Solution, which I posted in another thread, but it has been suggested I post it here as it may receive a better response. The thread I created is here.
 
I have some questions about A B Solution, which I posted in another thread, but it has been suggested I post it here as it may receive a better response. The thread I created is here.
If AB-solution is running, anytime your clients use dnsmasq ( the default DNS in the router) for DNS queries then adblocking will take place.
If you don't want that to happen then you have to use a different DNS.... you can do that on the router by using DNS filtering, or select a different DNS on your client machine.

In your original post in the other thread you mentioned
I tried changing my PC from the global default (router) to OpenDNS, thinking that would by-pass A B Solution, but I still couldn't get the above example to work
If the PC was configured to query the OpenDNS servers then Absolution was already out of the picture
 
Last edited:
If AB-solution is running, anytime your clients use dnsmasq ( the default DNS in the router) for DNS queries then adblocking will take place.
If you don't want that to happen then you have to use a different DNS.... you can do that on the router by using DNS filtering, or select a different DNS on your client machine.

In your original post in the other thread you mentioned

If the PC was configured to query the OpenDNS servers then Absolution was already out of the picture
I'm not sure if I've explained this properly. I didn't make any changes on my PC's DNS settings, but rather, changed the settings for my PC on the router from "Router" to "OpenDNS". I think I have got this figured now anyway. I've reinstalled AB Solution, set the global setting to "OpenDNS" and any devices I want AB Solution to filter to "Router". I can't use it on my PC because it breaks some sites as explained in my other thread (I've checked the log and can't see any reason why that should happen, but it does), so I'm just using it on mobiles at the moment.
002.jpg
003.jpg
 
Hello. I am running AB-solution 3.11.2 (AdsBeGone! blocking file), pixelserv-tls 2.1.1 plus the wonderful amtm nicely on an Asus 3100. I cannot seem to get rid of the Youtube ad videos that run just prior to most videos. That is my only reason to hang on to Adblock Plus.

Using AB-solution with pixelserv-tls is there some way to get rid of the ads?

thanks, Bj
 
Hello. I am running AB-solution 3.11.2 (AdsBeGone! blocking file), pixelserv-tls 2.1.1 plus the wonderful amtm nicely on an Asus 3100. I cannot seem to get rid of the Youtube ad videos that run just prior to most videos. That is my only reason to hang on to Adblock Plus.

Using AB-solution with pixelserv-tls is there some way to get rid of the ads?

thanks, Bj
You Tube ads are served in You Tube using IP address by Google. AB-Solution blocks host names, so no, the only way to block those ads is block You Tube itself. Or you can buy You Tube Premium without ads. I subscribe to Google Play Music and get You Tube Premium as well.
 
I must not be explaining myself well, an acknowledged affliction. My experience is Adblock does block the video ad that precedes the selected video.

thanks for the reply.

Bj
 
I must not be explaining myself well, an acknowledged affliction. My experience is Adblock does block the video ad that precedes the selected video.

thanks for the reply.

Bj
@Butterfly Bones gave you the reason why this is not possible in AB-Solution.
An in-browser blocker can block ads served from the same domain as the original content comes from.
 
I guess I do not understand it.

thanks, Bj
https://www.ab-solution.info/faq-reader/how-can-i-block-youtube-ads.html

When ads are served through the same domain as the content, AB cannot block it as it only blocks domains, not URLs.
If you watch a video on youtube.com and the ad is served from youtube.com/ads/some-random-ad then AB cannot block it. To do so would mean to block youtube.com entirely.

In-Browser blockers are capable to block content from youtube.com/ads/*, while still letting youtube.com videos let through. Browser blockers can suppress this as at that time the source code of the page is rendered in the browser and the blocking can act on that.

AB-Solution only sees the domain that is requested, not the content or source code of a webpage.
 
The issue with AB-Solution not working over the OpenVPN tunnel when Accept DNS Configuration is set to Exclusive when using Policy Rules or Policy Rules (Strict) arose again in the [Release] Asuswrt-Merlin 384.6 is now available thread. In the selective routing scripts I will release, I think I will add a check for the configuration conflict in the install script. Let me know your thoughts.

upload_2018-8-8_16-51-7.png
 
Add additional filtering based on status of openvpn client
upload_2018-8-8_19-11-25.png
 
I would appreciate it if some of you can test the code the next several days and give me feedback. I need to know if I have enough field length in the Address and Description fields. The code is posted on github and can be download using the command below. Copy and paste to a command line in SSH session.

Code:
/usr/sbin/curl --retry 3 "https://raw.githubusercontent.com/Xentrk/Asuswrt-Merlin-Linux-Shell-Scripts/master/x3mtek_Chk_ADNS.sh" -o "/jffs/scripts/x3mtek_Chk_ADNS.sh" && chmod 0755 /jffs/scripts/x3mtek_Chk_ADNS.sh

To run the script, type sh /jffs/scripts/x3mtek_Chk_ADNS.sh or ./x3mtek_Chk_ADNS.sh from the /jffs/scripts directory.
 
I've been looking for some information on how large some of the swap files and USB flashdrives should be. How big are the expected log files for AB-Solution? I just got a 32GB Sandisk USB 3.1 drive on sale for stupidly cheap, and I don't know if I should bother partitioning it before I use amtm to install on my N66u, which will be getting replaced with an AC86u in the not too distant future if that makes any difference. When I try to use some of the more extensive blocking lists it tells me I need a swap file, but I am not allowed to add one as it doesn't list a partition to use. I don't know if that means I need an empty partition, or perhaps the partition doesn't have enough space for the swap file since it's just some tiny ancient USB stick I had lying around when I first set all this up way back when. If there's no advantage to partitioning it given the current router and what I plan on moving to, should I just be formatting to ext2, or would ext3 or ext4 be preferred?

-
S
 
I've been looking for some information on how large some of the swap files and USB flashdrives should be. How big are the expected log files for AB-Solution? I just got a 32GB Sandisk USB 3.1 drive on sale for stupidly cheap, and I don't know if I should bother partitioning it before I use amtm to install on my N66u, which will be getting replaced with an AC86u in the not too distant future if that makes any difference. When I try to use some of the more extensive blocking lists it tells me I need a swap file, but I am not allowed to add one as it doesn't list a partition to use. I don't know if that means I need an empty partition, or perhaps the partition doesn't have enough space for the swap file since it's just some tiny ancient USB stick I had lying around when I first set all this up way back when. If there's no advantage to partitioning it given the current router and what I plan on moving to, should I just be formatting to ext2, or would ext3 or ext4 be preferred?

-
S
A swap file of 256 MB or your routers memory size is plenty. amtm, Skynet and AB-Solution use the same mechanics to create a swap file. If it does not work for you with any of the three menu driven options, then something with your way of partitioning the disk is wrong.

I have given up on partitioning devices. For requirements see here:
http://www.ab-solution.info/install/requirements.html

This thread might also be of interest to you:
https://www.snbforums.com/threads/entware-which-usb-stick-performs-well.48188/
 
Status
Not open for further replies.

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

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