From ca7e03bd66c421545c2aba171c098086bd92b059 Mon Sep 17 00:00:00 2001 From: Nick Guy Date: Fri, 7 Mar 2025 17:59:38 +0000 Subject: [PATCH] Prevent opening of system ports --- main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/main.py b/main.py index d8528f7..f37d8ac 100644 --- a/main.py +++ b/main.py @@ -74,7 +74,8 @@ def apply_port_changes(): print(f"Excluding allocation \"{label}\" from forwarding, found \"pf_exclude\" in the description") continue - rules.append(create_rule(label, node_internal_ip, alloc["port"])) + if int(alloc["port"]) > 1024: + rules.append(create_rule(label, node_internal_ip, alloc["port"])) run(router.async_apply_port_forwarding_rules(rules))