fireman usage#
usage lists every group and rule that uses a name, either directly or through
groups at any depth, so you know what a change to an object will touch. It
follows the same lookup rules as
rules do: a name is looked up globally, or from one firewall with
--firewall. Nothing is compiled, so it is quick on any estate.
Synopsis#
fireman usage NAME [--firewall FW] [--name WORKSPACE] [--format table|json|yaml]
Option |
Meaning |
Default |
|---|---|---|
|
Address, FQDN, service or group name |
|
|
Look |
global |
|
Workspace to read |
|
|
|
|
Examples#
Load the sample estate first (fireman load estate.yaml):
estate.yaml
# A small estate: one firewall, `edge`, between the internet, a DMZ and the LAN.
# The docs use it throughout. `inbound` is seeded with anomalies; `outbound` is
# clean.
addresses:
- name: lan
values: [10.1.0.0/16]
- name: dmz
values: [192.168.10.0/24]
- name: web-servers
values: [192.168.10.10, 192.168.10.11, 192.168.10.12]
fqdns:
- name: update-server
fqdn: updates.example.com
addresses: [203.0.113.10]
resolved_at: 2026-11-20T08:00:00Z
- name: partner-api
fqdn: api.partner.example
addresses: [203.0.113.50]
resolved_at: 2026-11-20T08:00:00Z
services:
- name: web
entries:
- {protocol: 6, ports: [80, 80]}
- {protocol: 6, ports: [443, 443]}
- name: ssh
entries:
- {protocol: 6, ports: [22, 22]}
- name: dns
entries:
- {protocol: 17, ports: [53, 53]}
- {protocol: 6, ports: [53, 53]}
groups:
# Every DMZ host except the web servers. A global group sees the global
# `web-servers`, even inside `edge`, which has its own.
- name: dmz-hosts
kind: address
include: [dmz]
exclude: [web-servers]
firewalls:
- name: edge
addresses:
# edge publishes only two of the three web servers.
- name: web-servers
values: [192.168.10.10, 192.168.10.11]
policies:
- name: inbound
rules:
- order_id: 10
name: block-abusers
action: deny
sources: [198.51.100.0/24]
destinations: [web-servers]
services: [web]
- order_id: 20
name: allow-web
action: accept
sources: [any]
destinations: [web-servers]
services: [web]
- order_id: 30
name: allow-partner-https
action: accept
sources: [203.0.113.0/24]
destinations: [web-servers]
services:
- {protocol: 6, ports: [443, 443]}
- order_id: 40
name: block-scanners
action: deny
sources: [192.0.2.0/24]
destinations: [web-servers]
services: [web]
- order_id: 50
name: allow-partner-api
action: accept
sources: [partner-api]
destinations: [web-servers]
services: [web]
- order_id: 60
name: allow-admin-ssh
action: accept
sources: [lan]
destinations: [dmz-hosts]
services: [ssh]
- name: outbound
rules:
- order_id: 10
name: allow-dns
action: accept
sources: [lan]
destinations: [any]
services: [dns]
- order_id: 20
name: allow-updates
action: accept
sources: [dmz-hosts]
destinations: [update-server]
services: [web]
- order_id: 30
name: allow-web-out
action: accept
sources: [lan]
destinations: [lan, dmz]
destination_negate: true
services: [web]
- order_id: 40
name: allow-ping
action: accept
sources: [lan]
destinations: [any]
services:
- {protocol: 1, icmp_type: 8}
The sample estate defines web-servers twice: globally, and again in edge.
Each definition has its own users. The global one:
fireman usage web-servers
Uses of web-servers (address, global)
┏━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┓
┃ Kind ┃ Where ┃ Name ┃ Via ┃
┡━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━┩
│ group │ global │ dmz-hosts │ │
│ rule │ edge/inbound │ allow-admin-ssh (order_id 60) │ dmz-hosts │
│ rule │ edge/outbound │ allow-updates (order_id 20) │ dmz-hosts │
└───────┴───────────────┴───────────────────────────────┴───────────┘
The global group dmz-hosts excludes it, and two rules use that group, so they
reach web-servers via dmz-hosts. An empty Via means a direct use.
edge’s own web-servers is a different object:
fireman usage web-servers --firewall edge
Uses of web-servers (address, edge)
┏━━━━━━┳━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━┓
┃ Kind ┃ Where ┃ Name ┃ Via ┃
┡━━━━━━╇━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━┩
│ rule │ edge/inbound │ block-abusers (order_id 10) │ │
│ rule │ edge/inbound │ allow-web (order_id 20) │ │
│ rule │ edge/inbound │ allow-partner-https (order_id 30) │ │
│ rule │ edge/inbound │ block-scanners (order_id 40) │ │
│ rule │ edge/inbound │ allow-partner-api (order_id 50) │ │
└──────┴──────────────┴───────────────────────────────────┴─────┘
With --firewall, a name edge doesn’t define falls back to the global one,
just as in edge’s rules. As YAML, scope: null means global:
fireman usage dmz --format yaml
scope: null
name: dmz
kind: address
groups:
- scope: null
name: dmz-hosts
via: null
rules:
- firewall: edge
policy: inbound
order_id: 60
name: allow-admin-ssh
via: dmz-hosts
- firewall: edge
policy: outbound
order_id: 20
name: allow-updates
via: dmz-hosts
- firewall: edge
policy: outbound
order_id: 30
name: allow-web-out
via: null
Common errors#
Both exit 2.
Message |
Cause |
|---|---|
|
No such name in that scope |
|
No such firewall in the workspace |