Knocker - a cli helper
The Knocker utility is a command-line tool for managing various backends or server features with ease. It provides commands for initialising the agent, and for listing, enabling, disabling, deploying and checking the status of supported backends.
Usage (on Agent)
/opt/knocknoc-agent/knocker/knocker <command> [backend] [options...]
On OpenBSD
On OpenBSD the agent ships the same helper as POSIX sh scripts, installed on your PATH at /usr/local/sbin/knocker, so you can run it as knocker <command> [backend] without a full path. The commands are the same as above. The available backends are a subset: pf (the OpenBSD packet filter), plus aws, firepower, panos, and sophos. See OpenBSD Agent Installation.
Commands
- init: Create or update the agent’s configuration.
knocker init [agent-name]
- deploy: Deploy the specified backend on this machine.
knocker deploy <backend>
- help: Show the help message or detailed help for a specific backend.
knocker help <backend>
- list: List all available backends.
knocker list
- status: Check the status of the specified backend.
knocker status <backend>
- enable: Enable the specified backend.
knocker enable <backend>
- disable: Disable the specified backend.
knocker disable <backend>
Available backends
The following backends are currently supported:
- aws: Manage AWS integrations.
- firepower: Manage the Cisco Firepower (FMC) integration.
- haproxy: Manage HAProxy configurations.
- ipset: Manage IPSet configurations.
- junos: Manage Junos SRX dynamic address updates.
- nftables: Manage nftables named sets.
- nginx: Manage Nginx access control.
- panos: Manage the Palo Alto (PAN-OS) integration.
- plesk: Manage Plesk access restrictions.
- proxmox: Manage Proxmox VM firewalls.
- reverseproxy: Manage the Knocknoc reverse proxy.
- sophos: Manage the Sophos (SFOS/XGS) integration.
Examples
# Show help for a specific backend
knocker help aws
# List all available backends
knocker list
# Check the status of the haproxy backend
knocker status haproxy
# Enable the ipset backend
knocker enable ipset
# Show the status of the junos backend
knocker status junos
Notes
For root users, ensure that the knocker script is accessible in your PATH. Consider creating a symlink or wrapper script in /usr/local/sbin if needed.