fwscope // firewall, WAF & IDS log visualizer

When loading:
Reading…

Drop firewall, WAF or IDS logs here

UFW · nftables · OpenWrt · OPNsense / pfSense · Windows Firewall · AWS VPC · Azure · fail2ban · Suricata · ModSecurity / Coraza · Cloudflare

Files, a whole folder or rotated .gz logs. Several at once are merged and repeated lines skipped; add more any time.

Everything is parsed in this browser tab. Nothing is uploaded anywhere, unless you turn on the optional hostname lookups.

Optional extras world map and network owners, OPNsense rule names, blocklists

GeoIP database: drop a .mmdb (or .mmdb.gz) country and/or ASN database for the world map and network owners. It's kept in this browser.

OPNsense / pfSense names: drop a config backup (config-*.xml) and/or rule_ids.json to show interface and rule names instead of IDs. Only the names are kept.

Blocklists: drop a plain list of addresses and ranges (Spamhaus DROP, a FireHOL .netset, your own) to mark sources on it. Checked here, never looked up online.

Get your logs

1. Turn logging on

  • sudo ufw logging low: blocked packets that hit the default policy, plus rate-limited (LIMIT) ones.
  • medium adds allowed new connections (ALLOW) and invalid packets. high / full add AUDIT lines and are noisy.
  • Per rule: ufw allow log 22/tcp or ufw deny log-all ...

2. Grab the log

sudo cp /var/log/ufw.log* ~/ && sudo chown $USER ~/ufw.log*
journalctl -k -g 'UFW ' -o short-iso --since '-7d' > ufw-journal.log
scp you@server:'~/ufw.log*' .
  • Also fine: kern.log, syslog, dmesg -T and journalctl -o json. UFW writes each line to three of those files; the copies are skipped.

Or let fwscope-pull.py fetch it from the computer you run fwscope on, or sudo python3 fwscope-pull.py local on the server itself:

python3 fwscope-pull.py ssh you@server --sudo

More detail on every format is in the README.

Events over time

Drag across the chart to zoom into a time range. Double-click to reset.

Where sources come from

Add an IP-to-country and/or IP-to-network (ASN) database in .mmdb format to see this map. Drop it on the page or use the button. It's kept in this browser for next time, and every lookup happens locally.
  • DB-IP Lite: grab "IP to Country Lite" and "IP to ASN Lite" (MMDB). Free, no account, CC BY 4.0, updated monthly. The .mmdb.gz works as downloaded.
  • IPinfo Lite: country and ASN in one file, free with a sign-up.
  • MaxMind GeoLite2 Country / ASN: free account and license key.

New in the last

First seen in that window and never earlier in the loaded logs, within the current filter (try dpt:22 for new SSH sources). Click to filter. Shift-click to exclude.

Compare the last

with the one before, by
Both periods end at the newest event loaded and use the current filter (its time range aside). Sorted by the size of the change. Click a row to filter to it.

Top

Click a row to filter to it. Shift-click to exclude it.

Top

Click a row to filter to it. Shift-click to exclude it.

When it happens

events by weekday and hour, your local time

Scans and hammering

blocked sources sweeping many ports, or hitting the same port over and over

Events

fwscope 1.4.0 by magikh0e · source on GitHub · GPL-3.0-or-later · buy me a coffee

Paste log lines