EGR006 - Kernel Cannot Match the Account
Agent error code #EGR006 indicates that iptables on the agent host cannot match traffic on the account that sent it. Egress allowlisting on iptables writes one rule per granted account, using the owner match (-m owner --uid-owner) to name the account, the time match (-m time --datestop) to end the grant on time and the comment match (-m comment) to mark the rule as the agent's. Without any one of them, no grant can be written.
The agent reports this when iptables-restore refuses a rule with "Couldn't load match", and Validate integration checks for it before anything is written.
Common causes include:
- The
xt_owner,xt_timeorxt_commentkernel module is not available, as in some minimal or custom-built kernels - Module loading is disabled (
kernel.modules_disabled=1) and the modules were not loaded before it was set - The host runs in a container whose kernel does not offer the modules
Steps to Resolve
Load the Modules
sudo modprobe xt_owner
sudo modprobe xt_time
sudo modprobe xt_comment
To load them at every boot, list all three in /etc/modules-load.d/knocknoc-egress.conf, one per line.
Check the Matches Work
sudo iptables -w -C KNOCKNOC_PROBE -m owner --uid-owner 1000 -m time --datestop 2038-01-19T00:00:00 -m comment --comment knocknoc:probe -j RETURN
"Bad rule" or "No chain" means every match loaded and the check got as far as the missing chain, which is the expected answer. "Couldn't load match" names the one that is missing.
Use nftables Instead
If the kernel cannot offer the modules, run egress on nftables. Install nftables 0.9.4 or later, run knocker enable egress, which sets nftables up beside iptables, and move the knoc to the nftables firewall. nftables matches the account itself and needs none of the modules. On nftables your own rules match a set of uids that the agent fills, as the nftables egress guide describes.