Firewall rules you add by hand disappear
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
--kindto one of these values.portopens a port.allowallows an IP address or network everywhere.denyrefuses an IP address or network everywhere.closedcloses 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-listShow the table nftables currently holds.
nft list table inet urbestackA rule you add through UrbeStack appears in the table with its note, as in
comment "allowed in the panel: ...".