Firewall Rule Matrix Generator
Build a reviewable firewall rule matrix from flow rows with least-privilege findings, deterministic risk cues, and platform handoff guidance.{{ summaryTitle }}
{{ summaryLine }}
{{ summaryAnnouncement }}
| {{ header }} | Copy |
|---|---|
| {{ cell }} |
| {{ header }} | Copy |
|---|---|
| {{ cell }} |
| {{ header }} | Copy |
|---|---|
| {{ cell }} |
| {{ header }} | Copy |
|---|---|
| {{ cell }} |
{{ markdownText }}
A firewall request is easiest to review when it describes a permitted or denied flow rather than a vendor command. The essential statement identifies where traffic starts, where it goes, which protocol or service it uses, and what action should apply. Ownership, justification, approval, logging, and expiry turn that technical tuple into a governable policy decision.
Broad entries save time during drafting but create uncertainty during enforcement. “Any source” can expose a service far beyond its intended clients. “Any service” hides the actual protocol and port boundary. Named objects can look narrow while concealing large or stale member lists. A useful rule matrix keeps those ambiguities visible before the policy is translated into a firewall, cloud control, or host rule.
| Part | Question it answers | Why it can still be incomplete |
|---|---|---|
| Source and destination | Which hosts, networks, zones, or groups communicate? | A name may hide membership, and a CIDR may cover more addresses than intended. |
| Protocol, port, or application | Which traffic is permitted, denied, or observed? | A service name needs translation, while an application may use dynamic or multiple ports. |
| Action and logging | What happens on a match, and what evidence is recorded? | Platform defaults, state tracking, and log volume can change the operational result. |
| Owner, reason, ticket, and expiry | Who approved the access and when should it be revisited? | Filled text does not prove that approval is current or that the owner still exists. |
Translation is platform-specific. An AWS security group expresses allows and relies on the absence of an allow for denial, while an Azure network security group has ordered priorities and explicit allow or deny actions. Zone firewalls, access lists, host firewalls, and application-aware policies each add their own ordering, direction, object, state, and inspection semantics.
A matrix is therefore a review and handoff artifact, not a deployed policy. It cannot see routing, network address translation, inherited rules, live object membership, application identity, or the effective order already installed on a device. Those checks remain necessary even when every row looks narrow and the review score is clear.
How to Use This Tool:
Describe the intended flows first, then select the review assumptions that match the eventual policy owner and platform.
- Paste CSV Flow rows with a header and quoted cells where needed, or load a small CSV or TXT file. Start from the sample when you need the canonical column order.
- Choose the Matrix lens, Target platform, Object treatment, review audience, and enforcement posture. These settings change findings and handoff guidance; they do not generate deployable vendor syntax.
- Set defaults for blank action and logging fields. Open Advanced to choose display order, a rule ID prefix, a fallback owner, the expiry window, and an explicit reference date.
- Read the first parse warning if one appears. Correct invalid CIDR or date text and expand opaque objects when the chosen review mode requires literal membership.
- Work through the Rule audit queue from Critical to Clear, then compare each row with the Platform handoff.
- Verify order, objects, routes, NAT, management access, and rollback details in the real target before implementation.
Interpreting Results:
The percentage shown for a row is a review priority from a repository-authored heuristic. Findings do not add together; the row keeps the highest score that fired. A value of 70 can therefore mean one broad sensitive-service finding, not that 70% of a formal security standard has failed.
| Derived band | Score rule | Meaning |
|---|---|---|
| Critical | 85 to 100 | Stop and narrow or redesign the row before handoff. |
| High | 60 to 84 | Resolve a broad, conflicting, expired, or platform-incompatible condition. |
| Medium | 35 to 59 | Add missing context or correct a consequential review gap. |
| Low | 1 to 34 | Record and clean up a smaller governance or specificity issue. |
| Clear | 0 | No built-in finding fired for the supplied row and selected assumptions. |
A finding explicitly named High or Critical keeps that severity even when its numeric score falls below the ordinary band boundary. For example, high-visibility logging can create a High finding scored at 58. This preserves the rule's stated severity instead of silently downgrading it through the numeric bands.
Clear is not an approval and does not prove reachability, isolation, or correct enforcement. Compare the normalized row with the request, expand object membership, and test the effective policy path. For a remote firewall change, preserve and verify the management path before applying or removing rules.
Technical Details:
The review model parses up to 600 non-comment flow rows from at most 512 KiB of text. A header is recognized when at least two cells match known firewall-field aliases. Without a header, rows follow one of two fixed positional layouts. Quoted CSV cells and doubled quote characters are supported.
The canonical flow covers source zone, source name and CIDR, destination zone, destination name and CIDR, protocol, ports, action, application, reason, owner, ticket, expiry, and logging. Missing zones become Unspecified. Blank action and logging values use the selected defaults; explicit row values always take precedence.
Rule Core:
Address, service, governance, duplication, ordering, and platform checks are evaluated independently. Each finding carries a fixed severity and score, and the row risk is the maximum score rather than a sum.
| Condition | Finding severity | Score |
|---|---|---|
| Allow from any source to any destination for any service | Critical | 96 |
| Allow any source to a bounded destination for any service | High | 74 |
| Any-service allow with a bounded source | High | 64 |
| Any source or IPv4 prefix of /8 or shorter on an allow | High | 62 |
| Other broad source on an allow: IPv4 /16 or shorter, or IPv6 /48 or shorter | Medium | 38 |
| Any destination on an allow | High | 58 |
| Sensitive service from an any or broad source | High | 70 |
| Port range | Low | 18 |
| Port outside 1 to 65535 or reversed range | Medium | 36 |
| Missing reason | Medium | 32 |
| Missing owner | Low | 18 |
| Missing ticket | Low | 16 |
| Logging off or unspecified on an allow | Medium, or High under high-visibility posture | 34 or 58 |
| Logging off or unspecified on a non-allow row | Low | 18 |
| High-visibility posture without start-and-end logging | Low | 20 |
| Temporary-exception allow without expiry | Medium | 40 |
| Strict-enforcement posture with a log-only row | Medium | 36 |
| Expired review date | High | 66 |
| Review date from 0 days through the selected warning window | Medium | 38 |
| Invalid review date | Low | 14 |
| Duplicate tuple with conflicting actions | High | 68 |
| Duplicate tuple with the same action | Medium | 34 |
| Possible shadow by an earlier any-source or any-destination row with the same protocol and ports | Medium | 42 |
The duplicate tuple consists of normalized source, destination, protocol, ports, and application. Zones, action, reason, owner, ticket, expiry, and logging do not distinguish duplicate tuples. The shadow check is intentionally narrow: it detects an earlier row using any source or any destination under the same protocol-port conditions, not full CIDR containment or vendor-specific policy evaluation.
Sensitive-port review covers FTP data and control, SSH, Telnet, SMTP, DNS, RPC, NetBIOS, IMAP, LDAP, SMB, MSSQL, Oracle, NFS, MySQL, RDP, PostgreSQL, VNC, WinRM, Redis, Elasticsearch, Memcached, and MongoDB on ports 20, 21, 22, 23, 25, 53, 135, 139, 143, 389, 445, 1433, 1521, 2049, 3306, 3389, 5432, 5900, 5985, 5986, 6379, 9200, 9300, 11211, and 27017. A named service is mapped to its listed port before the broad-source check.
Platform Rules:
| Selected context | Additional finding | Severity and score |
|---|---|---|
| AWS security group | Explicit deny row; public ingress to any or sensitive service | High 62; High 72 |
| Cloud-security-group lens on another platform | Explicit deny row | Medium 40 |
| Azure NSG | Source or destination zone missing | Medium 38 |
| Google Cloud VPC firewall | Any-source allow to any or sensitive service | High 68 |
| Cisco ASA | Any-service allow | High 64 |
| FortiGate | Allow without logging | Medium 36 |
| Palo Alto | Allow without an application name | Medium 36 |
| Linux or Windows host firewall | Allow with any destination | Medium 42 |
| Expanded members required | Opaque source or destination object | High 60 |
| Inline values only | Opaque address object or application label remains | Low 18 |
| Monitor before enforce | An allow row has already reached risk 60 or higher | Medium 36 |
Address text such as blank, any, all, *, 0.0.0.0/0, or ::/0 is normalized to any. Valid IPv4 and IPv6 prefixes are retained. Text that resembles an address but fails validation is kept as an opaque named object and produces a parse warning instead of being discarded.
Display ordering does not change the original normalized CSV. Input order preserves source parity, risk-first sorts by descending score, and specific-first favors longer address prefixes plus bounded ports and named zones. Generated rule IDs reflect the selected display order, so choose the order before handing the matrix to another reviewer.
Responsible Use and Privacy:
The matrix is a deterministic review aid, not a firewall compiler, vulnerability scanner, or authorization decision. Its scores are locally authored priorities and must not be presented as NIST, vendor, regulatory, or compliance ratings.
- Raw policy text is processed in the browser and is not placed in the page URL.
- Opaque object names are not expanded automatically. Verify their live members and ownership.
- Platform handoff text does not model every default rule, inherited policy, NAT stage, route, identity control, or stateful return path.
- Validate proposed changes in the target platform and preserve a tested management and rollback path before enforcement.
Worked Examples:
Unrestricted allow request
An allow row with any source, any destination, and any service receives the built-in Critical finding at 96. The useful next step is not to polish the row's ticket text; it is to replace the three unbounded fields with the smallest approved sources, destinations, and services.
Scoped application flow
A Palo Alto row from one /32 application host to one /32 database host over TCP 443 can remain Clear when the application, reason, owner, ticket, expiry, and logging are all supplied. Clear still requires checking policy order, App-ID behavior, NAT zones, routing, and the live device configuration.
References:
- Guidelines on Firewalls and Firewall Policy, National Institute of Standards and Technology, September 2009.
- RFC 1918: Address Allocation for Private Internets, RFC Editor, February 1996.
- Security group rules, Amazon VPC User Guide.
- Azure network security groups overview, Microsoft Learn.
- How to allow a port through the firewall in Linux, Simplified Guide.