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!

Run this command and try again.
Code:
dos2unix /jffs/scripts/Chk_ADNS.sh

Hi, thanks for the help.

I ran the command as you suggested

Code:
admin@RT-AC86U-1960:/tmp/home/root# dos2unix /jffs/scripts/Chk_ADNS.sh
admin@RT-AC86U-1960:/tmp/home/root#

And then ran
Code:
sh /jffs/scripts/Chk_ADNS.sh
but the output is the same as in my last post. But the good news is that it appears that all ads are being blocked.
 
Last edited:
As I understand it - and the experts, like Colin Taylor will give you the ultimate answer - if yiu set No Filtering, the DNS settings on your PC will determine where your PC goes for resolution of its DNS queries; if, on the other hand, you tell it Global Filtering via the router, then it doesn’t matter what the Windows (or any other) device has set for its DNS resolution, it will be over-ridden and its DNS queries will be forced to go through the router regardless.

Anyway, glad you seem to have fixed it.
Is it a good idea to set this regardless to ensure all clients use the router DNS?

A laptop I was given once had a DNS hijacker on it... Royally annoyed me.

And it would not surprise me if devices such as Google Chromecast or Amazon Alexa have hard coded DNS to aid harvesting too.

Sent from my SM-G965F using Tapatalk
 
Last edited:
Excellent, thank you! I forgot all about nano.

Here is the output. It looks a bit different than what is shown in the picture here: https://www.snbforums.com/threads/diversion-the-router-adblocker.48538/page-27#post-433663

Here is the output I get:

Code:
admin@RT-AC86U-1960:/# sh /jffs/scripts/Chk_ADNS.sh

********************************************************************************************
* WAN Interfaces *
********************************************************************************************
WAN IF  Status        Address         GW   IFNAME
------  ------------- --------------- ---- ------
/jffs/scripts/Chk_ADNS.sh: line 164: wan0_gw_ifname: not found
WAN0:  Connected     xxx.xxx.xxx.xxx        eth0
/jffs/scripts/Chk_ADNS.sh: line 164: wan1_gw_ifname: not found
WAN1:  Unknown State 0.0.0.0                

********************************************************************************************
* VPN Interfaces *
********************************************************************************************
                                                                                   Accept
                                                                                   DNS
Client  Status        Address                             Description              Configuration
------- ------------- -----------------------------------                                    
/jffs/scripts/Chk_ADNS.sh: line 164: ------------------------: not found
OVPNC1: Connected     xxxx-xxxx-ca-version-2.expressnetw.com ExpressVPN 1                  
/jffs/scripts/Chk_ADNS.sh: line 164: Exclusive: not found
OVPNC2: Stopped       xxxx-xxxx-ca-version-2.expressnetw.com ExpressVPN 2                    
/jffs/scripts/Chk_ADNS.sh: line 164: Strict: not found
OVPNC3: Stopped                                           Client 3                          
/jffs/scripts/Chk_ADNS.sh: line 164: Disabled: not found
OVPNC4: Stopped                                           Client 4                          
/jffs/scripts/Chk_ADNS.sh: line 164: Disabled: not found
OVPNC5: Stopped                                           Client 5                          
/jffs/scripts/Chk_ADNS.sh: line 164: Disabled: not found

Diversion installation detected
Checking for potential conflicts with active OpenVPN Clients

/jffs/scripts/Chk_ADNS.sh: line 206: vpn_client1_adns: not found
[: bad number
[: missing ]
/jffs/scripts/Chk_ADNS.sh: line 206: 1: not found
Good news! No configuration conflicts found with OpenVPN Client 1

OpenVPN Client 2 is not in a connected state. Skipping check for OpenVPN Client

/jffs/scripts/Chk_ADNS.sh: line 206: 2: not found
OpenVPN Client 3 is not in a connected state. Skipping check for OpenVPN Client

/jffs/scripts/Chk_ADNS.sh: line 206: 3: not found
OpenVPN Client 4 is not in a connected state. Skipping check for OpenVPN Client

/jffs/scripts/Chk_ADNS.sh: line 206: 4: not found
OpenVPN Client 5 is not in a connected state. Skipping check for OpenVPN Client

/jffs/scripts/Chk_ADNS.sh: line 206: 5: not found
Looks like something got gobbled during the copy and paste.

You may want to install the entware package openssh-sftp-server.
Then, use an sftp client session to give you a Windows explorer type of interface. I use MobaXterm. There are many good ones out there. You can then right click on the file name an choose the option to Open with MobaXterm Editor. Open up an SSH session and run the script. The Editor is easier to use than vi or nano editors. Everyone has their preference. That just happens to work for me.
 
Looks like something got gobbled during the copy and paste.

You may want to install the entware package openssh-sftp-server.
Then, use an sftp client session to give you a Windows explorer type of interface. I use MobaXterm. There are many good ones out there. You can then right click on the file name an choose the option to Open with MobaXterm Editor. Open up an SSH session and run the script. The Editor is easier to use than vi or nano editors. Everyone has their preference. That just happens to work for me.

Thanks, I'll do that and post the results later today. I have already installed entware so it should't take me long. Thanks again.
 
I'd like to add a bump in support of the 'fw' (wife filter) feature. Now besides just the wife's iphone, I've had issues with my son's xbox flooding my router with requests for microsoft telemetry servers. No gaming achievements were blocked so far (AFAIK anyways), but I'm wearing my hard hat in case that issue comes to the surface. My win10 devices are protesting any whitelisting methods. This is such a 1st world problem, lol, but nonetheless a problem that diligent coding might solve. ;)
 
I get this with the latest Diversion (on Merlin 384.7_beta2). Does not seem to affect ad blocking though.
Code:
[: bad number
 Diversion 4.0.1                  by thelonelycoder

 RT-AC68U (armv7l) FW-384.7 @ 192.168.1.1

 (ad-blocking and logging off, stats not available)
____________________________________________________

 d   Diversion            enabled
 c   communication        DivUn stats backup FWun

 a   ad-blocking          to IP 0.0.0.0
 l   logging              /opt/var/log/dnsmasq.log

[: bad number
[: bad number

 b   blocking file        Standard Fri @ 2:00
 el  edit lists

 f   follow dnsmasq.log

 e   exit Diversion                 more options  o

USB stick does not have any partitions:

/dev/sda 1.9G 16.6M 1.8G 1% /tmp/mnt/sda
 
is there an easy way to disable diversion for a certain device on the network but allow for all others?
 
Last edited:
@thelonelycoder Does diversion support running multiple instances of dnsmasq?

I've got an 86u running 384.6+div4.0.1+psBeta_rc.5(w/ the static linked openssl)+skynet+an openvpn server+an ipcamsblocker script (iptables)+an ntpd script (to go with the ipcamsblocker). Entware stuff's all up to date. Typically there is only one dnsmasq PID, but for a few seconds when I load several ad intensive sites (ex: http://bidace.com/150.html) I can see up to 6 of them at once:
Untitled3.jpg


After a few seconds the extra instances disappear leaving just one. Is this expected behavior? Some other forum members seem to think my cpu time is a bit high as well. Is 3-4% normal for an 86u? My network isn't that busy... just 1st world a family of 5.
 
In case anyone else is having issues using the Amazon app on your mobile devices, you will need to remove "aan.amazon.com" from the blacklist (line 6493 from StevenBlack).

Can verify, my Amazon app now works.
 
After a few seconds the extra instances disappear leaving just one. Is this expected behavior?

Yes, same here.

think my cpu time is a bit high as well. Is 3-4% normal for an 86u?

I think yes, your CPU load is above 3 even for 15 minutes interval. 86u has two cores and over 2 means there are some processes in the queue to be processed. Check my 88u;

Screenshot_1.jpg
 
I get this with the latest Diversion (on Merlin 384.7_beta2). Does not seem to affect ad blocking though.
Code:
[: bad number
 Diversion 4.0.1                  by thelonelycoder

 RT-AC68U (armv7l) FW-384.7 @ 192.168.1.1

 (ad-blocking and logging off, stats not available)
____________________________________________________

 d   Diversion            enabled
 c   communication        DivUn stats backup FWun

 a   ad-blocking          to IP 0.0.0.0
 l   logging              /opt/var/log/dnsmasq.log

[: bad number
[: bad number

 b   blocking file        Standard Fri @ 2:00
 el  edit lists

 f   follow dnsmasq.log

 e   exit Diversion                 more options  o

USB stick does not have any partitions:

/dev/sda 1.9G 16.6M 1.8G 1% /tmp/mnt/sda

I get that exact same 'bad number' issue. Diversion is set to use the non-allocated 192.168.0.2 IP and successfully got it during setup. My DHCP range starts at 192.168.0.10. Ad blocking works great still but logging seems to not work(no big deal).

Also terminal colors dont work even though it worked during setup. I chose the default option.

RT-AC68U (armv7l) FW-384.6 @ 192.168.0.1

Note: This is from a clean install and a newly flashed USB ext2(as recommended) 'mkfs.ext2 /dev/sda1' then reboot.
 
@thelonelycoder Thanks for ab-solution - I have been using it for past 1 year without any issues.
I recently upgraded the merlin firmware (384.6) on rt-ac88u and tried a fresh install of diversion after erasing jffs partition. The install fails every time with the message 'Level 3 did not respond, pinging cloudfare. Check your internet access'. I have internet access working fine on numerous other devices so I am not sure of the problem. Can you help me with a way to resolve the issue? Also, I have no knowledge of coding so please provide code lines if you would want any logs from me. Thanks in advance.
 

Attachments

  • Screen Shot 2018-10-03 at 8.57.48 AM.png
    Screen Shot 2018-10-03 at 8.57.48 AM.png
    22.1 KB · Views: 245
  • Screen Shot 2018-10-03 at 8.57.35 AM.png
    Screen Shot 2018-10-03 at 8.57.35 AM.png
    16.4 KB · Views: 479
Diversion 4.0.2 is now available

What's new in v4.0.2:
- Option to continue Diversion install anyway if pinging Level 3 (IP 209.244.0.3), Cloudfare (1.1.1.1) and Google (8.8.8.8) did not respond to ping.
- Corrects "bad number" issue in the Diversion UI.
- Corrects "No such file or directory" error when running update-bf.div after enabling fs for the first time.
- Some small code fixes/changes

This update includes hotfixes applied without version change since the v4.0.1 release:
- Checks S80pixelserv-tls before restarting pixelserv-tls through the Diversion UI. If S80pixelserv-tls is not the Diversion optimized file, it is replaced with the local copy.
This change is effective on all actions that you can perform through the Diversion UI, including updating Entware packages.
- Blocking file types descriptor changed from github.com/StevenBlack/fakenews-gambling-porn-social to github.com/StevenBlack/fakenews-gambling-porn

How to update to v4.0.2
In the Diversion UI, enter d and select update.
 
Last edited:
Absolutely painless sir. Update was beautiful! ;)
 
I had ab solution, installed diversion but now can't use the UI anymore.
how to you use diversion once installed? I did a search no scripts.
I tried to install it again, nothing happens



admin@Skyet:/# find . -name "diversion"

./tmp/mnt/Entware/entware/share/diversion
admin@Skyet:/# curl -Os https://diversion.ch/install && sh install
admin@Skyet:/#
The start command after installation for Diversion is:
Code:
diversion
 
I'd like to add a bump in support of the 'fw' (wife filter) feature. Now besides just the wife's iphone, I've had issues with my son's xbox flooding my router with requests for microsoft telemetry servers. No gaming achievements were blocked so far (AFAIK anyways), but I'm wearing my hard hat in case that issue comes to the surface. My win10 devices are protesting any whitelisting methods. This is such a 1st world problem, lol, but nonetheless a problem that diligent coding might solve. ;)
That's already built in as fs.
To enable the blocking file fast switch enter b, 1. Change composition, then 3. Enable Blocking file fast switch
 
I get this with the latest Diversion (on Merlin 384.7_beta2). Does not seem to affect ad blocking though.
Code:
[: bad number
 Diversion 4.0.1                  by thelonelycoder

 RT-AC68U (armv7l) FW-384.7 @ 192.168.1.1

 (ad-blocking and logging off, stats not available)
____________________________________________________

 d   Diversion            enabled
 c   communication        DivUn stats backup FWun

 a   ad-blocking          to IP 0.0.0.0
 l   logging              /opt/var/log/dnsmasq.log

[: bad number
[: bad number

 b   blocking file        Standard Fri @ 2:00
 el  edit lists

 f   follow dnsmasq.log

 e   exit Diversion                 more options  o

USB stick does not have any partitions:

/dev/sda 1.9G 16.6M 1.8G 1% /tmp/mnt/sda
Fixed with the v4.0.2 Diversion update.
 

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