8 Commits

Author SHA1 Message Date
Ilia Ross
44ff20e5c6 Fix to perltidy new nftables module to convert spaces to tabs
Some checks failed
webmin.dev: webmin/webmin / build (push) Has been cancelled
2026-05-03 22:36:31 +02:00
Ilia Ross
eb4fafc504 Add missing comments 2026-05-03 17:17:40 +02:00
Ilia Ross
0c8f74597b Add proper ACLs to nftables module
[no-build]
2026-05-03 16:44:26 +02:00
Ilia Ross
2fe57dd456 Fix to validate nftables set usage in rules
* Note: Prevent incompatible nftables sets from being used in rule fields. The rule editor now only offers address sets for address matches and port/service sets for port matches, while save and apply paths validate existing set references before writing or loading rules. This avoids nft datatype mismatch errors such as using inet_proto sets with tcp dport.
2026-05-03 00:44:54 +02:00
Ilia Ross
3c9d53109b Fix to rework nftables management around saved tables
Rework the nftables module so Webmin manages its saved nftables configuration as the source of truth instead of directly editing the live ruleset. Add an active ruleset view for inspecting live tables and importing copies into Webmin-managed config if needed, track managed and imported tables with metadata, and prevent externally managed tables from being overwritten during apply.

Co-authored-by: Copilot <copilot@github.com>
2026-05-02 19:02:37 +02:00
Ilia Ross
7f2b4b00aa Fix to scope direct-mode changes to selected tables
Fix nftables direct-mode operations so create, edit, delete, and move actions apply only the selected table instead of rewriting or applying the full ruleset. This avoids copying firewalld-owned rules, or any other externally managed rules, into Webmin’s save file and prevents operations from failing against externally managed tables. Also remove previously added unsafe full-ruleset flush action and keep Apply Configuration out of direct mode (will be further reworked).
2026-05-02 17:08:35 +02:00
Ilia Ross
1d67452a00 Fix to factor out command check 2026-05-02 00:34:15 +02:00
Ilia Ross
4f3e993ae6 Merge swelljoe/nftables as new nftables module
Import https://github.com/swelljoe/nftables into the Webmin tree under nftables/ while preserving upstream history.
2026-04-17 15:19:20 +02:00