Configuration
Virtualization Agent configuration
Purpose
Configure an enforcement-capable Agent on a KVM/libvirt host so it can register with the Manager, attach XDP/TC firewall programs, and synchronize rules.
Audience
Operators of hypervisor nodes. This is not the Hosting observation profile.
Edition
SHARED runtime. Enterprise unit paths: /opt/zcs/bin/zwall-agent --config /etc/zcs/agent.yml. Community: built bin/agent and typically /etc/zcs/agent.yml. Path prefixes are not unified with Hosting or Manager.
Status
SUPPORTED for keys in configs/agent.example.yml with the qualifiers in this file. UID/GID filtering is implemented with an incomplete ABI. Edge mode is not a public certified product. protection_model: hybrid is an example that can mislead.
Prerequisites
- Root on the hypervisor (non-Hosting Agent fatals if
geteuid != 0) - Manager URL with
server.verify_tls: true - eBPF objects
firewall.oandfirewall_egress.o - KVM/libvirt if you need VM inventory
Required permissions
Root to run zwall-agent.service. Admin on the Manager to pre-register and assign rules.
Dependencies
Linux eBPF/XDP/TC. Example ebpf.min_kernel_version: "5.8.0" with strict_kernel_version_check: true. Community README also mentions 4.15+ / 5.4+. This package does not certify a single matrix.
Configuration
File (Enterprise unit): /etc/zcs/agent.yml
Example: configs/agent.example.yml
Agent flags: -config (default configs/agent.yml), -version, -build-info-json, -verbose, -debug, -log-file, plus Hosting-only preflight flags that you should not use as a Virtualization workflow.
server
Scroll sideways to see the full table. Use the arrow keys when focused.
| Key | Example | Notes |
|---|---|---|
server.manager_url | https://manager.example.com:8443 | required |
server.manager_urls | failover list | takes priority when non-empty; not a public HA product |
server.token | "" | one-time; prefer AGENT_TOKEN |
server.verify_tls | true | keep true |
server.allow_insecure_remote_tls | false | break-glass |
server.heartbeat_interval | 30s |
agent
Scroll sideways to see the full table. Use the arrow keys when focused.
| Key | Example | Notes |
|---|---|---|
agent.hostname | host-01 | |
agent.interfaces | [] | empty = validated default-route/bridge-uplink set, not all NICs |
agent.vm_bridge_name | viifbr0 | example bridge name, not a product-wide required name |
agent.log_level / log_file | info / /var/log/zcs/firewall-agent.log | |
agent.protection_model | example hybrid | allowed virtualization | hosting | hybrid. For this profile use virtualization unless engineering has directed otherwise. Do not copy hybrid onto a Hosting node (the hybrid example misleads vs Hosting identity). |
agent.operating_mode | host | edge is not a public certified product |
ebpf
Scroll sideways to see the full table. Use the arrow keys when focused.
| Key | Example | Notes |
|---|---|---|
ebpf.program_path | /opt/zcs/ebpf/firewall.o | XDP ingress |
ebpf.tc_program_path | /opt/zcs/ebpf/firewall_egress.o | TC egress |
ebpf.section_name | xdp | |
ebpf.xdp_attach_mode | auto | auto | native | generic | offload (auto tries native then generic) |
ebpf.enable_pinned_maps | true | persist maps across Agent restarts |
ebpf.min_kernel_version | 5.8.0 | with strict_kernel_version_check: true |
ebpf.verify_artifact_integrity | true | keep on |
ebpf.allow_unsigned_artifacts | false | break-glass |
ebpf.checksums_manifest_path | /opt/zcs/ebpf/ebpf_checksums.txt | |
ebpf.enable_uid_gid_filtering | true in example | do not treat as a stable customer contract; leave disabled if you need a supported ABI |
ebpf.cgroup_program_path | /opt/zcs/ebpf/uid_gid_filter_v3.o | same caveat |
ebpf.ttl_sweep_interval | 60s | temporary IP blocks |
ebpf.event_channel_capacity | 25000 | ring-buffer consumer |
virtualization
Scroll sideways to see the full table. Use the arrow keys when focused.
| Key | Example |
|---|---|
virtualization.enabled | true on a KVM host you want inventoried (example file defaults false — enable it) |
virtualization.platform | kvm |
virtualization.libvirt.uri | qemu:///system typical |
virtualization.libvirt.read_only | false in example (discovery can use read-only) |
virtualization.discovery.interval | 30s |
Other hypervisor strings in comments (proxmox, xen) are future notes, not shipping integrations.
rules / detection
rules.block_bpdu, mac_spoofing, port_scan, dhcp_guard as in the example. Port-scan control_source_allowlist is a reserved control-path bypass of local tracker mitigation only; explicit blocks still apply.
detection.* feature flags default false; shadow_mode: true. Warning: example detection.profiles is a YAML list while Go tags expect a map — do not document the example list as a guaranteed load.
What to leave off this node
Do not enable hosting.enabled. Do not point this unit at /etc/zwall-hosting/agent.yml. Do not use Hosting loader units as an enforcement path.
Optional Agent metrics bind 127.0.0.1:9090 when enabled; example Hosting profile forbids Agent metrics entirely. On Virtualization they stay disabled unless you explicitly enable them.
Procedure
- Copy
configs/agent.example.ymlto/etc/zcs/agent.yml. - Set
server.manager_url,agent.hostname,verify_tls: true. - Set
agent.protection_model: virtualizationunless you have a written exception for the examplehybridvalue. - Keep
operating_mode: host. - Confirm eBPF object paths and
verify_artifact_integrity: true. - Enable
virtualization.enabledandlibvirt.uri: qemu:///systemfor KVM inventory. - If you need a supported policy contract, set
enable_uid_gid_filtering: falseuntil a stable customer contract is published. - Enroll, then
systemctl enable --now zwall-agent. - Restart the unit after YAML changes. SIGHUP may apply some live-safe fields and reject others with
restart_required— do not treat SIGHUP as a complete live-reload.
Verification
See Verification.
Expected result
Root Agent online in the Manager, XDP/TC objects loaded from /opt/zcs/ebpf/, libvirt inventory when enabled, rules assignable (unlike Hosting).
Failure modes
Scroll sideways to see the full table. Use the arrow keys when focused.
| Symptom | Cause | Action |
|---|---|---|
| Immediate exit | not root; kernel preflight; bad YAML | journal; min_kernel_version |
| Config vs Hosting | copied hosting YAML | use virt example |
| UID/GID surprises | example enables incomplete ABI | disable enable_uid_gid_filtering |
| Edge keys set | operating_mode: edge | revert to host |
Troubleshooting
Security considerations
- Keep
verify_tls: trueandallow_unsigned_artifacts: false. - Bootstrap token in environment, persist locally, do not leave JWTs in YAML.
allow_insecure_remote_tlsis break-glass only.
Limitations
- kernel matrix unresolved.
- UID/GID not a customer contract.
- hybrid example may mislead.
- edge mode not certified.
- detection profiles list vs map.