Hello World! logmy.io
Jul 8, 2018
5 minute read

Announcing logmy.io!

A simple tool to help people track bandwidth usage per device on DD-WRT routers. Based on wrtbwmon, a script created many years that configured iptables to track bandwidth per device. There are three problems with the original and current scripts available.

Problem 1. It was difficult to install requiring knowledge of command line and a USB port (or a secondary server) to backup information.

Problem 2. A recent update to DD-WRT enabled the Shortcut Forwarding Engine (SFE) module in the kernel which broke all current methods of monitoring per device bandwidth consumption. SFE can be disabled but there are large performance benefits to leaving it enabled.

Problem 3, The scripts stored limited information not always providing all the information needed to diagnose network consumption issues.

logmy.io attempts to fix all these problems and makes the process much simpler.

Why Did You Build It?

I have wanted to build a SaaS product for a long time. I have dabbled in creating apps and websites in the past but never successfully launched a product. When I was faced with the problem of having to log bandwidth consumption for the third time and saw the recent changes to DD-WRT I thought it was a perfect problem to build a niche tool. I had three major goals when I started developing logmy.io.

  1. Keep it secure.

  2. Make it easy to use.

  3. Sell it to one person.

I believe I have successfully achieved goals one and two and am looking forward to checking off goal three.

Why Log Bandwidth?

Primarily focused on people with limited internet plans. Unfortunately, not everyone has access to unlimited internet options and when bandwidth is consumed by multiple devices it can be difficult to understand which device used that bandwidth.

I have personally encountered two different scenarios in which I needed the ability to understand per device bandwidth consumption. The first was during my undergraduate degree. I lived in a house with 6 (yes half a dozen) other people. We had a bandwidth cap had a roommate that was consuming far too much bandwidth at our student residence. I installed wrtbwmon on our router which demonstrated that a single individual was responsible for the internet overage charges. The setup process was involved and due to the lack of storage or USB on the router wrtbwmon could not retain information across restarts. The second was at my parent’s rural residence. Their internet options are limited and they continually incur significant overage charges. Installing the script on their router helped them two years ago find a rogue device consuming data. They once again needed logging and instead of setting a one-off solution I decided to build it as a service.

Some individuals may find other reasons to log device data including monitoring an individuals time of use, personal curiosity or to ISP charges. It is my hope that there are tech-savvy individuals that will find logmy.io helpful.

How Did You Build It?

Starting with wrtbwmon I wanted to determine a new method of logging data consumption considering SFE. Internet speeds are fast enough at some location that SFE could impact the performance of a router. There are a limited number of options for collecting bandwidth statistics especially due to the restricted nature of some DD-WRT builds. While the old iptable method is still in play I developed a new method that involves watching the conntrack tables and calculating the changes to session byte counters. While this method isn’t perfect its imperfection should not be noticeable in the significant figures presented to the user over virtually any time period. I decided that I wanted to do keep the script on the router as simple as possible so the next problem I needed to solve was how to transfer the data from router to logmy.io. There are again a limited number of options and I decided that scp would be both appropriate and with proper setup an attention, secure. The result of this work I released as a new opensource script WRT-LINK using the GPL license.

With the on-device script sorted I created a system to consume, process, store and display the information. This service reduces the complexity of work on a router and removes all processing requirements off of the router. Finally, I put some effort into making the deployment/setup process a simple sub-10-minute process. While this may be an intimidating process for some individuals it doesn’t’ require any technical knowledge and should be easily tackled by anyone who considers themselves tech savvy.

Is It Safe?

This was a big focus of the development. Recently router malware made global news when it was discovered that a large number of routers were infected with malware. This is the fault of both insecure passwords and outdated firmware. If you are switching to DD-WRT and using a secure password that should really improve your overall security compared to individuals using out of the box setups.

Another important point to mention is that the security of your router is important to the overall security of every device that connects to it. The choice of using Secure Copy Protocol (scp) as the communication protocol ensures transport security. The underlying protocol Secure Shell (ssh) is encrypted and requires both parties to prove their identity when a connection is established. When the install script is copied to the router by a user the encryption keys are copied and stored in the router. This ensures that right from the start the router begins communicating with logmy.io in a secure manner.

Future Plans

There is a number of additional features I would like to develop around this idea of supporting DD-WRT routers with a third party service. Additional logging, security, automatics updates and many more make the list. For now, I need to see that there is interest in this service. If you find this in any shape or a form an interesting idea please signup to the mailing list. If you don’t I would like to hear why. Please contact me through any of my public channels or at feedback@logmy.io.

Thanks for Reading! Happy Logging.



comments powered by Disqus