Documentation
Docs Home › Virtualization Agent › Configuration

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.o and firewall_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.

KeyExampleNotes
server.manager_urlhttps://manager.example.com:8443required
server.manager_urlsfailover listtakes priority when non-empty; not a public HA product
server.token""one-time; prefer AGENT_TOKEN
server.verify_tlstruekeep true
server.allow_insecure_remote_tlsfalsebreak-glass
server.heartbeat_interval30s

agent

Scroll sideways to see the full table. Use the arrow keys when focused.

KeyExampleNotes
agent.hostnamehost-01
agent.interfaces[]empty = validated default-route/bridge-uplink set, not all NICs
agent.vm_bridge_nameviifbr0example bridge name, not a product-wide required name
agent.log_level / log_fileinfo / /var/log/zcs/firewall-agent.log
agent.protection_modelexample hybridallowed 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_modehostedge is not a public certified product

ebpf

Scroll sideways to see the full table. Use the arrow keys when focused.

KeyExampleNotes
ebpf.program_path/opt/zcs/ebpf/firewall.oXDP ingress
ebpf.tc_program_path/opt/zcs/ebpf/firewall_egress.oTC egress
ebpf.section_namexdp
ebpf.xdp_attach_modeautoauto | native | generic | offload (auto tries native then generic)
ebpf.enable_pinned_mapstruepersist maps across Agent restarts
ebpf.min_kernel_version5.8.0with strict_kernel_version_check: true
ebpf.verify_artifact_integritytruekeep on
ebpf.allow_unsigned_artifactsfalsebreak-glass
ebpf.checksums_manifest_path/opt/zcs/ebpf/ebpf_checksums.txt
ebpf.enable_uid_gid_filteringtrue in exampledo 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.osame caveat
ebpf.ttl_sweep_interval60stemporary IP blocks
ebpf.event_channel_capacity25000ring-buffer consumer

virtualization

Scroll sideways to see the full table. Use the arrow keys when focused.

KeyExample
virtualization.enabledtrue on a KVM host you want inventoried (example file defaults false — enable it)
virtualization.platformkvm
virtualization.libvirt.uriqemu:///system typical
virtualization.libvirt.read_onlyfalse in example (discovery can use read-only)
virtualization.discovery.interval30s

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

  1. Copy configs/agent.example.yml to /etc/zcs/agent.yml.
  2. Set server.manager_url, agent.hostname, verify_tls: true.
  3. Set agent.protection_model: virtualization unless you have a written exception for the example hybrid value.
  4. Keep operating_mode: host.
  5. Confirm eBPF object paths and verify_artifact_integrity: true.
  6. Enable virtualization.enabled and libvirt.uri: qemu:///system for KVM inventory.
  7. If you need a supported policy contract, set enable_uid_gid_filtering: false until a stable customer contract is published.
  8. Enroll, then systemctl enable --now zwall-agent.
  9. 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.

SymptomCauseAction
Immediate exitnot root; kernel preflight; bad YAMLjournal; min_kernel_version
Config vs Hostingcopied hosting YAMLuse virt example
UID/GID surprisesexample enables incomplete ABIdisable enable_uid_gid_filtering
Edge keys setoperating_mode: edgerevert to host

Troubleshooting

Troubleshooting.

Security considerations

  • Keep verify_tls: true and allow_unsigned_artifacts: false.
  • Bootstrap token in environment, persist locally, do not leave JWTs in YAML.
  • allow_insecure_remote_tls is 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.