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!

Lastly, when in doubt: DON'T use an apostrophe. Good guide!

English: It's all so complicated with its grammatical rules :D
I'm using this wording if it's all right with you all: Set your email password in c, it has been redacted for security reasons.
That's perfect.

The Oatmeal has some other good grammar guides as well. Don't forget all the exceptions to the so-called "rules".
 
A quick question:

Some of the client names doesn't show up in the Diversion statistics, showing "Name-N/A" instead. What could be the cause of it and how do I fix it? I've tried enter a name in the WebUI but it doesn't proagate to the Diversion stats, but still shows in the WebUI client list.

Thanks for an awesome script btw!
 
A quick question:

Some of the client names doesn't show up in the Diversion statistics, showing "Name-N/A" instead. What could be the cause of it and how do I fix it? I've tried enter a name in the WebUI but it doesn't proagate to the Diversion stats, but still shows in the WebUI client list.

Thanks for an awesome script btw!
At the time the stats are generated, the clients IP addresses in the dnsmasq log files are resolved from several sources:
The routers files /e t c/hosts.dnsmasq and /var/lib/misc/dnsmasq.leases and a backup Diversion keeps: diversion_stats-iphostleases in its backup folder.
Clients disappear after disconnect from the routers files. To help that a little, Diversion updates its backup file daily during the log file rotation at 5:20 in the morning.

If your "Name-N/A" (Name not available) clients are not connected at any of those times then they will show up as such.

You could make sure such an unnamed device is connected and then run the following command in the terminal to save the name to the backup file:
Code:
sh /opt/share/diversion/file/rotate-logs.div
 
I've tried enter a name in the WebUI but it doesn't proagate to the Diversion stats, but still shows in the WebUI client list.
Good of you to mention it. It reminded me to integrate this into an existing function.
Next Diversion release will save the clients names automatically to the backup file when viewing the clients list in c, 2, 5.
 
At the time the stats are generated, the clients IP addresses in the dnsmasq log files are resolved from several sources:
The routers files /e t c/hosts.dnsmasq and /var/lib/misc/dnsmasq.leases and a backup Diversion keeps: diversion_stats-iphostleases in its backup folder.
Clients disappear after disconnect from the routers files. To help that a little, Diversion updates its backup file daily during the log file rotation at 5:20 in the morning.

If your "Name-N/A" (Name not available) clients are not connected at any of those times then they will show up as such.

You could make sure such an unnamed device is connected and then run the following command in the terminal to save the name to the backup file:
Code:
sh /opt/share/diversion/file/rotate-logs.div
So I ran the command without success, ie the command ran without errors, but still no names in the stats. So I checked the files you mentioned:

  • I don't have the file /e t c/hosts.dnsmasq but I do have a file /e t c/hosts which contains the loopback ip and the routers ip with different domain-names for it. Nothing else. Don't know if the filename difference is due to me beeing on an RT-AC68U and you on a newer device?

  • The Diversion backup file contains some names, one per ip address, but not all ip's have a name attached to it. The names are not the ones entered in the WebUI, but similar though :confused:.

  • Checking /var/lib/misc/dnsmasq.leases yeilds all my current dhcp-leases, but some devices do not have a name attached to them. Some do, and they show up in the stats, and the ones that doesn't do not show in the stats (duh!). So I think your script is doing its thing correct, but now the question is why my dhcp-leases don't get their name from the WebUI. Any ideas?
 
Last edited:
So I ran the command without success, ie the command ran without errors, but still no names in the stats. So I checked the files you mentioned:

  • I don't have the file /e t c/hosts.dnsmasq but I do have a file /e t c/hosts which contains the loopback ip and the routers ip with different domain-names for it. Nothing else. Don't know if the filename difference is due to me beeing on an RT-AC68U and you on a newer device?

  • The Diversion backup file contains some names, one per ip address, but not all ip's have a name attached to it. The names are not the ones entered in the WebUI, but similar though :confused:.

  • Checking /var/lib/misc/dnsmasq.leases yeilds all my current dhcp-leases, but some devices do not have a name attached to them. Some do, and they show up in the stats, and the ones that doesn't do not show in the stats (duh!). So I think your script is doing its thing correct, but now the question is why my dhcp-leases don't get their name from the WebUI. Any ideas?

Did you set hostnames for your devices in DHCP server settings page?
 
I don't have the file /e t c/hosts.dnsmasq but I do have a file /e t c/hosts which contains the loopback ip and the routers ip with different domain-names for it. Nothing else. Don't know if the filename difference is due to me beeing on an RT-AC68U and you on a newer device?
That file only exists if one sets a manually assigned IP in LAN / DHCP Server /
Enable Manual Assignment and then select from the drop down below.
The Diversion backup file contains some names, one per ip address, but not all ip's have a name attached to it. The names are not the ones entered in the WebUI, but similar though :confused:.
The names one sets in Network Map are stored in NVRAM and contain the set name with its associated MAC address. No IP to query it against.
Hence Diversion cannot make use of that list.
So I think your script is doing its thing correct, but now the question is why my dhcp-leases don't get their name from the WebUI. Any ideas?
See above.
 
That file only exists if one sets a manually assigned IP in LAN / DHCP Server /
Enable Manual Assignment and then select from the drop down below.
Tried it and it works! Only downside is that I have to manually assign every host to an IP and also add a name to it, more or less defeating the purpose of DHCP, but that's ok. Thanks for clearing that out! And also a thumbs up for @Asad Ali giving the same tip.

The names one sets in Network Map are stored in NVRAM and contain the set name with its associated MAC address. No IP to query it against.
Hence Diversion cannot make use of that list.
Ok. And yeah, I see the problem with hostnames and IP's when using DHCP, trying to associate IP's and hostnames over time.

Another thing, the stats file contains info on when it was generated, but from what I can see it doesn't contain info from what starttime the stats is based on, ie start-stop timeframe. I think that it would be great to have info about what timeframe the stats are based on, if possible :rolleyes:.
 
Another thing, the stats file contains info on when it was generated, but from what I can see it doesn't contain info from what starttime the stats is based on, ie start-stop timeframe. I think that it would be great to have info about what timeframe the stats are based on, if possible :rolleyes:.
A weeks worth of log files for the weekly stats report. The log files get reset on blocking list update day, no matter if stats run or not.
 
just tried, and with this configuration (using 1.1.1.1 DOT) I see ads...
Why would you see ads? ad blocking is controlled by Diversions and shouldn't change anything on DoT or DNSSEC.
 
Why would you see ads? ad blocking is controlled by Diversions and shouldn't change anything on DoT or DNSSEC.
I think this can happen if he has inadvertently entered values into the LAN DNS settings, where most people have no need to enter anything here (it seems to confuse many users). Most should leave that section blank, unless you have some very specific need here (a true inside the LAN DNS server).
 
Last edited:
Diversion 4.1.3 is now available

What's new in Diversion 4.1.3
- Adds 'diversion-adblocking-ip.address' as first entry in blocking list(s), identifies blocking IP as such for network scanners*
- Option to save essential Diversion files as local backup to /jffs in d, manually or periodically. This is helpful for reinstalling Diversion
- Hosted lists in el now also support shared Dropbox links
- Adding a commented 'do-not-check-swap' (without the quotes) anywhere to /jffs/scripts/post-mount will read indented swap code and not correct paths (Diversion 4.1.3 and amtm 2.6 and later)
- Added /jffs start scripts check during startup
- Added Diversion lock feature to prevent multiple sessions. Thanks @Adamm for inspiration
- Saves client names to stats backup file when viewing client list in c, 2, 5
- Requires the router to reboot after this update
- More power to the iOS Shortcut for Diversion v1.3!

*) Requires updating the blocking list to take effect.

Side note: Despite this version number being 4.1.3, the Shortcuts version being 1.3, amtm on version 2.6 (twice 13) and all of them released on the 13th day of this month: Diversion appears to be compatible with Asuswrt-Merlin 384.13 (in alpha release)

How to update
Use u or d and select Update.

gbT45PB.png
 
Last edited:
Side note: Despite this version number being 4.1.3, the Shortcuts version being 1.3, amtm on version 2.6 (twice 13) and all of them released on the 13th day of this month: Diversion appears to be compatible with Asuswrt-Merlin 384.13 (in alpha release)

All part of my plan. Once everything aligns, the Gate should open.
 
All part of my plan. Once everything aligns, the Gate should open.
What kinda gate?? :cool: StarGate which I would love....or Heaven's Gate...not a fan of. o_O

Edit: Google "Heaven's Gate" for those interested. Not a fan of them....
 
What kinda gate?? :cool: StarGate which I would love....or Heaven's Gate...not a fan of. o_O

Edit: Google "Heaven's Gate" for those interested. Not a fan of them....
When I start my cult, it's going to be: Sneakers = Yes, Coolaid = No. :D
 

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