Configuration
Hosting Agent configuration
Purpose
Render the Hosting Agent YAML and loader environment so the unprivileged Agent can collect where you grant paths, and so the privileged loader can attach pass-only programs.
Audience
Operators installing or changing zwall-hosting-agent.service / zwall-hosting-agent-v2.service and zwall-hosting-ebpf-loader.service.
Edition
ENTERPRISE_ONLY.
Status
SUPPORTED as keys present in configs/agent.hosting-plesk-observe-v2.example.yml and the shipped units. Production file ACLs are operator-owned.
Prerequisites
- Admitted Hosting artifacts:
zwall-agent,zwall-hosting-ebpf-loader,hosting_observe.o - SHA-256 of the object file for
ZWALL_HOSTING_EBPF_SHA256 - Physical interface names eligible for observation
- Manager URL the Agent will use (example file uses
https://manager.example.invalid:9443— that host and port are examples, not a second canonical Manager port)
Required permissions
Root to write /etc/zwall-hosting/ and to manage units. Runtime Agent user zwall-hosting must be able to read each log path you expect to leave permission_blocked.
Dependencies
- Manager reachable with
server.verify_tls: true - Loader unit before the v2 Agent (
Before=zwall-hosting-agent-v2.serviceon the loader; v2 AgentAfter=the loader) - UNIX socket directory
/run/zwall-hosting-ebpf(unitRuntimeDirectory)
Configuration files
Scroll sideways to see the full table. Use the arrow keys when focused.
| File | Used by |
|---|---|
/etc/zwall-hosting/agent.yml | zwall-hosting-agent.service |
/etc/zwall-hosting/agent-v2.yml | zwall-hosting-agent-v2.service |
/etc/zwall-hosting/hosting-ebpf.env | loader EnvironmentFile |
Use the filename the installed unit names in ExecStart. Do not mix Virtualization /etc/zcs/agent.yml on this node.
Example source: configs/agent.hosting-plesk-observe-v2.example.yml.
Agent unit environment
Both Hosting Agent units set:
Scroll sideways to see the full table. Use the arrow keys when focused.
| Variable | Value |
|---|---|
ZWALL_AGENT_INSTANCE_LOCK | /run/zwall-hosting-agent/agent.lock |
ZWALL_AGENT_STATE_DIR | /var/lib/zwall-hosting |
HOME | /var/lib/zwall-hosting |
ZWALL_AGENT_CREDENTIAL_PATH | /var/lib/zwall-hosting/agent.identity |
v1 ExecStart: /opt/zwall-hosting/bin/zwall-agent --config /etc/zwall-hosting/agent.yml
v2 ExecStart: /opt/zwall-hosting/bin/zwall-agent --config /etc/zwall-hosting/agent-v2.yml
Loader environment
/etc/zwall-hosting/hosting-ebpf.env must supply:
Scroll sideways to see the full table. Use the arrow keys when focused.
| Variable | Purpose |
|---|---|
ZWALL_HOSTING_EBPF_SHA256 | digest of hosting_observe.o |
ZWALL_HOSTING_INTERFACES | comma-separated eligible physical interfaces |
Loader flags from the unit:
/opt/zwall-hosting/bin/zwall-hosting-ebpf-loader \
--object /opt/zwall-hosting/ebpf/hosting_observe.o \
--sha256 ${ZWALL_HOSTING_EBPF_SHA256} \
--interfaces ${ZWALL_HOSTING_INTERFACES} \
--run-user zwall-hosting \
--run-group zwall-hostingDefault socket if not overridden: /run/zwall-hosting-ebpf/observer.sock. ExecStop is --detach.
Required Hosting keys
When hosting.enabled: true, validation requires:
Scroll sideways to see the full table. Use the arrow keys when focused.
| Key | Required value |
|---|---|
agent.protection_model | hosting |
hosting.platform | plesk |
hosting.profile_version | hosting-plesk-observe-v1 or hosting-plesk-observe-v2 |
hosting.audit_only | true |
hosting.log_only | true |
hosting.enforcement | false |
hosting.checkpoint_path | /var/lib/zwall-hosting/hosting-checkpoints.json |
agent.operating_mode | host (edge is rejected) |
The profile rejects enforcement-capable Agent features: SMTP proxy, GeoIP, local detection, virtualization integration, UID/GID filtering, port-scan/MAC/DHCP rules, and metrics.enabled (Hosting exposes no metrics listener).
Selected example keys:
Scroll sideways to see the full table. Use the arrow keys when focused.
| Key | Example | Sensitive |
|---|---|---|
server.manager_url | https://manager.example.invalid:9443 | no |
server.verify_tls | true | no |
server.heartbeat_interval | 30s | no |
server.token | omit / empty | yes — use AGENT_TOKEN / AGENT_PRE_TOKEN once |
hosting.enabled | true | no |
hosting.poll_interval | 2s | no |
hosting.network.socket_path | /run/zwall-hosting-ebpf/observer.sock | no |
hosting.network.enabled | true | no |
hosting.sources[].id / path / state | see Signal classes | no |
hosting.certificates[].address | 127.0.0.1:8443 | no |
hosting.network is how the Agent polls the loader. It is not an XDP attach API.
hosting.sources[]
Scroll sideways to see the full table. Use the arrow keys when focused.
| Field | Meaning |
|---|---|
id | parser id (server-owned) |
path | exact file on this host |
state | example: permission_blocked, source_not_present |
reason | example: permission_denied, not_present |
Do not copy example log paths as if every OS used them.
Bootstrap token
Set AGENT_TOKEN or AGENT_PRE_TOKEN in the environment for one-time registration. The Hosting-enabled Agent unsets both from the process environment after config load. Persist identity at ZWALL_AGENT_CREDENTIAL_PATH. Do not keep steady-state JWTs in YAML.
Procedure
- Copy the v2 example to the path the unit will read.
- Set
server.manager_urlto your Manager (typicallyhttps://manager.example.com:8443). Keepverify_tls: true. - Keep enforcement flags false. Keep
protection_model: hosting. - Edit
hosting.sources[]paths to files that exist on this host. Leavestate: permission_blockeduntil ACLs exist. - Write
hosting-ebpf.envwith the object digest and interfaces. - Grant exact-path read to
zwall-hostingfor collectors you expect to be active. Do notchmod 777 /var/log. - Enable loader, then Agent. Restart the Agent after YAML changes.
SIGHUP reload exists on the generic Agent binary; Hosting-specific live-reload of every key is not a certified contract. Prefer systemctl restart of the Hosting Agent unit after config changes. Restarting the loader detaches via --detach then re-attaches.
Verification
See Validation. Minimum:
systemctl is-active zwall-hosting-ebpf-loader
systemctl is-active zwall-hosting-agent # or zwall-hosting-agent-v2GET /api/v1/agents/:id/hosting/status as admin.
Expected result
Loader owns pass-only programs. Agent runs as zwall-hosting with no capabilities. Collectors you ACL’d leave permission_blocked. Network socket exists. Heartbeat is observation-only.
Failure modes
Scroll sideways to see the full table. Use the arrow keys when focused.
| Symptom | Cause | Action |
|---|---|---|
| Agent fatals “must be run as root” | hosting.enabled false | you started the Virtualization profile |
Config validation error enforcement=false | enforcement/audit/log_only flags | restore fail-closed values |
protection_model error | copied hybrid | set hosting (the hybrid example is for a different profile) |
| Loader fails SHA-256 | env digest ≠ object | recompute ZWALL_HOSTING_EBPF_SHA256 |
| Socket missing | loader down | start loader first |
Sources stay permission_blocked | no ACL | grant exact-path read |
Troubleshooting
Security considerations
- Empty Agent capabilities. Do not add
CAP_NET_ADMINto the Agent to “fix” observation. - Never join a customer-content group.
MemoryDenyWriteExecute=trueon the Agent units; loader has a reduced syscall filter includingbpf.- Tokens live in
/var/lib/zwall-hosting/agent.identity, not YAML.
Limitations
- No shipped universal ACL.
protection_modelvs Hosting profile identity is a known profile-identity mismatch — do not copy Virtualizationhybrid.- Edge mode is rejected on this profile.
- UID/GID filtering is disabled and rejected when Hosting is enabled.
- Example Manager URL port
9443is not a product-wide Manager port.