EGR063 - iptables Chain Holds Another Knoc's Rules
Uploading.Agent error code #EGR063 indicates that the iptables chain an egress knoc names holds rules another knoc wrote. On iptables each knoc owns its chain, and every grant replaces the whole chain with that knoc's rules. Writing it would delete the other knoc's grants and rejects, so the agent refuses the grant instead.
A revoke still works: the agent deletes only the revoked account's rules and leaves the other knoc's.
The agent tells the knocs apart by the comment on each rule, knocknoc:<knoc id>:.... Rules with no such comment are not another knoc's, and the next write replaces them.
Common causes include:
Steps to Resolve
Find the Other Knoc
List the chain and read the knoc id in each comment:
sudo iptables -S KNOCKNOC_EGRESS_1
Each id is the knoc's id in Knocknoc. Search for it on the Knocs page.
Give Each Knoc Its Own Chain
Pick another chain for one of the knocs. knocker enable egress makes three, KNOCKNOC_EGRESS_1 to _3, and you can declare more in your ruleset.
Remove Rules Left Behind
If the id belongs to no knoc, delete its rules. For each line sudo iptables -S KNOCKNOC_EGRESS_1 prints with that id, run sudo iptables -D KNOCKNOC_EGRESS_1 followed by the rest of the line. The agent writes the chain again within about 10 seconds. Also check OUTPUT for a jump commented with the same id: sudo iptables -S OUTPUT.
Do the same in ip6tables when the chain is in the IPv6 filter table.