diff --git a/containers/agent/setup-iptables.sh b/containers/agent/setup-iptables.sh index e5ed5ad92..2506f91db 100644 --- a/containers/agent/setup-iptables.sh +++ b/containers/agent/setup-iptables.sh @@ -40,25 +40,49 @@ is_valid_port_spec() { fi } -# Allow AWF_HOST_SERVICE_PORTS entries to a destination IP. -# Port validation is intentionally strict to prevent malformed iptables rules. +# Parse a comma-separated port spec string, validating each entry. +# Mirrors TypeScript parseValidPortSpecs() in src/host-iptables-validation.ts. +# Usage: parse_port_specs