28a193e430
_get_dnat_container_ips() used a concatenating docker inspect format that produced "invalid IP" when containers had multiple network attachments. The old ensure_postup_dnat appended rather than replacing, so each update call added a broken duplicate set of rules causing iptables to fail on startup and tear down wg0 entirely. Fix _get_dnat_container_ips to use a space separator in the format string and validate each token as a real IP before accepting it. Rewrite ensure_postup_dnat with _is_dnat_rule() helper: strips every managed DNAT/FORWARD rule (any IP, port 53/80) on semicolon-split and appends a single correct set — fully idempotent regardless of prior state. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>