You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Backward compatibility:**`sudo ./apotropaios.sh menu` and `sudo ./apotropaios.sh` (no arguments) also launch the interactive menu.
71
+
72
+
**Mutual exclusivity:** The `--interactive` flag cannot be combined with CLI commands (e.g., `--interactive add-rule` is an error) or `--non-interactive`.
63
73
64
74
The main menu presents numbered options. Enter the number and press Enter.
65
75
66
76
**Main Menu Options:**
67
77
68
78
1.**Firewall Management** — Select and configure firewall backends. Start, stop, reload, reset firewalls. View current rules and status. Backend-specific configuration submenus.
2.**Rule Management** — Create rules through a 5-step guided wizard with cancel support (type `q`, `quit`, `cancel`, or `back` at any prompt to abort without applying). List, remove, activate, deactivate tracked rules. Import/export rule configurations. Rule expiry watcher.
70
80
3.**Quick Actions** — One-click block-all or allow-all traffic with automatic restore point creation.
71
81
4.**Backup & Recovery** — Create timestamped backups, list available backups, restore from backup, manage immutable snapshots.
In interactive mode, a **background expiry monitor** runs every 30 seconds and automatically deactivates rules when their TTL expires — no manual intervention required. The monitor also writes proactive terminal alerts when a rule is within 10 minutes of expiring, showing the rule ID, description, and time remaining.
395
+
396
+
Additionally, the **main menu displays inline warnings** for near-expiry and expired rules every time it renders, with guidance to extend timers via the Rule Expiry Watcher.
397
+
398
+
In CLI mode, `rule_check_expired` runs once at startup. For ongoing CLI-only use, schedule periodic checks via cron: `*/5 * * * * /usr/local/bin/apotropaios check-expired 2>/dev/null`.
399
+
382
400
### Expiry Watcher
383
401
384
-
The interactive menu includes a **Rule Expiry Watcher** (Rule Management > View rule expiry) that displays:
402
+
The interactive menu includes a **Rule Expiry Watcher** (Rule Management > Rule expiry watcher) that displays:
385
403
386
-
- Color-coded time remaining (green > 50%, yellow > 20%, red < 20%)
404
+
- Color-coded time remaining (green > 30min, yellow < 30min, red < 10min)
405
+
-`** EXPIRING SOON **` alert for rules within 10 minutes
406
+
-`** EXPIRED **` for overdue rules
387
407
- Option to extend TTL on expiring rules
388
-
-Automatic cleanup of expired rules on framework startup
408
+
-Option to process all expired rules immediately
389
409
390
410
---
391
411
@@ -395,15 +415,15 @@ Each firewall backend has a dedicated configuration submenu accessible via **Fir
395
415
396
416
### iptables (7 options)
397
417
398
-
Check/view/save/restore iptables configuration, show table summary, view chain policies.
418
+
Check/view/save/restore iptables configuration, show rules in a selected table (filter/nat/mangle/raw/security), show chain policies across all tables, view full ruleset for all tables.
399
419
400
420
### nftables (5 options)
401
421
402
422
Check/view/save nftables configuration, list tables, list chains.
403
423
404
-
### firewalld (6 options)
424
+
### firewalld (8 options)
405
425
406
-
Show default zone, list all zones, list active zones, list services, list rich rules, compare runtime vs permanent configuration.
426
+
Show default zone, list all zones, list active zones, list services in a selected zone, show rich rules in a selected zone, show full zone configuration, compare runtime vs permanent configuration for a selected zone, change default zone. All zone-specific queries present a dynamic zone selection menu.
0 commit comments