Get your free beta license ↗
CMDCommand · run as root on the server · firewall family

urbestack-firewall-rule-add

First published 3 Oct 20260.1.0Unchanged since publication

Usage

# urbestack-firewall-rule-add --kind port|allow|deny|closed --value VALUE [--note TEXT] [--client ADDRESS]

Description

From the command's --help output
Adds a firewall rule. Use --kind port to open an extra port or --kind closed to drop traffic to
a port even if a service is listening. IP addresses on the Allow list can still reach a closed
port. For either kind, --value accepts a port or an inclusive range such as 30000-31000. Port
numbers run from 1 to 65535, and ranges start at the lower port. TCP is the default. Append /udp
for UDP or /tcp to specify TCP explicitly.

For --kind allow or --kind deny, --value accepts an IPv4 or IPv6 address or a network in CIDR
notation. Adding to the Allow list lifts any active bans it covers. An allow rule can make an
exception inside a larger denied network. UrbeStack rejects a deny rule that an allow rule
already covers in full, and an allow rule that would cover an existing deny rule in full. It
also rejects duplicate rules.

Use --client to specify the caller's IP address. If omitted in an SSH session, the command uses
the SSH client's IP address. UrbeStack refuses a deny rule that covers the caller's IP address,
a server IP address, or loopback. It lets you close an SSH or web interface port only if the
caller's IP address is on the Allow list.

Adding a deny rule requires that no other change be pending. By default, UrbeStack restores the
previous rules after five minutes unless you confirm with urbestack-firewall-confirm or the
Confirm button in the web interface. Open a new session to verify access before confirming.

Options

Find other commands that accept these options

Same in the API

This operation runs the command.

More in firewall

8 commands, by what they work onView all commands in this family →
urbestack-firewall-
urbestack-firewall-ports-
urbestack-firewall-rule-
Generated from release 0.2.35 (current) · urbestack-firewall-rule-add --help outputThis entry has been unchanged since it was first published in release 0.1.0 on 3 Oct 2026.
urbestack.com/docs/commands/urbestack-firewall-rule-add/