Firewall rules from flows (Rule builder) in Topologix

Infrastructure & Networking

A firewall that allows any → any between segments can be tightened without guessing: the Rule builder takes the conversations your flow exporters saw crossing it, turns them into host / group / service objects and rules with their evidence, compares each rule with the firewall’s current policy (already allowed, allowed only by the broad rule, a merge into an existing rule, or new), and lets you review everything before you export it in the firewall’s own syntax. Nothing is ever pushed to a firewall — the export is text for the firewall team to review and apply.

Requirements

  • Network flows: NetFlow / IPFIX / sFlow from exporters that see the traffic crossing the firewall — the firewall itself, or the switches / virtual switches (vDS) behind it, which see every VLAN-to-VLAN conversation that goes through it.
  • A proxy at version 1.325.0 or later for each listening proxy: it keeps the flow ledger — every distinct conversation (client, server, protocol, port, exporter) with the days it was seen — from the minute it is updated. Older proxies are named on the page with what to update.
  • Optional: the firewall as an integration (FortiGate, Palo Alto, Check Point) or a configuration backup of it, so the rules are compared with its current policy and its object names are reused.
  • Editing a project needs the right to change the owner’s flow settings and, when a firewall is picked, to edit that firewall’s integration; everyone who can see the owner’s flows can read the projects.

1 · The evidence

  1. Point the exporters at a proxyThe exporters behind the firewall send their flows to a proxy (Infrastructure → Flows → Exporters lists them). Only those exporters’ conversations become rules, so pick the ones whose traffic crosses the firewall.
  2. Let the ledger collectFrom the proxy update on, the proxy folds every minute’s FULL set of conversations into its ledger (not only the busiest ones), and the server pulls the distinct set every night. A conversation is kept once, however long it runs — the size follows the number of distinct conversations, not time (a per-owner and a global cap, and a retention, are Admin settings — each shows its value and source).
  3. The 7-day seed is partialOn the first run the server also seeds up to 7 days from each proxy’s local flow store. That store keeps only the busiest flows per exporter per minute, so quiet but necessary flows — DNS, NTP, LDAP, monitoring — can be missing: rules that rest on it carry Partial evidence, and the page shows a banner until the ledger has collected on its own.
  4. Longer historyWith the flow warehouse (ClickHouse, up to 30 days) the window can reach back further. Let the ledger run across a full business cycle — month-end jobs, backups, patch nights — before you trust the absence of a flow.

2 · What flows can and cannot tell

Sampling

A sampled exporter (1-in-N packets) reports a share of the conversations. Busy ones always appear; a short, rare one may never be sampled. Unsampled flow export (or the firewall’s own) is best for rule building; with sampling, keep the broad rule as a fallback longer and lean on Validation.

NAT position

The addresses are the ones the exporter saw. Exporters behind the firewall (the inside switches, the vDS) see the real inside addresses — what a rule between internal segments needs. An exporter on the outside of a NAT sees translated addresses; for destination NAT (a FortiGate VIP) the rule must name the address the firewall matches, which the comparison takes from the firewall’s VIPs when it reads them.

Direction and ephemeral ports

Each conversation is oriented client → server by the well-known / listening port; the client’s ephemeral port is never kept, so a rule names the service port only. A protocol without ports (ICMP, GRE …) becomes a protocol service.

3 · Building and reviewing the rules

A project

Network → Rule builder → New project. On Scope pick the firewall (and its device / VDOM), the exporters behind it (none = every exporter of the owner), the window, subnets to include or leave out, the minimum flows / days, and the detail: Exact hosts, Grouped (hosts with the same role, service or subnet become groups) or Zone level. Generate rules makes a version; Run again makes the next one — older versions stay.

Zones

Zones come from the firewall’s interfaces / zones, from suggestions out of the flows (dense subnets), or by hand. An address in no zone is unzoned and its rules compare as unknown. The zone matrix shows how many rules and flows go between each pair of zones.

Objects

Hosts are named from the inventory, else reverse DNS, else the address; services by their well-known names. When the firewall already has an object with the same value, its name is reused in the exports instead of a duplicate. Accept, reject or rename each host, group and service: a rejected group is exported as its members, a rejected host or service drops out of its rules.

AI grouping (optional)

Suggest groups with AI sends a compact, redacted table — host names, zones, services, peer groups, with the addresses replaced by tokens — and gets back proposed groups with a reason. It uses AI credits; proposals change nothing until you accept them, and the AI never decides what is allowed.

Rules

Each rule shows its evidence (flows, bytes, days seen, first / last seen, the busiest pairs), its comparison with the current policy, and flags:

ComparisonMeaningIn the export
CoveredAlready allowed by a specific rule of the current policynot emitted (noted)
Broad onlyAllowed today only by a broad rule such as the any-anya new rule, to place above the broad one
MergeAn existing rule differs only by a host, a group member or a servicethe change to that rule / group (and every other rule a group change widens)
NewNot allowed by the current policya new rule
UnknownAn unzoned end, an object the reader could not resolve, an inline layer …a new rule, marked for a check
  • Flags: Rare (few days / few flows), One day, Broad (many hosts on a side), Unzoned end, Partial evidence (rests partly on the 7-day seed).
  • Accept, reject or rename each rule, or accept every pending rule the filter shows. Accept version makes the version the reference for validation.
  • Current policy lists the firewall’s rules with the findings: unused (no hits in the same window and no flow matches it) and shadowed (fully covered by an earlier rule, zones included).
  • The Rule builder’s policy reads (firewall-policy, config-backup-policy) are redacted with the secret floor only — passwords, keys and SNMP communities are always masked, but your organisation’s own rules (IP addresses, names) are not applied, so exports keep the real object names; a policy that still arrives with masked names is flagged and cannot be exported.

4 · Exports

Formats

The Export screen writes the open version: objects first, then groups, services and rules; rejected items are left out of the vendor texts (the sheets keep them, with their decision). Every export is recorded in the activity log.

FormatWhat you getVendor rules applied
Excel workbookSheets Rules · Objects · Groups · Services · Existing policy · Validationwritten in the browser
CSVThe same sheets as sections of one filea cell starting with = + - @ is prefixed with ' (no formulas)
FortiGate CLIconfig firewall address / addrgrp / service custom / policy, merges as appendnames ≤ 79, policy names ≤ 35, a group over 300 members split into parts nested under its name, IPv6 in address6
Palo Alto PAN-OSset address / address-group / service / rulebase security rulesnames ≤ 63 of letters, digits . _ - (starting with a letter or digit), every value quoted; ICMP as an application
Cisco ASA / FTDobject network / object-group / object service / access-listnames ≤ 64, nested groups as group-object, one ACL per source zone
Check Pointa mgmt_cli script ending with publishevery value quoted for the shell; ICMP and other IP protocols as service-other; rules in order from the position you give
Juniper SRXset security address-book global … / applications / policiesthe global address book only; an end without a known zone becomes a global policy

Options

Some formats take options on the Export screen:

  • FortiGate — the VDOM: the commands are wrapped in config vdom (blank = the project’s VDOM).
  • PAN-OS — the vsys of a multi-vsys firewall, or the Panorama device group (objects and pre-rulebase rules go there; it wins over the vsys). Paste only the set lines — the # header lines are comments for you.
  • Cisco ASA / FTD — the interface nameif per zone, which fills the access-group lines; a zone without one stays a commented placeholder. FTD: use the output as the reference for the FMC objects and access-control rules.
  • Check Point — the access layer (default “Network”) and the first rule’s position (top, bottom, a rule number, or a rule uid / name to place it above); the next rules follow it in order.
  • Cisco ASA / Juniper SRX — a firewall object name with characters their CLI cannot take unquoted is never pasted as is: the line becomes an “apply by hand” comment.
  • Exporting for another vendor than the project’s firewall ignores that firewall’s object names and comparison — every object is created and every rule emitted as new.

5 · Validation before the cut-over

Run the accepted version against new traffic

After Accept version, a daily job matches the conversations seen since against the accepted rules: would have been blocked (the busiest first, with first / last seen) and accepted rules no flow used. Keep the broad rule in place while you watch it; when the blocked list stays empty across a full business cycle, the firewall team can apply the rules above the broad one and then remove it.

  • A new version starts over: validation always follows the accepted one.
  • The Validation sheet of the Excel export carries the latest report.

Good to know

  • Nothing is pushed to a firewall: the Rule builder reads flows and (optionally) the firewall’s policy, and writes text for people to review.
  • The firewall’s policy is stored as read (the exports need its real object names); the screens and the AI see it redacted.
  • The Rule builder is not licence-gated; the flow warehouse (for the longer window) is.

All integrations →

See it on your own infrastructure

Book a demo and we will walk you through Topologix with your systems in mind: on our cloud, or self-hosted in your own network.