# urbestack-firewall-ports-set

First published 14 Oct 2026 (release 0.2.0) · Unchanged since publication

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

## Usage

```
urbestack-firewall-ports-set --ports "8080, 9000/udp, 30000-31000"
```

## Description

Replaces the firewall's list of extra open ports. The command requires --ports, a comma-separated list of ports or ranges. Entries can be single ports such as 8080 or inclusive ranges such as 30000-31000. Port numbers run from 1 to 65535. A range starts at the lower port. TCP is the default. Append /udp for UDP or /tcp to specify TCP explicitly.

Pass an empty string to --ports to remove all extra port openings.

## Same in the API

- [PUT /security/firewall/ports](https://urbestack.com/docs/api/put-security-firewall-ports.md): Replace the firewall's list of extra open ports

## 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-render](https://urbestack.com/docs/commands/urbestack-firewall-render.md): Regenerates the nftables rules and the sshd drop-in from UrbeStack's settings, checks both configurations, and applies them.
- [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.
