Overview
The WCF Agent is a Docker container that runs in your network. On each cycle it:- Reads its configuration from the OneFirewall console.
- Downloads the list of IPv4 addresses to block.
- Writes the list to a file, and runs a command that sends it to your device.
- Reports the result to the console.
wcf-agent:v4 image. For host sizing and Docker setup, see WCF Installation.
You need an agent only if your device cannot download a feed itself. If it can, as FortiGate, Palo Alto, and pfSense can, connect it directly to OneFirewall.
How It Works
The container starts withinit.sh. This script starts the HTTP feed server, then repeats this cycle:
A run is stopped if it takes more than one hour. The wait starts when the run ends, so the time between reports is the run time plus
sync_time.
What the List Contains
- Addresses: IPv4 only. OneFirewall selects the addresses at or above
score_threshold, and applies your organization’s manual blocks, unblocks, and blocking rules. - Order: your manual blocks come first, then the highest scores. If
maximum_rulescuts the list, the lowest scores are removed first. - Networks: the agent replaces each network with its individual addresses. For
/30and larger networks, it leaves out the network and broadcast addresses. For example,198.51.100.0/29becomes the six addresses from.1to.6. Each address counts towardsmaximum_rules. - Invalid entries: the agent skips lines that are not IPv4 addresses or networks.
sync_time uses more Coins.
Install the Agent
Requirements
- A Linux host with Docker and Docker Compose.
- A OneFirewall token from a user with the Member or Member Admin role. Read Only users cannot download the list or report results. Member Mobile users receive device passwords masked, so the agent cannot sign in to devices.
- These network connections:
This agent does not receive syslog. To send logs to OneFirewall, see Logs & Network Events.
Steps
- In the console, open the page to install a connector. Select your device, score threshold, and sync time.
-
Download the generated
docker-compose.ymlto an empty folder on the host. The file contains your token, so restrict access to it: -
In the
commandsection, changebash -x init.shtobash init.sh. The-xoption writes the token to the container log. -
Start the agent:
- In the console, open Connector Status (also called Agent Status), select the connector, and fill in the device settings. See Integrations.
- After the next cycle, check that the agent works.
Files
The HTTP feed is not stored on the host. If you recreate the container, the feed is not available until the first successful cycle.
Configuration
Connection Settings
The agent reads these settings fromconfig.json:
With the generated Compose file, change these values in its
environment section, because config.json is overwritten when the container starts. Then run docker compose up -d to apply the change.
Console Settings
All other settings come from the connector in the console. If you add them toconfig.json, the agent ignores them.
The JSON examples below show only the integration you need to change. Edit that part of the console configuration, and keep the rest.
Integrations
Activate one integration per agent. Active integrations run at the same time and share one list file, which some scripts delete. The console also keeps only the last result from each agent. To update several devices, use a separate agent, connector, and folder for each one. If they share a host, also give each agent a different host port.HTTP Feed (httpd)
404 status, which many firewalls treat as an error.
The feed has no password and does not use HTTPS. Make it available only on your management network. For example, publish the port on one internal address of the host:
ufw, so test the restriction from another machine.
Check Point SecureXL (checkpoint_securexl)
The user needs permission to run the SecureXL commands. Every script except
install-securexl-list-ip-add-remove.sh also needs write access to /home/ofa/ on the gateway.
Choose the script for your gateway. All the scripts are in artifacts/checkpoint/:
install-securexl-list-ip-add-remove.sh does not turn on SecureXL deny lists, so turn them on first. It compares each list with db/previous_blacklist.txt, and updates that file before it contacts the gateway. If an update fails, the script does not retry those changes. It can also report success after a failure, so check the log.
To check the rules on the gateway, use the commands for your version in Check Point SecureXL.
Sophos (sophos)
address to the Sophos host and API port, without https://. Do not use spaces or shell special characters in user or password. On Sophos, allow API access from the agent host.
The script creates IP host groups named OneFirewallBlackListAutomatic0, OneFirewallBlackListAutomatic1, and so on. Each group has up to 998 addresses. Add the groups to your firewall rules as described in the Sophos guide.
-
Limit: the script sends up to 26 groups, or 25,948 addresses, and ignores the rest. Set
maximum_rulesto25000. - Old groups: if the list gets shorter, groups that are no longer needed keep their old addresses. Clear them, or remove them from your rules.
-
Status: OK does not confirm that Sophos accepted the update. Check the groups in Sophos, and the API responses in the container:
File Copy with SCP (csp)
In the configuration, the key for this integration is csp.
feeds is the path of the file on the destination host. A relative path starts in the user’s home folder. The password cannot contain a single quote or spaces.
Lists with fewer than 95,000 lines are copied as one file. Longer lists are split into files of 94,000 lines: onefirewall.txt, onefirewall-2.txt, and so on. For the split to work, the path must have exactly one dot, before the extension.
If the list is empty, the script copies nothing and reports OK. If the list gets shorter, old numbered files stay on the destination host. Delete them, or they will still be used.
Your Own Command (csv and iptables)
These integrations run command and add blacklist_onefirewall.txt to the end. The console does not create the command key for them, so add it yourself. The agent does not use acl, reload_command, csv_logs, or csv_reload_command.
This example copies the list to onefirewall/db/local/list.txt on the host:
/opt/onefirewall/WCF-Agent-latest. Return 0 for success and another number for failure. If the list is empty, leave the device unchanged and return an error.
iptables does not change firewall rules by itself. The image has no ipset tool or iptables script, and the container cannot change the host’s firewall by default.
Check That the Agent Works
1. Check the log. A successful run includes these lines (here forhttpd):
Length is the number of lines downloaded, before networks are expanded. Punto B in the log is the number of addresses sent to the integration.
2. Check Connector Status. The result and the time of the last report are separate:
3. Check the device. Make sure the rules are there and the number of addresses is what you expect. For the HTTP feed:
If a Download Fails
In the last two cases, the log shows
Invalid status code, but Connector Status can still show OK. Set an alert for that message, and keep enough Coins in your balance.
If init.sh gets no valid response when it reads sync_time, it starts the next cycle without waiting. During an outage, this can cause many requests and log lines.
Operations
Disk Space
The SecureXL scripts, exceptinstall-securexl-noblades.sh, and the SCP script save a copy of the list in onefirewall/db/ each time they run. They do not delete old copies. SCP also saves the parts of split lists. Monitor disk space, and delete old copies regularly. This command deletes copies older than seven days:
docker-compose.yml. Do not delete previous_blacklist.txt: install-securexl-list-ip-add-remove.sh needs it to find addresses to remove.
Security
- Protect logs: the agent writes the full command to the log, including any device password. Limit who can read Docker logs, and do not share logs before you remove passwords and tokens.
- Protect credentials: limit access to
docker-compose.ymlandonefirewall/config/. - Limit who can edit connectors: the agent runs the
commandset in the console. Anyone who can change it can run commands inside the container. - Use a separate account: create a device account only for the agent, with the fewest permissions it needs. Allow it to sign in only from the agent host.
- Isolate the agent: use a dedicated host on a management network. Allow only the connections listed in Requirements.
Troubleshooting
Exit Codes
Codes depend on the script. For your own scripts, use your own codes.Related Pages
- WCF Installation: prepare the host and install Docker.
- Sensor Configuration: set up a connector in the console.
- Configurations: organization and agent settings.
- API reference: the OneFirewall API.

