Repository navigation
Releases
cgmon 2.8.6: botnet watch, port knocking, DNS self-healing, auto-update
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.
cgmon 2.7.17
cgmon 2.7.17 is out
A big update: since 2.6.30 cgmon finds security holes in the router and the devices on your network, speaks five languages and takes over per-site VPN routing that used to need hand-written scripts.
🛡 Headline feature: vulnerability scanner
A new «Security» section. Once a week (or on demand) the router checks itself:
- Every package and the Linux kernel are checked against vulnerability databases: OSV.dev with the Debian assessment, CISA KEV (already exploited), FIRST EPSS (probability of exploitation in the next 30 days). OpenWrt's own packages (uhttpd, odhcpd, procd, LuCI…) are checked against OpenWrt security advisories, and curl and other projects with their own databases by their exact version ranges.
- Programs not installed as packages (AdGuard Home, tailscale, docker…) are checked by their own version.
- Router settings: what is open to the internet, port forwards, root password, SSH password login, telnet, LuCI over http, Wi-Fi (open, WEP, WPA1, WPS, short key), UPnP.
- Devices on the network: safe probes only, no login attempts. It looks for telnet, FTP, SMB, RDP, VNC, camera video without a password, and XMEye/Dahua/Hikvision services.
- Honest risk levels. «Critical» is reserved for what can be reached from the internet: cgmon maps the ports open to the internet to the programs listening on them. Anything exploitable only from your own network is at most «serious».
- Cameras and video recorders are detected automatically. cgmon checks whether they talk to the vendor cloud, since through the cloud a device can be reached from outside even without port forwards. The «Isolate» button keeps the device on the local network only: you can still watch video and record to a DVR, but it cannot reach the internet. The block is by MAC address and undone with one click.
- One-click updates: an «Update» button per package and «Update all». Free space is checked first, taking into account that a package from the firmware takes its full size when updated; if there is not enough room, nothing is touched. System packages (kernel, kmod, netifd, firewall…) are left out of «Update all». cgmon can update itself too, verifying the SHA256 checksum.
- A compact table on the main page shows one row per package with the exploit probability in %. The full report with every vulnerability opens in a separate window.
🌍 Five languages, all the way through
English, Russian, Uzbek, Kazakh, Chinese. Everything is translated: the page, every setting hint, the journal, events, incidents, Telegram notifications, the setup wizard and the CLI help. The journal follows the page language. README in all five languages.
🧭 Per-Site Routing: permanent list
Hand-written scripts for routing individual sites through a VPN are no longer needed. Sites (with subdomains), networks and whole autonomous systems (AS prefixes from RIPEstat) are listed right on the page, in a separate editor window, one per line or separated by «;». Domain addresses are routed before the client even gets the DNS answer. If the gateway goes down, the sites go direct.
🔗 OpenWrt integration
- The router address can open cgmon instead of LuCI. The previous start page is kept and restored with one setting.
- You can set router names such as
router.lanandcgmon.lanthat always open cgmon. - The page has a prominent «OpenWrt Settings (LuCI)» button.
✍️ Config files in any encoding
cgmon.yaml and the site list are now read as UTF-8 (with or without BOM), UTF-16 or Windows ANSI (cp1251/cp1252), with CRLF line endings. The file is converted to UTF-8 and the original is kept next to it. No more «stream did not contain valid UTF-8» after editing in Notepad or WinSCP.
🔧 Fixed
- The WAN speed tile and chart were capped at 120 Mbps by a leftover page setting.
- Per-Site Routing: AS prefixes from RIPEstat never loaded. More generally, commands with more than 64 KB of output (the package list on routers with hundreds of packages, etc.) hung until the timeout and returned nothing.
- TOP CPU / TOP RAM: a long process name hid the percentage and megabytes.
- Russian text leaking into the English and other translations.
- The journal and events came in English while the page was in Russian.
- Scanner false alarms: version comparison of
10.6_p1-style versions, packages matched by a similar name, CVEs that only affect old versions, VPN peers taken for LAN devices.
full, lite and nano builds for x86_64, i686, aarch64, armv7, armv5te, mips and mipsel, plus .apk and .ipk packages, are in Assets. The full list of changes is in CHANGELOG.md.
cgmon 2.6.30
briefly described as: "all traffic" overlay gateway, Per-Site Routing, silent TLS drop detection, English LuCI, 7 architectures/packages.
cgmon 2.4.22
cgmon is a conductor for OpenWrt/ImmortalWrt routers: it never routes traffic itself — it only loads kernel rules (nftables, ip rules/routes, tc, DNS config) and watches. See the README for features.
Which file
| Build | What it is | Files |
|---|---|---|
| full | everything, incl. SmartDNS-based targeted DNS guard and rerouting | cgmon-full-linux-<arch> (plain), cgmon-<ver>-r1-<arch>.apk, cgmon_<ver>-1_<arch>.ipk |
| lite | everything except SmartDNS; curl, ZeroTier, tc installable from the page | cgmon-lite-linux-<arch> (UPX), cgmon-lite-*.apk/.ipk |
| nano | runs on a stock OpenWrt image (e.g. TL-WR1043ND v4); SQM installable (~240 KB) | cgmon-nano-linux-<arch> (UPX), cgmon-nano-*.apk/.ipk |
Architectures: x86_64, i686, aarch64, armv7 (arm_cortex-a*), armv5te (kirkwood), mips (ath79, mips_24kc), mipsel (ramips, mipsel_24kc).
Install
# OpenWrt / ImmortalWrt 25.x
apk add --allow-untrusted /tmp/cgmon-lite-2.4.22-r1-mipsel.apk
# OpenWrt 24.10 and older
opkg install /tmp/cgmon-lite_2.4.22-1_mipsel.ipk
# or a plain binary with the setup wizard
/tmp/cgmon-lite-linux-mipsel --installA package for the wrong CPU refuses to install. Checksums: SHA256SUMS (binaries), SHA256SUMS-packages (packages).
What's new in 2.4.22
- OpenWrt package Makefile for the
packagesfeed:openwrt/package/cgmon(variantscgmon,cgmon-lite,cgmon-nano, binary in/usr/sbin) - CGI scripts find the binary in
/usr/sbinor/opt/cgmon - README: building the OpenWrt package from source
cgmon 2.4.21
cgmon is a conductor for OpenWrt/ImmortalWrt routers: it never routes traffic itself — it only loads kernel rules (nftables, ip rules/routes, tc, DNS config) and watches. See the README for features.
Which file
| Build | What it is | Files |
|---|---|---|
| full | everything, incl. SmartDNS-based targeted DNS guard and rerouting | cgmon-full-linux-<arch> (plain), cgmon-<ver>-r1-<arch>.apk, cgmon_<ver>-1_<arch>.ipk |
| lite | everything except SmartDNS; curl, ZeroTier, tc installable from the page | cgmon-lite-linux-<arch> (UPX), cgmon-lite-*.apk/.ipk |
| nano | runs on a stock OpenWrt image (e.g. TL-WR1043ND v4); SQM installable (~240 KB) | cgmon-nano-linux-<arch> (UPX), cgmon-nano-*.apk/.ipk |
Architectures: x86_64, i686, aarch64, armv7 (arm_cortex-a*), armv5te (kirkwood), mips (ath79, mips_24kc), mipsel (ramips, mipsel_24kc).
Install
# OpenWrt / ImmortalWrt 25.x
apk add --allow-untrusted /tmp/cgmon-lite-2.4.21-r1-mipsel.apk
# OpenWrt 24.10 and older
opkg install /tmp/cgmon-lite_2.4.21-1_mipsel.ipk
# or a plain binary with the setup wizard
/tmp/cgmon-lite-linux-mipsel --installA package for the wrong CPU refuses to install. Checksums: SHA256SUMS (binaries), SHA256SUMS-packages (packages).
What's new in 2.4.21
- English documentation by default (Russian in
*.ru.md), new screenshots - builds for 7 architectures; lite and nano are UPX-packed
.apkand.ipkpackages with a CPU check- gateway switching and gateway maps work with the stock busybox
ip - missing packages: greyed-out settings with an Install button on the page; ZeroTier and SmartDNS get a safe default setup