# Firewall rules you add by hand disappear

UrbeStack sysadmin note about nftables. Last updated 30 Nov 2026.

A firewall rule you add with `nft` or `iptables` works for a while and then disappears. Rules you add through UrbeStack stay because it writes the entire nftables table from its own records.

## Symptoms

A rule you add with `nft add rule` or `iptables` disappears after a reboot or a firewall change in UrbeStack.

## Cause

UrbeStack keeps the firewall rules in its own records. At every firewall change, it replaces the entire `inet urbestack` table with the rules from those records.

At boot, nftables loads the table from UrbeStack's file. That file contains none of the rules you added by hand.

## Resolution

Add the rule through UrbeStack. Set `--kind` to one of these values.

- `port` opens a port.
- `allow` allows an IP address or network everywhere.
- `deny` refuses an IP address or network everywhere.
- `closed` closes a port while its daemon continues to listen on it.

To deny a network, run the following command.

```
urbestack-firewall-rule-add --kind deny --value 198.51.100.0/24 --note 'scanner'
```

List the rules UrbeStack has recorded.

```
urbestack-firewall-rule-list
```

Show the table nftables currently holds.

```
nft list table inet urbestack
```

A rule you add through UrbeStack appears in the table with its note, as in `comment "allowed in the panel: ..."`.

If the problem persists after you follow this note, you can [open a support ticket](https://support.urbestack.com/new?type=support). Including the output of the commands you ran helps support diagnose the problem.
