When Beezifi blocks a request, it can also block that IP address in the operating-system firewall of your servers. A small agent on each server receives those blocks and applies them โ to UFW on Linux or to Windows Defender Firewall on Windows. Installing an agent is optional; the decision API works without one.
ufw. Node.js 22+. Installs the beezifi-ufw-tool systemd service.BeezifiFirewallAgent Windows service.SHA-256 checksums are listed under each download and in SHA256SUMS. The installer downloads the package itself; you only need the installer.
/api/v1/check for a request.BLOCK to your app.10.x, 192.168.x, 127.0.0.1, fe80::/10) are never sent, so you can't lock out your own network.https://web-01.example.com:4001
โ see Network access), and the API key whose blocks should be pushed to it. When you save,
the dashboard shows the server's agent secret (bza_โฆ) once, together with ready-to-paste
install commands for Linux and Windows. Copy it now โ it is stored encrypted and can't be shown again (you can
generate a new one at any time).
As root (or with sudo):
curl -fsSL https://your-beezifi-host/downloads/install-ufw-tool.sh -o install-ufw-tool.sh chmod +x install-ufw-tool.sh sudo ./install-ufw-tool.sh --host https://your-beezifi-host --agent-secret bza_your_agent_secret
The installer checks for Node.js 22+ and ufw, then:
beezifi-agent with no login shell;/opt/beezifi-ufw-tool (owned by root, read-only to the service) with its secret in .env (readable only by root and the service user);ufw as root;beezifi-ufw-tool systemd service (starts on boot, restarts on failure).sudo ufw allow OpenSSH && sudo ufw enable. Allow SSH before enabling, or you can lock yourself out.| Option | What it does |
|---|---|
--host <url> | Your Beezifi address (required). |
--agent-secret <bza_โฆ> | The server's agent secret. Prompted for if omitted. |
--port <n> | Listening port (default 4001). |
--bind <addr> | Listening address (default 127.0.0.1). Anything else requires TLS. |
--ssl-cert, --ssl-key | Certificate chain and private key (e.g. Let's Encrypt fullchain.pem / privkey.pem). |
--allow-from <ip,ip> | Adds a UFW rule allowing the agent port only from these addresses (the platform's). |
--allow-rules | Also let the platform add allow rules. Off by default. |
--pm2, --no-run | Run under pm2 instead of systemd (non-root installs) / install without starting. |
In PowerShell run as Administrator:
Invoke-WebRequest -UseBasicParsing https://your-beezifi-host/downloads/install-windows-firewall-tool.ps1 -OutFile install-windows-firewall-tool.ps1 .\install-windows-firewall-tool.ps1 -PlatformUrl https://your-beezifi-host -AgentSecret bza_your_agent_secret
If script execution is blocked, run Set-ExecutionPolicy -Scope Process Bypass in that window first. The installer checks for Node.js 22+ (winget install OpenJS.NodeJS.LTS), then:
C:\Program Files\Beezifi\WindowsFirewallTool with its secret in .env (readable only by SYSTEM and Administrators);BeezifiFirewallAgent service (automatic start, restart on failure, rotating logs).| Parameter | What it does |
|---|---|
-PlatformUrl <url> | Your Beezifi address (required). |
-AgentSecret <bza_โฆ> | The server's agent secret. Prompted for if omitted. |
-Port <n> | Listening port (default 4001). |
-BindHost <addr> | Listening address (default 127.0.0.1). Anything else requires a certificate. |
-PfxPath, -PfxPassphrase | Certificate as a PFX/P12 file (e.g. from win-acme). |
-AllowFrom <ip>,<ip> | Adds an inbound rule allowing the agent port only from these addresses. |
-AllowRules | Also let the platform add allow rules. Off by default. |
-InstallDir, -NoStart | Different install folder / install without starting. |
Re-running an installer upgrades the agent in place and keeps its .env. Options you don't pass are reset to their defaults, so repeat the ones you used (port, address, certificate).
The platform connects to the agent over HTTPS. By default the agent listens on 127.0.0.1 only,
which the platform can't reach, and it refuses to listen on the network without TLS. Choose one setup:
Listen on all interfaces with a certificate and allow the port only from the platform. Target URL:
https://<server-name>:4001.
Keep the agent on 127.0.0.1:4001 and publish it through nginx, Caddy or IIS with TLS, restricted to the
platform's addresses. Target URL: your proxy's HTTPS URL.
sudo certbot certonly --standalone -d web-01.example.com sudo ./install-ufw-tool.sh --host https://your-beezifi-host --agent-secret bza_your_agent_secret \ --bind 0.0.0.0 \ --ssl-cert /etc/letsencrypt/live/web-01.example.com/fullchain.pem \ --ssl-key /etc/letsencrypt/live/web-01.example.com/privkey.pem \ --allow-from PLATFORM_IP
systemd passes the root-only key to the service. When certbot is installed, the installer also adds a renewal hook that restarts the agent after each certificate renewal.
.\install-windows-firewall-tool.ps1 -PlatformUrl https://your-beezifi-host -AgentSecret bza_your_agent_secret ` -BindHost 0.0.0.0 -PfxPath C:\certs\web-01.pfx -PfxPassphrase 'pfx-password' -AllowFrom PLATFORM_IP
PLATFORM_IP with the address(es) the Beezifi platform connects from โ your Beezifi contact can confirm them. If a cloud security group or network firewall sits in front of the server, open the port there too, for the same addresses only.systemctl status beezifi-ufw-tool (Linux) or Get-Service BeezifiFirewallAgent (Windows).192.0.2.10. The rule appears in the list and on the server
(sudo ufw status or Get-NetFirewallRule -Group 'Beezifi Security'). Delete it again from the dashboard.The agent adds deny/block rules. It refuses allow rules unless you installed with --allow-rules / -AllowRules, so it can't open a port.
Linux: rules are tagged beezifi: and only those can be deleted. Windows: rules live in the Beezifi Security group, and nothing outside it is ever listed or deleted.
Each server has its own random secret, stored by Beezifi only encrypted (AES-256-GCM). It is unrelated to your API keys, so rotating a key never breaks the firewall link.
The agent will not listen beyond 127.0.0.1 without a certificate, so the secret never crosses the network in plain text.
Runs as beezifi-agent; the only command it may run as root is ufw. Commands are run without a shell and every field is validated.
Runs as LocalSystem, which Windows requires to change firewall rules. Input reaches PowerShell only as data, never as script text, and catch-all sources (0.0.0.0/0) are refused.
| Task | Linux | Windows |
|---|---|---|
| Status | systemctl status beezifi-ufw-tool | Get-Service BeezifiFirewallAgent |
| Logs | journalctl -u beezifi-ufw-tool -f | โฆ\WindowsFirewallTool\BeezifiFirewallAgent.out.log / .err.log |
Restart (after editing .env) | sudo systemctl restart beezifi-ufw-tool | Restart-Service BeezifiFirewallAgent |
| See the agent's rules | sudo ufw status numbered | grep beezifi: | Get-NetFirewallRule -Group 'Beezifi Security' |
| Rotate the secret | Dashboard โ Firewall โ select server โ Regenerate Agent Secret, then set BEEZIFI_AGENT_SECRETS in .env and restart. To avoid any gap, list the old and new secrets comma-separated until the new one is in use. | |
| Upgrade | Re-run the installer | Re-run the installer |
| Uninstall | sudo /opt/beezifi-ufw-tool/uninstall.sh --remove-rules | & 'C:\Program Files\Beezifi\WindowsFirewallTool\uninstall.ps1' -RemoveRules |
Without --remove-rules / -RemoveRules, the blocks the agent added stay in place after it's removed. Your own firewall rules are never touched either way.
| Symptom | Cause and fix |
|---|---|
| Dashboard: "connect ECONNREFUSED" or timeout | The platform can't reach the agent. Check the target URL, that the agent listens on the network with TLS (or behind your proxy), and that the port is open to the platform's addresses in UFW / Windows Firewall and any cloud firewall. |
| Dashboard: "Unauthorized" | The secret on the server doesn't match. Regenerate it in the dashboard, update BEEZIFI_AGENT_SECRETS in .env, restart the service. |
| Dashboard: "does not permit allow rules" | Expected: the agent is deny-only. Reinstall with --allow-rules / -AllowRules only if you need allow rules. |
| Linux: rules list is empty but rules were added | UFW is inactive. Run sudo ufw allow OpenSSH && sudo ufw enable. |
| Linux: "sudo: a password is required" | The sudoers entry is missing (installed without root?). Re-run the installer with sudo. |
| Service won't start: "without TLS" | It's set to listen beyond loopback without a certificate. Add the certificate options or bind to 127.0.0.1. |
| Windows: "running scripts is disabled" | Run Set-ExecutionPolicy -Scope Process Bypass in the same PowerShell window, then the installer again. |
| Blocks don't arrive automatically | Check the server is linked to the API key that made the decision (Edit Target), and that the blocked IP is public โ private addresses are never pushed. |
Agent API details, rule formats and integration examples are in the developer documentation.