feat: v2.0.0 — UFW backup, rollback, lock, rotation, cross-distro support
- Backup/restore UFW configuration alongside iptables rules - Backup sysctl.conf before any modifications (preserves original) - Auto-backup before every add, delete, flush operation - Rollback partially applied rules on iptables errors - Save and restore UFW DEFAULT_FORWARD_POLICY on flush/delete - Rotate backups (max 20) and logs (max 1 MB) automatically - Lock file to prevent concurrent script execution - Port conflict detection warns when port is already in use - Support 'both' protocol (TCP+UDP simultaneously) - Cross-distro package manager detection (apt, dnf, yum, pacman) - Strict IPv6 validation via python3/perl with safe fallback - Replace deprecated -m state with -m conntrack --ctstate - Trap EXIT/INT/TERM for clean shutdown - Add 'update' command to self-update from repository - Add 'uninstall' command with full cleanup and config restoration - Persist rules cross-distro (netfilter-persistent, iptables-services, manual) - Extract _apply_rule_core to eliminate rule-application duplication - Show UFW and backup count in status, mark UFW backups in restore list
This commit is contained in: