NR: iptables on ubu 24.04 is actually iptables-nft
The syntax is not translated properly, which leads to issues..so account for that.
diff --git a/iptables.py b/iptables.py
index d716600..998afe5 100644
--- a/iptables.py
+++ b/iptables.py
@@ -112,7 +112,7 @@
if out:
for line in out.decode("ascii").split("\n"):
m = re.match(
- r"^(\d+)\s+([-0-9a-zA-Z]+)\s+(all|tcp|udp)\s+(\S+)\s+([0-9a-f.:/]+)\s+([0-9a-f.:/]+)\s*(.*?)$", line
+ r"^(\d+)\s+([-0-9a-zA-Z]+)\s+(all|tcp|udp|\d)\s+(\S+)\s+([0-9a-f.:/]+)\s+([0-9a-f.:/]+)\s*(.*?)$", line
)
if m:
line_number = m.group(1)