improve iptables collection
Catalin-Emil Fetoiu committed
May 24, 2024 at 12:00 UTC
b850837a495be25180790e25f5de9cc7a3bf3147
1 file changed
+27
-2
diagnostics/networking.sh
+27
-2
@@ -25,6 +25,31 @@ echo "Printing DNS configuration"
25
cat /etc/resolv.conf
26
27
echo "Printing iptables and nftables rules"
28
-iptables -S
29
-ip6tables -S
28
+# iptables can be configured using both "iptables" and the legacy version "iptables-legacy". It's possible they can be used together
29
+# (although not recommended). Collect both to make sure no rules are missed.
30
+# We list the contents of the most common tables (filter, nat, mangle, raw, security)
31
+iptables -vL -t filter
32
+iptables -vL -t nat
33
+iptables -vL -t mangle
34
+iptables -vL -t raw
35
+iptables -vL -t security
36
+
37
+ip6tables -vL -t filter
38
+ip6tables -vL -t nat
39
+ip6tables -vL -t mangle
40
+ip6tables -vL -t raw
41
+ip6tables -vL -t security
42
+
43
+iptables-legacy -vL -t filter
44
+iptables-legacy -vL -t nat
45
+iptables-legacy -vL -t mangle
46
+iptables-legacy -vL -t raw
47
+iptables-legacy -vL -t security
48
+
49
+ip6tables-legacy -vL -t filter
50
+ip6tables-legacy -vL -t nat
51
+ip6tables-legacy -vL -t mangle
52
+ip6tables-legacy -vL -t raw
53
+ip6tables-legacy -vL -t security
54
+
55
nft list ruleset