Implement fine-grained control inside the LAN (wlan0) for Azazel-Edge, enabling:
- Per-host segmentation (isolate suspicious clients without full lockdown)
- Micro-policies (rate limits, delay, block, redirect per internal IP/MAC)
- Tiered trust zones (trusted, guest, quarantined)
- Dynamic escalation based on threat score and Suricata/OpenCanary events
- Maintain allowlist/denylist of internal hosts (IPs + optional MAC)
- Apply delay/shape/block actions per internal host using existing Action framework
- Extend config (
azazel.yaml) with new sectioninternal_control:
internal_control:
zones:
trusted: { default_action: portal }
guest: { default_action: shield }
quarantined: { default_action: lockdown }
hosts:
# ip_or_cidr: zone
172.16.0.10: trusted
172.16.0.50: guest
escalation:
# score thresholds to move a host between zones
guest_to_quarantine: 60
quarantine_release_score: 30
observation_window_secs: 900- Ingest pipeline records events per internal source IP.
- Scorer updates cumulative host score cache.
- InternalControl module evaluates zone transitions and generates Action plans (block/delay/shape) through existing enforcer.
- Enforcer executes nftables/tc operations using new per-host targets.
azazel_edge/core/network/internal_control.py- Class
InternalControlManagerwith:load_config(cfg: dict)update_host_score(ip: str, score: float)evaluate_transitions()-> list[ActionResult]current_zone(ip: str)
- Maintains in-memory host state with last scores + zone assignments.
- Class
- Extend state machine or add periodic hook in existing daemon loop to call
evaluate_transitions(). - Minimal persistence: start with in-memory; later optional JSON snapshot under
/var/lib/azazel/internal_state.json.
Zone -> action profile:
- trusted: normal / portal (low restriction)
- guest: shield (moderate delay + shaping)
- quarantined: lockdown (block or heavy shaping)
- Host without zone mapping: default to guest.
- Rapid oscillation: use hysteresis via
observation_window_secsand release threshold. - IP churn (DHCP reassignment): optionally flush state if MAC changes.
- MAC-based enforcement sets.
- Lateral movement detection (internal to internal suspicious flows).
- VLAN tagging integration.
- Passive OS fingerprint risk weighting.
- Should quarantine enforce complete block or aggressive shaping first? (Configurable.)
- Persist host historical scores across reboot? (Optional.)
- Add config schema updates (validation).
- Implement module skeleton with zone resolution.
- Integrate with scorer or create a host score aggregator.
- Unit tests for transition logic.
- Hook into main loop (azctl-unified service path).