Count IP addresses blocked by ufw
ufw show blocked ips | count ufw block entries | ufw.log missing debian 12 | ufw | journalctl | firewall | loggingjournalctl -k --since "today" --no-pager | grep 'UFW BLOCK' | grep -o 'SRC=[^ ]*' | sort | uniq -c | sort -rn | head -20Reads the kernel messages from the journal, filters the packets blocked by ufw and counts the source addresses. Also works on Debian 12 without rsyslog, where there is no /var/log/ufw.log. Time ranges such as today, 1 hour ago or 2026-10-09 08:00 are accepted.
Note: Requires ufw logging to be enabled (ufw logging low).
Also searched as
- ufw show blocked ips
- count ufw block entries
- ufw.log missing debian 12