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
{{ message }}
Repository navigation
Commit b5da473
Browse filesBrowse the repository at this point in the historyBrowse files
Document and smoke-test the iptables backend (#23)
The README gets an iptables section (where a rule lands, persisting as its
own step, how the backend is chosen, what nftables now refuses), the demo
and flag lists name it, and three screenshots from --demo=iptables show the
insert before the catch-all and the persist diff.
test/smoke.sh gains an iptables branch: selection and its reason, the
variant, the INPUT count against iptables -S, the placement before the
catch-all, drift reported for a rule added behind the tool's back and
cleared when it goes, and --backend nftables refusing ip filter. It passed
18/18 on the lab's Ubuntu 24.04 guest converted to the cloud-image shape,
and the compat line for iptables 1.8.10 is harvested from that run.
The header's reminder to persist now appears only when the reload shows
drift, and the delete dialog names the port on backends whose destination
column does not carry it.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01MbCfX3T8khyd9hsrN5kMo3
@@ -592,6 +685,20 @@ are capped, so a firewall under a scan cannot grow it without bound.
592
685
from the same guided form.
593
686
- Zone target, log-denied value, reload, and the actions menu above.
594
687
688
+
**iptables**
689
+
690
+
- Read `iptables-save -c` and `ip6tables-save -c` (nf_tables or legacy) and show
691
+
INPUT, FORWARD and OUTPUT of both families, then every other chain that holds a
692
+
rule, read-only.
693
+
- Insert a rule right before the chain's catch-all REJECT or DROP, with the
694
+
position and the reason in the preview; refuse a position after it. Delete by
695
+
specification.
696
+
- Persist with `netfilter-persistent save` or `service iptables save`, previewed
697
+
with the diff against the saved files; report runtime-vs-saved drift in the
698
+
header, the status line and `--check`.
699
+
- Stage changes and apply them through `iptables-restore --noflush`, with the
700
+
same keep-or-roll-back window as nftables.
701
+
595
702
**nftables**
596
703
597
704
- Read `nft -j list ruleset` and show every base and used regular chain, its
@@ -694,6 +801,20 @@ hidden; one below the minimum is marked as such and the tool still runs.
694
801
|`==2.0.0`|`--permanent --list-all-zones` prints the same settings for every zone on this release (firewalld#1152), so the permanent half of the runtime/permanent comparison is not trustworthy; 2.0.1 fixed it |
695
802
|`>=2.2`| firewalld removed the lockdown feature, so no lockdown state is shown |
696
803
804
+
### iptables
805
+
806
+
|||
807
+
| --- | --- |
808
+
| Binary |`iptables`|
809
+
| Version read with |`iptables --version`|
810
+
| Minimum | 1.6 |
811
+
| Tested |`1.8.10`|
812
+
813
+
| Versions | What changes |
814
+
| --- | --- |
815
+
|`<1.8`| only the legacy xtables interface exists, so the rules live outside nf_tables and the nft ruleset cannot show them; the backend reads them through iptables-save and the selector asks the legacy tables directly |
816
+
|`>=1.8`| iptables-nft writes table ip filter and ip6 filter in nf_tables, and `iptables --version` says which variant is installed; the nftables backend treats those tables as read-only and points here |
817
+
697
818
### nftables
698
819
699
820
|||
@@ -729,7 +850,7 @@ environment. Flags override everything. See
729
850
[`examples/config.toml`](examples/config.toml).
730
851
731
852
```toml
732
-
# Which firewall to drive: "auto", "ufw"or "firewalld".
853
+
# Which firewall to drive: "auto", "ufw", "firewalld", "iptables" or "nftables".
733
854
backend = "auto"
734
855
735
856
# Privilege escalation prefix; "" runs the command directly.
@@ -744,8 +865,10 @@ service is running. If neither is running it takes the one systemd would start
744
865
at boot (`systemctl is-enabled`), and if neither is enabled either, the first
745
866
one installed — ufw before firewalld. Having both on one machine is a
746
867
misconfiguration rather than a supported setup, so the tie-break exists to be
747
-
predictable; name the one you mean when both are present. With nothing
748
-
installed it exits with a message naming what to install.
868
+
predictable; name the one you mean when both are present. Then comes iptables,
869
+
when a loader restores its saved rules or its tables carry rules of their own
870
+
(see [iptables](#iptables)), and last nftables, for a machine nothing else
871
+
manages. With nothing installed it exits with a message naming what to install.
0 commit comments