EGR001 - Egress Firewall Command Not Available
Agent error code #EGR001 indicates that the agent could not run the command for the firewall that enforces egress allowlisting on its host: nft for nftables, iptables for iptables, or pfctl for pf. The agent applies and revokes every grant by running that command, so without it nothing can change.
Windows has no such command. The agent changes Windows Firewall rules through Windows' own interface, so a Windows agent never reports this code.
The agent reports this when the command does not exist or will not start. It is raised by Validate integration and by the capability check the agent runs when it registers, which is why an egress firewall can be unavailable for an agent in the knoc form.
Common causes include:
- The firewall's userspace tools are not installed on the agent host
- The command is installed outside the
PATHthe agent process was started with - The agent runs in a minimal container image that omits the tools
- The knoc names a firewall this host does not run, such as iptables on a host with only nftables
Steps to Resolve
Install the Firewall's Tools
| Firewall | Debian or Ubuntu | RHEL, Rocky or Alma |
|---|---|---|
| nftables | sudo apt install nftables |
sudo dnf install nftables |
| iptables | sudo apt install iptables |
sudo dnf install iptables |
nftables egress needs nft 0.9.4 or later (nft --version). pf is part of OpenBSD's base system, so pfctl is always present there.
Check the Agent's PATH
The agent finds the command on the PATH it inherited from the service manager, not the one in your login shell.
- Find the binary:
command -v nft,command -v iptablesorcommand -v pfctl - If it sits in a directory the service
PATHdoes not include, add the directory in the unit file or symlink the binary into one that is already there - Restart the agent:
sudo systemctl restart knocknoc-agent(on OpenBSD,doas rcctl restart knocknoc_agent)