Tools

🔥 Azure Firewall Watch

A terminal UI for live log monitoring of Azure Firewall: tail -f for your firewall, with instant filters and an evaluation trace of the matching rule.

Updated

az-firewall-watch is a terminal UI for live log monitoring of Azure Firewall. It streams firewall logs in near real-time from an Event Hub, filters them as you type, and tells you which rule decided a flow and why the rules before it did not match. Think tail -f for Azure Firewall, plus someone who has actually read your policy. Built in Python with Textual, released under the MIT license.

Download latest release → · Documentation → · GitHub →

az-firewall-watch Logs tab: firewall events streaming in, color-coded by category, with the filter bar set to the Decisions preset and the status bar showing the Event Hub connection, the event counter, and the policy context
The Logs tab with the Decisions preset

The story behind it is in Introducing az-firewall-watch. This page always shows the current state.

The idea is based on the excellent azure-firewall-mon by Nicola Delfino, a web app (Angular plus an Azure Functions backend) that you deploy into your own environment. az-firewall-watch takes that idea to the terminal and extends it: a single local binary with nothing to deploy besides the Event Hub, a setup wizard that can provision the whole log pipeline for you, passwordless Entra ID authentication, and policy context on top of the raw logs.

What it does

  • Live log stream from an Event Hub, without Log Analytics ingestion in between (which takes 2 to 10 minutes in my experience). Every category from NetworkRule to FatFlow, in the structured and the legacy log format, with automatic reconnect after a VPN switch or a flaky hotel Wi-Fi.
  • Filters on source, destination (or FQDN), action, category, protocol, and port, applied as you type. Source and destination also take CIDR prefixes like 10.3.0.0/16 or fd10:2::/32.
  • Presets in the category dropdown: Decisions (rules, Threat Intelligence, IDPS), Traffic (FlowTrace, FatFlow), and DNS. Hide DNS is on by default, because on a firewall with DNS proxy the queries drown everything else.
  • Dual-stack firewalls: IPv6 addresses show up in the table, the detail dialog, the filters, and the evaluation trace, in one spelling no matter how Azure logged them.
  • Evaluation trace: press Enter on a row to see the path that flow took through the policy, collection by collection, up to the rule that matched.
  • Firewall, Policy, and IP Groups tabs built from Azure Resource Manager, including a check whether your diagnostic settings actually forward every category this firewall can produce.
  • A status bar with three sources: Event Hub connection, events (last 9s ago), and policy context, so one glance tells you whether everything works.
  • Keyboard first: f jumps into the filter bar, Esc clears all filters, Ctrl + P pauses the stream, c clears the table, Ctrl + S saves a screenshot, Enter opens a row.
  • Setup wizard that finds or deploys the Event Hub, wires up Diagnostic Settings, and writes your configuration.
  • Single binary for Windows, macOS, and Linux (x86_64 and arm64), no Python install required, installable with Homebrew.

Which rule was it, and why not the one above?

A log row tells you Allow and the rule path. It does not tell you which rules the flow passed on the way, why the deny collection above it did not fire, or what that IP group actually contains. That is what the policy context adds: the viewer reads the firewall, its policy including the parent policy, and the referenced IP groups from Azure Resource Manager. It only reads, and Reader is enough.

az-firewall-watch detail dialog: the log entry’s fields on the left, and on the right the policy evaluation tree with the network rule collections marked as misses, nine preceding application rule collections folded, and the matching rule allow-outbound-web-traffic selected with source, destination, port and protocol all marked as match
The evaluation trace walks the policy in the firewall's own order and stops at the logged rule

The trace follows the order Azure Firewall uses: Threat Intelligence first, then DNAT, network, and application rules, the inherited policy before the child, each by priority. Collections the flow missed before the logged rule are folded into one line, and the panel under the tree shows each criterion of the selected rule with the logged value next to what the rule expects.

Where it really pays off is a Deny, no rule matched row. The trace then walks the whole policy and names the criterion that kept each near miss out, down to ✗ port 8443 not in 443. In a parent and child policy with a dozen collections, that is a lot faster than reading the policy yourself.

Whatever cannot be decided locally is a ?, never a ✓. Service tags, FQDN tags, web categories, and target URLs are not resolvable from a log row, and neither are destination addresses on an application rule, because Azure Firewall matches those against its own DNS resolution, which is nowhere in the log. A question mark beats a confident wrong answer. TLS-inspected requests (logged as the decrypted HTTP/1.1 request) and requests through the explicit proxy (logged with the real destination port) are handled, too.

The Firewall tab

The Logging block on the Firewall tab shows the log categories against the targets of all diagnostic settings, and one Event Hub coverage line for the hub the viewer reads from: complete, or incomplete with the missing names. It only counts what this firewall can produce: no IDPS log without Premium and IDPS switched on, no DNS log without the DNS proxy, no FatFlow log without the fat flow switch (off by default, and the answer to “why do I never see FatFlow rows?”).

The rest of the tab answers questions that come up in troubleshooting sooner or later: how the firewall scales, whether a maintenance window is assigned, and whether a NAT gateway on the firewall subnet changes which public IP the far end sees. Where the viewer cannot know something, it says so instead of guessing.

How it works

The viewer reads from two independent sources, and only the first one is required:

AZUREAzure FirewallDiagnostic Settingslog categoriesEvent Hubsretention 1 dayAzure Resource ManagerFirewall PolicyIP GroupsreferencesFirewall configurationSKU, IPs, NAT gateway, scaling, diagnostic settingsattachedYOUR TERMINALaz-firewall-watchlive logs, requiredpolicy context, optionalread-only
Entra ID
or SAS token
Entra ID
Reader role
Text is not SVG - cannot display
PNG
Two sources: the Event Hub is required, Azure Resource Manager is optional

If the viewer must not touch anything besides the Event Hub, set POLICY_CONTEXT=off. Then there are no ARM requests, no Azure CLI token, and no cache file, just the Logs tab. The only other host it contacts is api.github.com for the update check at start-up, and UPDATE_CHECK=off (or --no-update-check) switches that off, too.

Costs

A Basic Event Hubs namespace with one Throughput Unit costs about $11 per month, Standard twice that, plus $0.028 per million ingress events (retail prices as of October 2026, Germany West Central; check the Event Hubs pricing page for yours).

Basic is enough for the viewer, but check its limits first: one consumer group, one day of retention, and no Private Link or IP firewall. If your landing zone requires private endpoints for PaaS services, you need Standard. And switch FlowTrace and FatFlow on only while you troubleshoot: they change the event volume a lot.

Getting started

Prebuilt binaries for every platform are in the latest release. Every release ships SHA256SUMS.txt and a build attestation, so gh attestation verify tells you the file really came from the repository’s release workflow. You can also run it from source with Python 3.10 or newer.

Windows

Download az-firewall-watch.exe from the latest release and run it. The binary is not signed yet, so SmartScreen will warn you, and hardened machines may block it; the getting started guide explains how administrators allow it by hash. A winget package is waiting for review in microsoft/winget-pkgs (as of October 2026).

macOS / Linux

On macOS (Apple Silicon) and Linux (x86_64, arm64), install it with Homebrew, which also clears the macOS quarantine flag for you:

bash
brew install --cask cloudchristoph/tap/az-firewall-watch
az-firewall-watch

First launch

The setup wizard starts automatically. It can discover an existing Event Hub, take names or a SAS connection string, or deploy a new Basic namespace and point the firewall’s Diagnostic Settings at it, which builds the whole pipeline in 2 to 3 minutes (allow another 10 to 15 minutes until the first events arrive). If your environment enforces naming, tags, or private endpoints with Azure Policy, the deployment will likely fail: build the hub with your IaC and connect it with Discover.

For authentication I recommend Entra ID: passwordless, nothing secret on disk. SAS works everywhere, but the connection string lands in .env, so treat that file like the secret it is.

Limitations

  • One firewall per session. If several firewalls write into the same hub, the policy context comes from the first one the viewer sees.
  • It explains the cached policy. The cache lives for an hour. A row naming a rule the cache does not know triggers a re-fetch, and Ctrl + R forces one.
  • No history. The viewer shows what arrives after it starts. With EVENT_HUB_START_POSITION=earliest it replays what is still in the hub’s retention; for anything older there is still Log Analytics.
  • Classic rules directly on the firewall, outside a policy, are ignored. Migrate to Firewall Policy.

Documentation

The documentation lives in the repository: Getting started, Using the viewer, Policy context, Configuration, Log categories and Event Hub. Issues and feature requests are welcome, and a ⭐ is appreciated, too.

Useful? Let me know

Star on GitHub39 stars

Comments