Guardian for RouterOS – anomaly watchdog for your home network

Hi all,

I'd like to share Guardian, an open-source tool I wrote for my own network. It runs as a container directly on RouterOS. If you give it a try, I'd appreciate your feedback - whether it's useful for you and what you're missing.

It learns what is normal for each device in the LAN and alerts you (web UI, Telegram or ntfy) when something changes:

  • an unknown device joins the network
  • a device starts talking to a new country, e.g. a camera to CN
  • unusual upload, e.g. a camera sending 2.8 GB/h instead of the usual 60 MB/h
  • a device contacts hundreds of different IPs (scanning, botnet)

A suspicious device can be quarantined with one click (firewall address list).

How it starts:

  • first 24 hours: inventory of the network, no alerts
  • learning period (7 days by default, 1-60 configurable): it builds a traffic profile per device and only reports new devices
  • each device also needs a few days of its own history before it is checked, so a newly added device learns on its own
  • after that all detectors are active; learned data can be reset from the UI and learning starts again

What you can configure (in the web UI):

  • Telegram and/or ntfy, minimum severity to notify, test message
  • learning period, sensitivity (low/normal/high), each detector can be turned off
  • per device: name, device type (cameras and IoT are watched more strictly than phones and laptops), merging devices with several MACs
  • router connection, LAN range and UI login are set via container environment variables

It reads DHCP leases, ARP and connection tracking via the REST API. No DPI, works with FastTrack. On my hAP ax3 it uses about [XX] MB RAM and the router CPU stays at 1-3 %. MIT license.

Install from GHCR:

/container add remote-image=ghcr.io/marteva/routeros-guardian:latest ...

Full setup guide and source: GitHub - Marteva/routeros-guardian: Home network anomaly watchdog that runs as a container on MikroTik RouterOS · GitHub

2 Likes