OPNsense Basic Example
Demonstrates connecting to an existing OPNsense firewall and running Harmony Scores against it.
Prerequisites
- An OPNsense firewall accessible via SSH and REST API
- API key + secret created in OPNsense (System > Access > Users > API keys)
Usage
# Set credentials (or use env.sh)
export OPNSENSE_API_KEY=your_key
export OPNSENSE_API_SECRET=your_secret
# Run against a specific OPNsense host
cargo run -p example-opnsense -- 192.168.1.1
Scores applied
| Score | What it configures |
|---|---|
DhcpScore |
DHCP range and static host bindings via dnsmasq |
For automated VM-based testing
See examples/opnsense_vm_integration/ which boots a fresh OPNsense VM via KVM, runs 11 Scores, and verifies idempotency automatically.