WireGuard keepalive behind NAT: measured effect of PersistentKeepalive versus NAT timer
A DEV Community author tested WireGuard's PersistentKeepalive behind NAT using throwaway Linux network namespaces on kernel 6.8. Without keepalive, the NAT router's UDP mapping expired during idle time, so server-initiated packets to the client were dropped while client-initiated traffic still worked. The author found that the keepalive interval relative to the NAT timer determines whether the tunnel stays reachable, with a keepalive longer than the timer causing intermittent failures. The experiment used shortened 5-second conntrack timers, so the author advises checking the actual timer of one's own router and suggests 25 seconds as a safe default for common 30-second timers.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in