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!

Welcome
This is Diversion - the Router Adblocker for Asuswrt-Merlin


AB-Solution is now Diversion

All install and update info, as well as other useful information is on the Diversion website.

September 9, 2018
Diversion 4.0.1 is now available
See this post or the website for the change log

Diversion is free to use under the GNU General Public License version 3 (GPL-3.0).
If you like Diversion and find it useful, you can help it's further development with a donation.
Thank you!

To see the fancy ticks and crosses that Diversion shows during operations, make sure your SSH terminal encoding is set to UTF-8.

Diversion is interactive. To start the Diversion UI after installation, use
Code:
diversion
For quick operation options without starting the UI, use
Code:
diversion help
to make yourself familiar with the available options.

Screenshots of Diversion 4.0, standard and extended menu (more options o)

d5nZGgK.png

I understand for my new ASUS RT-AC86U I have to create a Linux compatible USB Drive in order to install and run this on my router, is that correct? I did have debian installed on a PC but I no longer do, is it possible to format my 32GB USB Drive using a Windows PC or a Mac (I don't think I can with a Mac)? And if so what's required of me to get the USB drive compatible? I suppose I can use Parallels 14 to install a Linux Distro and create one, but I've not done it before, and I'm not sure what I specifically need to do to make it compatible for this specific router as I understand there are a few Linux formats for drives, is that true?
 
I understand for my new ASUS RT-AC86U I have to create a Linux compatible USB Drive in order to install and run this on my router, is that correct? I did have debian installed on a PC but I no longer do, is it possible to format my 32GB USB Drive using a Windows PC or a Mac (I don't think I can with a Mac)? And if so what's required of me to get the USB drive compatible? I suppose I can use Parallels 14 to install a Linux Distro and create one, but I've not done it before, and I'm not sure what I specifically need to do to make it compatible for this specific router as I understand there are a few Linux formats for drives, is that true?
the minitool software has been quoted in quite a few posts as an excellent way of doing this in windows....dont use it myself but you can give it a try
https://www.minitool.com/help-pw/create-partition.html
 
I understand for my new ASUS RT-AC86U I have to create a Linux compatible USB Drive in order to install and run this on my router, is that correct? I did have debian installed on a PC but I no longer do, is it possible to format my 32GB USB Drive using a Windows PC or a Mac (I don't think I can with a Mac)? And if so what's required of me to get the USB drive compatible? I suppose I can use Parallels 14 to install a Linux Distro and create one, but I've not done it before, and I'm not sure what I specifically need to do to make it compatible for this specific router as I understand there are a few Linux formats for drives, is that true?

I use this program in windows to format my Memory to EXT2 (RT-AC86U) or EXT4 (RT-AC68U)
 
I use this program in windows to format my Memory to EXT2 (RT-AC86U) or EXT4 (RT-AC68U)

Awesome, thank you very much, I appreciate it. I'll check this out now.
 
I understand for my new ASUS RT-AC86U I have to create a Linux compatible USB Drive in order to install and run this on my router, is that correct? I did have debian installed on a PC but I no longer do, is it possible to format my 32GB USB Drive using a Windows PC or a Mac (I don't think I can with a Mac)?

That's correct. You can do it with a PC or a Mac, but you can also do it directly on the router, to make sure you don't have any compatibility issues. Login to your router with SSH and execute

Code:
fdisk -l

the output should look somewhat similar to this:

Code:
marco@router:/tmp/home/root# fdisk -l

(..)

Disk /dev/sda: 30.7 GB, 30752636928 bytes
255 heads, 63 sectors/track, 3738 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sda1               1        3738    30025453+ 83 Linux

At the bottom of the output you'll see, if you only have one USB drive connected, /dev/sda. If you have multiple USB drives connected, determine the correct one based on its size.

The following steps will wipe your entire USB drive. In other words, backup if nescessairy before proceeding.

First, unmount your drive:

Code:
umount /dev/sdaX
or click the Remove button next to Safely remove disk in the WebUI, at the left after clicking on the USB drive icon.

To create a compatible partition, execute:

Code:
mke2fs -t <filysystem> -L <insert label here> /dev/sdaX

so for example, assuming your USB drive is /dev/sda and it has only 1 partition, listed as /dev/sda1

Code:
mke2fs -t ext4 -L RT-AC68U /dev/sda1

will create 1 partition on /dev/sda (which replaces /dev/sda1), with an ext4 filesystem and will label the partition 'RT-AC68U' (without the quotes). The label is mandatory (for use on your router), but you choose anything you like. You can choose between ext2, ext3 and ext4 as filesystem. More info about the differences can be found through the search function, but with ext4 you should be fine.

When it's finished, reboot the router or physically remove the usb drive, wait for 10 seconds and plug it back in. You're all set now.
 
Last edited by a moderator:
That's correct. You can do it with a PC or a Mac, but you can also do it directly on the router, to make sure you don't have any compatibility issues. Login to your router with SSH and execute

Code:
fdisk -l

the output should look somewhat similar to this:

Code:
marco@router:/tmp/home/root# fdisk -l

(..)

Disk /dev/sda: 30.7 GB, 30752636928 bytes
255 heads, 63 sectors/track, 3738 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks  Id System
/dev/sda1               1        3738    30025453+ 83 Linux

At the bottom of the partition you'll see, if you only have one USB drive connect, /dev/sda. If you have multiple USB drives connected, determine the correct one based on its size.

The following steps will wipe your entire USB drive. In other words, backup if nescessairy before proceeding.

To create a compatible partition, execute

Code:
mke2fs -t <filysystem> -L <insert label here> /dev/sdaX

so for example, assuming your USB drive is /dev/sda and it has only 1 partition, listed as /dev/sda1

Code:
mke2fs -t ext4 -L RT-AC68U /dev/sda1

will create 1 partition on /dev/sda (which replaces /dev/sda1), with an ext4 filesystem and will label the partition 'RT-AC68U' (without the quotes). The label is mandatory, but you choose anything you like. You can choose between ext2, ext3 and ext4 as filesystem. More info about that can be found through the search function, but with ext4 you should be fine.

When it's finished, reboot the router or physically remove the usb drive, wait for 10 seconds and plug it back in. You're all set now.

Even better, thanks so much for the detailed help. This is great I was just about to spend money on an App. I hope others needing the same advice find this. Thanks for your time and knowledge, really appreciate it.
 
Both will do fine. I don't want to start the whole 'which-filesystem-is-best' discussion all over again.

I'll just use EXT4, and if I have an issue I'll come back here and ask for some advice. But I trust that it'll be fine.
 
Both will do fine. I don't want to start the whole 'which-filesystem-is-best' discussion all over again.
I have tried EXT2 , EXT4 and EXT4 with the journalling switched off... i don't see much performance difference with any of them, and in all cases the continuous writes to the stick for dnsmasq logging etc eventually cause disk errors. I use the disc checker in amtm which postpones the inevitable for longer, but its good to have a plan to replace the stick every year or so..... not sure how other peoples mileage varies as i log syslog-ng and pixelserv writing logs to my stick too.
 
Just installed on RT-N66U to ext2 usb, and I'm not sure how to interpret the results when checking "Diversion" in SSH after the reboot (at the end of setup).



login as: admin
admin@192.168.1.1's password:


ASUSWRT-Merlin RT-N66U 380.70-0 Sun Apr 8 18:03:20 UTC 2018
admin@RT-N66U-12F0:/tmp/home/root# diversion
[: bad number
Diversion 4.0.1 by thelonelycoder

RT-N66U (mips) FW-380.70 @ 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 Mon @ 2:00
el edit lists

f follow dnsmasq.log

e exit Diversion more options o
____________________________________________________

What do you want to do?
 
Just installed on RT-N66U to ext2 usb, and I'm not sure how to interpret the results when checking "Diversion" in SSH after the reboot (at the end of setup).



login as: admin
admin@192.168.1.1's password:


ASUSWRT-Merlin RT-N66U 380.70-0 Sun Apr 8 18:03:20 UTC 2018
admin@RT-N66U-12F0:/tmp/home/root# diversion
[: bad number
Diversion 4.0.1 by thelonelycoder

RT-N66U (mips) FW-380.70 @ 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 Mon @ 2:00
el edit lists

f follow dnsmasq.log

e exit Diversion more options o
____________________________________________________

What do you want to do?
Post the diversion.conf content here, you can view it in sf.
 
Does updating completely overwrite post-mount.sh?
Diversion and most other scripts around here adhere to the agreed standard here.
For AB-Solution that was not the case and I had to make a clean cut with the mess in the /jffs/scripts directory. Some custom entries in these files fell by the wayside, as stated during the porting to Diversion.
Your custom scripts are now safe, Diversion does not touch them.
 
So i have installed diversion and ssh shows it as running.
anything else need to be done?
eg. changing dns on my router and such?
how does traffic get filtered through pixelserv-tls ip?
Diversion set everything up for you and the built in checks would have told you during the install process if there are conflicting settings.
 
I ran "Diversion help" and don't see anything about "sf" - how do I get sf and access diversion.conf for you?
Open Diversion and then enter sf.
 
Last edited:
Open Diversion and then enter sf.

/opt/share/diversion/.conf/diversion.conf has this content:

START FILE, --- lines are not part of file
---------------------------------------------------
## DO NOT EDIT THIS FILE ##

# General settings #
NAME=Diversion
thisVERSION=4.0
thisM_VERSION=1
EDITION=
THEME=local
INSTALL_URL=https://diversion.ch/diversion
DIVERSION_STATUS=enabled
adblocking=on
logging=
editorColor=
editorPaginate=
shHistory=on

# Communication settings #

# Blocking file settings #
bfType=Standard
bfPlusHosts=
bfUpdateDay=Monday
bfUpdateDOW=Mon
bfUpdateHour=2
bfUpdateLastRun="Sep 10 14:22:23"
bfUpdatePrevRun=""
blockingIP="0.0.0.0"

# Entware settings #
entPath=""
entVersion=""

# Ad-blocking counters #
blockedDomains=60081
adsBlocked=0
adsWeek=0
adsNew=0
adsPrevCount=""
adsLastCount=""

# Messaging #

---------------------------------------------------
END FILE
 

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