Repository navigation
A big update since 2.7.17. cgmon now watches your home network for botnet activity, can open access to the router by "knocking", restarts a hung DNS service by itself and can update itself. The vulnerability scanner got smarter: fewer false alarms, and on forks like ImmortalWrt it finds fixed packages in the main OpenWrt repository.
Highlights
- 🕵️ Botnet and threat watch for every device on the network
- 🚪 Port knocking (ping, TCP or UDP steps)
- 🩺 Router DNS self-healing (SmartDNS / AdGuard Home / dnsmasq)
- 🛡 Vulnerability scanner: fixes from the main OpenWrt repository, fewer false positives
- ⬆️ Auto-update from GitHub releases
- 🌐 Works under nginx and lighttpd, not only uhttpd
- 🔀 VPN tunnels as gateways (OpenVPN, WireGuard and others)
- ✏️ Name devices from the page (written to DHCP and hostnames)
[details="Details"]
🕵️ Botnet and threat watch
Any smart device can quietly become part of a botnet: a TV box, a camera, a PC, even a vacuum cleaner. Infected devices scan the internet, rent out your connection as a proxy, or wait for commands from their server. cgmon now watches all devices on the network:
- Threat lists, updated daily, no API keys: botnet command servers (C2IntelFeeds, Feodo Tracker, SSLBL), malware distribution hosts (URLhaus), attacker networks (Spamhaus DROP), and the large HaGeZi TIF list.
- DNS check: every name a device asks for is matched against the lists, including parent domains.
- Address check: listed IPs live in nftables sets; the kernel itself records which device connects to them, so there is almost no CPU cost.
- Behavior signs, no lists needed: scanning the internet on telnet/SSH/ADB and similar ports (how Mirai-like worms spread), many random non-existent domains (domain generation), hundreds of destinations at once (proxy botnets; torrents look the same, so this is only "suspicious").
- Findings show up in the Security block with an Isolate button (the device keeps LAN access only) and in the events.
- Lightweight: the full build keeps the large lists (~230k entries) in about 2 MB of RAM (domains are stored as 64-bit hashes); lite uses medium lists, nano only command servers. On the test router cgmon uses about 9 MB RSS with all lists.
🚪 Port knocking
Access to the router opens for the address that "knocked": it sent, in order, pings of given sizes, TCP connections or UDP packets to given ports. Every phone and PC can ping, so no client app is needed.
- After a knock, the router ports (SSH, web) are redirected to the router's LAN address, so SSH that listens on LAN only becomes reachable from WAN and VPNs.
- Optional forwards to LAN devices after a knock (RDP, NVR, etc.).
- Knock interfaces are picked with checkboxes: every gateway (WAN, modem, OpenVPN, WireGuard…) and VPN network (ZeroTier, Tailscale…).
- A "how to knock" window shows ready commands for Linux/Android/macOS and Windows with the router address filled in, and warns when the external IPv4 is behind carrier-grade NAT.
- Every opening is logged to the events.
🩺 Router DNS self-healing
Once a minute cgmon queries the router's DNS with a random name that cannot be cached. After three failures in a row while the internet itself works, it restarts the service that hung (SmartDNS, AdGuard Home or dnsmasq): at most once in 15 minutes and 4 times a day.
🛡 Vulnerability scanner
- Fixes from the main OpenWrt repository. On forks (ImmortalWrt etc.) a fixed package is often already on downloads.openwrt.org while the firmware repository lags behind. cgmon looks it up for the same branch and architecture and offers "Update · from OpenWrt"; apk/opkg verifies the signature with the OpenWrt key. Beta (branch SNAPSHOT) builds are offered only for high and critical findings.
- Fewer false positives: sshd CVEs are skipped when only openssh-sftp-server is installed; Docker 29+ is checked against the right Go module (
moby/moby/v2, mapped through the Go module proxy) instead of the frozendocker/docker; packages already at the latest build are not offered again. - When no fixed package exists anywhere, the finding says where it was fixed upstream: "fixed in X · no package yet".
- A failed request to the vulnerability database no longer wipes previous findings.
- After a cgmon update the check runs again automatically.
⬆️ Auto-update
New setting "Auto-update cgmon": every 6 hours cgmon checks GitHub releases, downloads a newer version, verifies SHA256 and restarts. With auto-update off, a new version is announced in the events with an "Update" button. Disabled on metered connections.
🌐 nginx and lighttpd
On routers where LuCI runs under nginx (luci-nginx) or lighttpd, the cgmon page used to be empty because the CGI scripts were served as text. cgmon now configures the web server itself (a uwsgi vassal for nginx, mod_cgi for lighttpd). Tested with uhttpd, nginx, lighttpd and the Gargoyle uhttpd config. cgmon web-setup shows what was found and configured.
🔀 VPN tunnels as gateways
Point-to-point tunnels — OpenVPN, WireGuard, AmneziaWG, L2TP, GRE, IPsec — now appear in "Gateway order" and in the address bypass of broken routes, even when they do not install their own default route (e.g. OpenVPN with redirect-gateway def1 or route-nopull). Extra gateways (your own nodes in a network) are visible in any DNS guard mode, and the "all traffic" overlay gateway works in "active" mode too. Devices that no longer exist are hidden.
✏️ Device names
Each device in "Active devices" has a ✎. The name goes to the router's DHCP static leases and hostnames, so it shows in cgmon, in LuCI and in DNS (name.lan). Handy for PCs with a manual address that never announce their name. Console: cgmon dev-name MAC IP [NAME].
🔧 Fixes and polish
- The traffic chart fills the gap after the PC slept or the tab was in the background; after a long break the page reloads.
- Current events are balanced into two columns; vulnerabilities in the events are counted per package and only when there is a fix.
- Settings: "?" icons are vertically centered, fewer wrapped lines.
- The Per-Site Routing check-sites dropdown no longer closes by itself.
- Default router name for cgmon is
cgmon.lan. - Code review for security issues; memory caps for the threat lists.
[/details]
📦 Downloads: full, lite and nano builds for x86_64, i686, aarch64, armv7, armv5te, mips and mipsel, plus .apk and .ipk packages — in the Assets of the GitHub release: https://github.com/real4root/cgmon/releases/tag/v2.8.6. Full changelog: CHANGELOG.md.