fireman place#
place answers “I need this traffic allowed (or blocked): where does the rule
go?”. It checks each request against one policy as it stands, shows which rules
already give it the action you want and which don’t, and lists ranked ways to
fix the rest: insert a new rule somewhere in a band of positions, or widen an
existing rule. It changes nothing. Only the chosen policy is compiled, and the
findings cache is not used.
Synopsis#
fireman place --firewall FW --policy P [--action accept|deny]
(--src V... --dst V... SERVICE... | --requests FILE)
[--name WORKSPACE] [--no-implicit-deny] [--format table|json|yaml]
Option |
Meaning |
Default |
|---|---|---|
|
Firewall that owns the policy (required) |
|
|
Policy to check against (required) |
|
|
Action wanted; a request’s own |
|
|
Source: a name, |
|
|
Destination, like |
|
|
Service name or |
|
|
One TCP or UDP port; repeatable |
|
|
A port range; repeatable |
|
|
ICMP type, any code; repeatable |
|
|
ICMP type and code; repeatable |
|
|
Any other IP protocol by number, e.g. |
|
|
YAML file with a list of requests |
|
|
Workspace to read |
|
|
Don’t add the final deny-all rule |
off |
|
|
|
A request comes either from the flags or from --requests, not both. With
flags, give at least one --src, one --dst and one service; the service flags
mix freely and together make one request. Names resolve as they would in a rule
of that firewall (its own objects first, then global ones).
Reading the table#
Each request gets one row per option, best first.
- Granted
The rules that already give part of the request the wanted action.
- Missing
The rules that give the rest the other action.
implicit denymeans no rule matches it;undecided(only with--no-implicit-deny) means nothing decides it.- Option
One way to grant the request.
insert after X, before Ymeans a new rule anywhere between rule X and rule Y has the same effect;topandendare the start and end of the policy.widen Xmeans adding the request’s values to rule X’s sources, destinations and services, offered only when that adds nothing beyond the request, and never for an empty rule or one with a negated list.none neededmeans it is already granted.- Overrides
Explicit rules that would lose traffic to the change. Check these: an override of a deny rule opens something someone closed on purpose.
- Left
Traffic of the request still not granted after the change. Empty means the option grants all of it.
Options are ranked: full grant first, then fewest overrides, widen before insert, then policy order.
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}
Allow HTTPS from a range that block-abusers denies:
fireman place --firewall edge --policy inbound --action accept \
--src 198.51.100.0/24 --dst web-servers --tcp 443
Placement
┏━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━┓
┃ Request ┃ Action ┃ Granted ┃ Missing ┃ Option ┃ Overrides ┃ Left ┃
┡━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━┩
│ #1 │ accept │ │ block-abusers (order_id │ insert after top, before │ block-abusers (order_id │ │
│ │ │ │ 10) │ block-abusers (order_id │ 10) │ │
│ │ │ │ │ 10) │ │ │
└─────────┴────────┴─────────┴───────────────────────────┴───────────────────────────┴──────────────────────────┴──────┘
The only way is a new rule above block-abusers, which then loses that traffic.
Requests given by flags have no name, so they show as #1.
The typed service flags build the services for you. Ping and a port range from the LAN to the DMZ:
fireman place --firewall edge --policy inbound --action accept \
--src lan --dst dmz --icmp 8 --tcp-range 8000 8080
Placement
┏━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━┳━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━┳━━━━━━┓
┃ Request ┃ Action ┃ Granted ┃ Missing ┃ Option ┃ Overrides ┃ Left ┃
┡━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━╇━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━╇━━━━━━┩
│ #1 │ accept │ │ implicit deny │ insert after top, before end │ │ │
└─────────┴────────┴─────────┴───────────────┴──────────────────────────────┴───────────┴──────┘
No rule touches this traffic, so a new rule can go anywhere.
Several requests from a file#
requests.yaml holds four named requests against edge/inbound, each with
its own action. Its format is a list of mappings with name (optional),
action (optional, else --action), sources, destinations and services,
written like a rule:
# Requests against edge/inbound, for `fireman place` and `fireman covered`.
- name: partner-https
action: accept
sources: [203.0.113.0/24]
destinations: [web-servers]
services:
- {protocol: 6, ports: [443, 443]}
- name: admin-ssh
action: accept
sources: [lan]
destinations: [dmz-hosts]
services: [ssh]
- name: monitoring-ping
action: accept
sources: [10.1.20.0/24]
destinations: [dmz]
services:
- {protocol: 1, icmp_type: 8}
- name: block-scanners
action: deny
sources: [192.0.2.0/24]
destinations: [web-servers]
services: [web]
fireman place --firewall edge --policy inbound --requests requests.yaml
Placement
┏━━━━━━━━━━━━━━━━━┳━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━┳━━━━━━┓
┃ Request ┃ Action ┃ Granted ┃ Missing ┃ Option ┃ Overrides ┃ Left ┃
┡━━━━━━━━━━━━━━━━━╇━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━╇━━━━━━┩
│ partner-https │ accept │ allow-web │ │ none needed │ │ │
│ │ │ (order_id 20) │ │ │ │ │
│ admin-ssh │ accept │ allow-admin-ssh │ │ none needed │ │ │
│ │ │ (order_id 60) │ │ │ │ │
│ monitoring-ping │ accept │ │ implicit deny │ insert after top, │ │ │
│ │ │ │ │ before end │ │ │
│ block-scanners │ deny │ │ allow-web │ widen block-abusers │ allow-web │ │
│ │ │ │ (order_id 20) │ (order_id 10) │ (order_id 20) │ │
│ │ │ │ │ insert after top, │ allow-web │ │
│ │ │ │ │ before allow-web │ (order_id 20) │ │
│ │ │ │ │ (order_id 20) │ │ │
└─────────────────┴────────┴────────────────────┴────────────────────┴─────────────────────┴────────────────────┴──────┘
block-scanners has two options with the same cost. Widening block-abusers
(adding 192.0.2.0/24 to its sources) is listed first, since it adds no rule;
a new deny rule above allow-web works as well. --format yaml adds the
traffic of each decision.
Common errors#
Every input problem is collected and printed together, and the command exits 2.
A problem with flag input names the flag (--src: ...); one in a --requests
file gives the request’s index from 0 and the field (requests[1].sources: ...).
Message |
Cause |
|---|---|
|
Typo in |
|
No |
|
Neither the request nor |
|
Part of the request is missing |
|
Both input styles at once |
|
A bad typed flag |
|
A flag request that resolves to nothing, e.g. an empty group |
|
Same, in a |
|
|
|
A bad entry in the |
|
The |