mirror of
https://github.com/fosrl/pangolin.git
synced 2026-05-24 11:58:38 -05:00
[GH-ISSUE #2913] newt holepunch does not re-resolve endpoint hostname after connection loss (stale IP on reconnect) #11029
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @timootten on GitHub (Apr 28, 2026).
Original GitHub issue: https://github.com/fosrl/pangolin/issues/2913
Describe the Bug
newt/holepunch does not re-resolve endpoint hostname after connection loss (stale IP on reconnect)
Summary
When the IP address behind the configured gerbil/exit-node hostname changes (e.g. due to a failover, migration, or DNS record update),
newtdoes not perform a fresh DNS lookup on reconnect. Instead, it continues using the IP it resolved at startup, leaving the tunnel in a permanently broken state untilnewtis manually restarted.This affects any dynamic IP environment — including setups using tools like external-dns that automatically update DNS records at the provider level during cluster events.
Actual Behavior
Holepunch keeps sending to the originally resolved IP for the entire runtime. No re-resolution occurs even well past the DNS TTL. The only recovery path is manually restarting
newt.Evidence / Logs
No subsequent resolution attempt is visible in the logs after the DNS record changes.
Environment
newt+ holepunchSuggested Fix
On each reconnect attempt (or periodically, respecting TTL), re-resolve the exit-node hostname from DNS rather than caching the IP from the initial startup resolution.
Environment
To Reproduce
newt— confirm holepunch targets Address A in the logsnewt— confirm holepunch correctly targets Address BExpected Behavior
After the DNS TTL expires,
newt/holepunch should re-resolve the exit-node hostname and reconnect using the updated IP address — without requiring a manual restart.