vpn: diagnose includes host wg interfaces + NAT counters to detect same-key conflicts

This commit is contained in:
Konstantin Passig PC
2026-08-25 18:12:53 +02:00
parent cbf28e3cfe
commit 5742f7fb63
+4
View File
@@ -255,6 +255,10 @@ def _diagnose(cfg) -> str:
("wg", ["ip", "netns", "exec", ns, "wg", "show", iface]),
("routes", ["ip", "netns", "exec", ns, "ip", "route", "show", "default"]),
("rules", ["ip", "netns", "exec", ns, "ip", "rule", "show"]),
("host wg interfaces", ["sh", "-c",
"for i in $(wg show interfaces 2>/dev/null); do "
"echo \"== $i ==\"; wg show $i public-key 2>/dev/null; done"]),
("host NAT", ["iptables", "-t", "nat", "-L", "POSTROUTING", "-n", "-v"]),
):
rc, out = _sudo_out(args)
parts.append(f"--- {title} ---\n{out or '(none)'}")