The annual firewall audit is a comfort ritual. It produces a PDF, satisfies an assessor, and describes the device as it existed on the afternoon someone remembered to export the config. The device itself keeps moving: a rule gets reordered to unblock a latency ticket, an address object gets widened to include a new subnet, a NAT policy appears at 02:00 from an engineer who never filed a change. Config drift detection isn't about reading rules more carefully. It's about knowing within minutes that the running config no longer matches the intent you approved.

Drift is a delta against intent, not a deviation from a template

If your baseline is simply yesterday's export, every approved change becomes tomorrow's drift. Do the arithmetic on a mid-size estate: 40 firewalls, each taking 2.5 approved changes a week, gives you 100 legitimate config events weekly. If each produces half a dozen lines a reviewer must eyeball, that's 600 lines of diff review every week — and review quality collapses well before week three. Keep three artifacts instead of one: declared intent (policy-as-code or the approved change record), the last-known-good snapshot, and the running config. Drift is running-config diverging from last-known-good. An out-of-band change is running-config diverging from intent with no matching ticket. Those are different alerts with different severities, and conflating them is why drift tooling gets muted.

Five places drift actually hides

  1. Rule order. First-match semantics mean moving one permit above a deny widens access without adding a single line. Line-count diffing sees nothing.
  2. Object and group redefinition. One address object edit can silently re-scope a large part of the rulebase — one edit, 200 rules changed.
  3. Appended rules. Provisioning and helpdesk tooling tends to append at the bottom of the rulebase, where nobody looks and shadowing is easy.
  4. NAT, routing, and interface state. A route change or NAT edit can move traffic out of an inspection path while every firewall rule stays byte-identical.
  5. Administrative surfaces. Local accounts, SNMP communities, logging destinations, a disabled syslog target. These rarely page anyone and are almost always the finding that matters in an incident review.

Normalize before you diff, or you'll drown

Vendor-native config output is hostile to comparison: comments reflow, timestamps and counters change on every pull, object groups expand differently, sections reorder. Canonicalize first:

  • Parse into sections: interfaces, zones, objects, NAT, policy, admin
  • Expand group references to resolved members
  • Strip volatile fields — uptime, counters, timestamps, build strings
  • Sort rules within each section
  • Hash each section

A 12,000-line config collapses into roughly 30 comparable hashes, and a real change lights up exactly one of them. Target a noise ratio below one false positive per real drift. Above that, engineers stop reading the alerts.

Snapshot cadence sets your mean time to detect

You cannot detect drift faster than you snapshot it — cadence, not scan depth, is what sets your mean time to detect.

Pull config through the management API after every commit, plus a scheduled sweep for changes nobody committed. A 15-minute sweep across 30 firewalls is 2,880 pulls a day, each one a hash comparison measured in milliseconds. Commit-triggered pulls catch the authorized change and give you evidence. The scheduled sweep catches the 02:00 edit with no ticket, which is the entire point.

Correlate every delta with a change record before you page

Most diffs on a well-run estate trace to a legitimate ticket. If 8 of 10 deltas match a change record, paging on raw diffs trains the team to ignore pages. A workable loop:

  • Diff fires on a section hash change
  • Query the change system for tickets touching that device within ±30 minutes
  • Matched: attach the diff to the ticket as evidence and close silently
  • Unmatched: classify by what changed, not how many lines changed
  • Page only on high-blast-radius categories — rule order, object redefinition, admin surface, inspection bypass

Severity by semantic category beats severity by line count every time. A one-line object edit that widens a DMZ rule outranks a 40-line interface reformat.

Verify convergence, not just detection

An alert that fires and closes is not a fix. After remediation, re-pull the config and re-diff against the intent baseline; the finding closes only when the hash matches. Otherwise you accumulate resolved tickets over a device that still carries the drift. Track one number above all others: drift dwell time, the minutes between a change landing on the device and detection. A 20-minute dwell time inside a four-hour change window makes drift a contained problem. A dwell time measured in weeks is an audit with extra steps.

Where this is heading

Firewall drift detection is becoming continuous attestation: intent declared in code, devices reconciled on a cadence, evidence emitted as a byproduct instead of assembled before an assessment. Firewalls get there first because the config is structured, the API exists, and the blast radius is obvious. The same loop then moves to load balancers, then to cloud security groups — anywhere a rulebase can change without a diff. Teams that treat the diff engine as the product and the report as exhaust will onboard the next estate cheaply. Teams still exporting PDFs will keep rediscovering drift during incident reviews, one widened object at a time.