EGR061 - nftables Users Set Not on the Host
Agent error code #EGR061 indicates that the nftables users set an egress knoc names is not on the agent host, or is not a set of uids with timeouts. On nftables, your own rules fence the knoc's destinations and accept the knoc's users set ahead of the reject, and the agent adds each granted account's uid to that set with the grant's expiry as its timeout. The agent never creates a set, so with the set missing there is nowhere to write the grant, and it fails.
The knoc names the set as <family>:<table>:<set>, such as inet:filter:knocknoc_egress_users, because a set belongs to one table and a rule reads only the sets of its own table.
Common causes include:
- The ruleset does not include knocker's sets file inside the table the knoc names, or was not reloaded after the include was added
- The knoc names another family or table than the one the set is in
- The set was declared without
flags timeout, so it cannot hold a grant's expiry, or holds something other than uids - A firewall reload was in progress when the grant was written. The agent writes the grant again within about 10 seconds of the set being back
Steps to Resolve
Check the Set
On the agent host, with the family, table and name the knoc's Users set gives:
sudo nft list set inet filter knocknoc_egress_users
"No such file or directory" means the set is not there. Otherwise it should read:
set knocknoc_egress_users {
typeof meta skuid
flags timeout
}
knocker status egress lists each set in knocker's files, and marks one your ruleset has not loaded.
Include knocker's Sets File
knocker enable egress writes /opt/knocknoc-agent/var/egress/nftables/knocknoc_egress.nft, which declares knocknoc_egress_users and the destination sets. Include it inside your own table, accept the users set ahead of a reject for the knoc's destinations, and reload your ruleset:
table inet filter {
include "/opt/knocknoc-agent/var/egress/nftables/knocknoc_egress.nft"
chain output {
type filter hook output priority filter; policy accept;
ct state established,related accept
meta skuid 0 accept
meta skuid @knocknoc_egress_users ip daddr 10.0.0.0/24 accept
ip daddr 10.0.0.0/24 reject with icmpx admin-prohibited
}
}
To declare the set yourself instead, use set knocknoc_egress_users { typeof meta skuid; flags timeout; }.
Check the Knoc Names the Set
Open the knoc in Knocknoc and check Users set names the set's family, table and name exactly. The field lists the sets of uids with timeouts the agent found. Validate integration checks the set and that a rule matches it.