# urbestack-firewall-render

First published 3 Oct 2026 (release 0.1.0) · Unchanged since publication

UrbeStack release 0.2.35 command, run as root in the server shell.

## Usage

```
urbestack-firewall-render [--after-sshd]
```

## Description

Regenerates the nftables rules and the sshd drop-in from UrbeStack's settings, checks both configurations, and applies them. On the first run, if sshd listens on a single port, UrbeStack adopts it as ssh.port. If sshd listens on several ports, the firewall opens them alongside the configured port and UrbeStack reports the mismatch.

After the first run, the command normally refuses to apply changes if sshd listens on different ports than UrbeStack expects. Set ssh.port to the intended port or remove the manual changes to the sshd configuration and restart sshd.

The sshd service runs this command with --after-sshd after every start. In this mode, the firewall also opens any ports sshd actually listens on, preserves the sshd configuration, and reports any mismatch. This mode also handles automatic reverts when a change reaches its deadline or the server reboots before confirmation.

## Command family: firewall

- [urbestack-firewall-confirm](https://urbestack.com/docs/commands/urbestack-firewall-confirm.md): Confirms the pending firewall change and cancels its automatic revert.
- [urbestack-firewall-ports-set](https://urbestack.com/docs/commands/urbestack-firewall-ports-set.md): Replaces the firewall's list of extra open ports.
- [urbestack-firewall-revert](https://urbestack.com/docs/commands/urbestack-firewall-revert.md): Reverts the pending firewall change immediately.
- [urbestack-firewall-rule-add](https://urbestack.com/docs/commands/urbestack-firewall-rule-add.md): Adds a firewall rule.
- [urbestack-firewall-rule-del](https://urbestack.com/docs/commands/urbestack-firewall-rule-del.md): Removes the firewall rule selected by --id.
- [urbestack-firewall-rule-list](https://urbestack.com/docs/commands/urbestack-firewall-rule-list.md): Lists UrbeStack's firewall rules and the ports and ranges the firewall is configured to open.
- [urbestack-firewall-status](https://urbestack.com/docs/commands/urbestack-firewall-status.md): Shows whether UrbeStack's firewall is enabled, which rules are configured, and which ports and ranges it is configured to open and why.
