Blog

UDP hole punching: why our devices used a relay

Two of our devices on one Wi-Fi reached each other over UDP and still used a relay. How hole punching works, our test numbers, and what broke.

Published November 24, 2026 · 20 minutes read

Key takeaways

  • UDP hole punching: both devices send to each other's public address at once, so each router takes the other's packet for a reply.
  • 6 direct attempts in just over four minutes, none kept: on 1 November our Android phone reached our Mac over the LAN.
  • 0 to 5 seconds to direct for two cone NATs in five test runs on 24 November; symmetric pairs stayed relayed in all five.
  • 334 to 374 ms relayed round trip between two of our phones on one Wi-Fi, 6 November 2026; nothing went direct.
  • Since 6 November, each pair of ForestVPN devices starts on the relay, goes direct only after tunnel data crosses, and keeps the relay open.
On this page (15)

On 1 November 2026, two of our devices on one Wi-Fi sent everything through a relay server (a machine that passes packets along when two devices cannot connect directly), though UDP crossed that Wi-Fi both ways. We build ForestVPN's Connect my devices feature; these were our own Android phone and Mac.

Our Android phone had a clear line to our Mac: its probes went out and answers came back. It opened a direct path six times in a little over four minutes, dropped it every time, and sent all its traffic through one of our relay servers.

Whether two devices can connect directly depends on their routers: when both pick a new port for every destination, the pair usually ends up on a relay server instead.

The fault sat in our own rules for deciding when a direct path counts as real, and the status word on the screen was computed from yet another thing. Below: the punch, the logs of that day, and the part we still cannot show on phones.

  • 6direct attempts in just over four minutes, none kept: Android phone to Mac on one Wi-Fi, 1 Nov 2026
  • 0–5to a direct path, two cone NATs (routers that keep one public port per device), 5 test runs, 24 Nov 2026
  • 0 of 5symmetric NAT pairs (routers that pick a new port per destination) went direct, test runs, 24 Nov 2026
  • 334–374relayed round trip, two of our phones on one Wi-Fi, 6 Nov 2026

Open the film file (MP4, 4 MB). Use it if YouTube is blocked or slow on your connection. mirror

Read the transcript

What is UDP hole punching?

Hole punching lets two devices that sit behind home routers exchange UDP packets directly, with no port forwarding on either router. Both devices fire a packet at the other's public address and port in the same moment, and each router waves the incoming packet through because it resembles an answer to something its own device just sent.

NAT
Network address translation: a home router lends one public address to every device behind it. For each outgoing packet it swaps in that public address and a port, notes the pairing in a table row (a mapping), and later admits only packets that fit a row.

The textbook version, set down in the Ford, Srisuresh, Kegel (2005) paper, runs in three steps:

  1. Each device contacts a server that both can reach. The server notes the public address and port that each router assigned, and hands each device the other's pair.
  2. Each device sends to the other's pair. Whichever packet lands first is normally dropped by the far router, since that router has no row for it yet; but on the way out it created a row in the sender's own router.
  3. When the far side's packet arrives, a matching row is waiting, and the router admits it as a reply. From then on the server is out of the picture.
Each device's first packet opens its own router for the other's reply; a router that picks a new port per destination leaves the other side aiming at the wrong door.

Why UDP? One outgoing datagram is enough to make a row, because UDP has no handshake to complete. TCP needs the opening packets of both sides to cross in flight (a simultaneous open), so it works on fewer routers; the FAQ below puts a number on that. RFC 5128 surveys the whole family of techniques.

UDP hole punching or STUN: what is the difference?

STUN answers one question: which public address and port did my router give me? Hole punching is what two devices do next with those answers. ICE is the procedure around both, gathering candidate addresses, testing them in pairs and dropping to a relay server (TURN is the standard protocol for one) when no direct pair works.

On the standards side, RFC 8489 defines today's STUN, and the older RFC 3489 is where the "cone" and "symmetric" labels came from. RFC 8445 defines ICE, which ranks relayed candidates last.

We run no STUN server. Each device instead sends a sealed echo to two of our relay servers, from the very socket it will later use for data, and each server reports what it saw. If both reports carry the same port, the router is keeping one row per socket and the device offers that address. If the ports differ, it offers nothing. Our devices feature uses this echo where other software would use STUN.

Any STUN server replies to anybody with a fixed marker, which makes one probe packet enough to recognise the machine. Our echo replies only to a request sealed with that server's key.

Which routers allow a punch, and what does symmetric NAT change?

A router can be punched if it reuses one public port for a device's socket no matter who the packet is for, because then the port a server observed is the port the peer must hit. A symmetric NAT hands out a fresh port per destination. The port your peer was told is then already wrong, and unless ports are guessed the pair lands on a relay.

The old names blur two separate behaviours, and RFC 4787 pulls them apart. Mapping is about whether the public port depends on the destination. Filtering is about who gets let in. Punching needs endpoint-independent mapping, and RFC 4787 makes that a MUST (requirement 1, January 2007). Strict filtering is tolerable, since the punch turns the far side's packet into a reply.

How many routers behave? In the Ford, Srisuresh, Kegel survey, 310 of 380 data points (82 percent) mapped UDP consistently. Those were consumer routers of 2005; we have no count for today's.

How we tested punching
Date
24 November 2026; six cases, five runs each, 30 of 30 passed; one more run for the round trip
Machine
one Linux virtual machine (2 vCPU, 4 GiB, x86_64) on our own test servers; every device, router and server in its own network namespace
What ran
our Linux client built from our source tree that day, our relay server, and a stand-in for the coordination service (no account, no production server)
Routers
Linux NAT rules. Cone: source port kept, plus a firewall that drops anything new from outside. Symmetric: random source ports. A NAT-PMP responder for the port-mapped case
Round trip
one cone pair, 300 pings over 60 seconds on each path; the relay path made by dropping UDP at both routers
Throughput
20 Mbit/s of UDP offered went through in full on both paths; the test relay has no rate limit, so this says nothing about relay speed
Not tested: phones, real home routers, carrier NAT, IPv6, TCP, Wi-Fi, relay rate limits, any network outside our test machine.

Every figure dated 24 November in this post comes from this setup. Where it differs from a real home, the text says so.

Routers in the testWhere the packet must landPunchable?Result, five runs
Both keep one public port per socket and admit nothing unasked ("port-restricted cone")The address and port the echo reportedYes, if both send togetherDirect within 0 to 5 s every time; the relay carried no bytes in the next 5 s
Both assign a different port for each destination ("symmetric")A port nobody can predictNot unless ports are guessed, which we do not doRelayed throughout the 20 s window; the endpoint never switched, and all 20 pings arrived
Symmetric on one side; the other router hands out a port on request (NAT-PMP)The port it handed outYes, because the symmetric side's probe leaves through a hole it opened itselfDirect every time; with the relay cut, all 5 pings arrived
Both on one LANThe private LAN addressYes, nothing translates between themDirect every time; with the relay cut, all 10 pings arrived
All UDP dropped at both routersNoneNoRelayed every time; traffic still flowed

Row three is the exception. A symmetric device can still reach a peer whose router opens a port when asked (NAT-PMP, PCP or UPnP) or filters nothing inbound. Its probe leaves through a hole it made, and the answer comes back the same way.

Carrier-grade NAT asks the same question one floor up, and the FAQ below covers it; for port forwarding behind one, see CGNAT and port forwarding.

How fast does a punched path open, and how long does it last?

Two cone NATs in our test network (the Method box above) reached a direct path between 0 and 5 seconds after traffic first crossed the relay, in each of five runs on 24 November 2026. What happens afterwards depends on the router's idle timer: RFC 4787 asks for two minutes at least, while the 2005 paper met routers that forgot a mapping after 20 seconds.

How we timed the punch
Time to direct
whole seconds, checked once a second from the first answered ping on the relay; the pass needs both directions direct
Compared with
the same cone test on 16 October 2026: one run, an earlier build, a container on a Mac (arm64)

Our plan: direct within 5 s

16 Oct 2026, one run (earlier code, another test machine)One run: 16, above the 5 s bar, meets the target
24 Nov 2026, five runsRun 1: 5, meets the targetRun 2: 1, below the targetRun 3: 1, below the targetRun 4: 0, below the targetRun 5: 0, below the target
Two cone NATs went direct in 0 to 5 s in five runs on 24 November; one run on 16 October took 16 s.
Show the data
GroupMeasurementValue, sNote
16 Oct 2026, one run (earlier code, another test machine)One run16above the 5 s bar
24 Nov 2026, five runsRun 15
24 Nov 2026, five runsRun 21
24 Nov 2026, five runsRun 31
24 Nov 2026, five runsRun 40
24 Nov 2026, five runsRun 50

The same cone-to-cone test took 16 seconds in October and 0 to 5 seconds in November. Besides the code, the machine and the script's end check changed, and October logged nothing about which probe round won. Symmetric pairs are not plotted: they never went direct.

Four things decide the time:

  1. Traffic begins on the relay immediately, while both devices probe each other's candidate addresses.
  2. A probe that reaches the far router before that side has sent anything gets dropped. The first ping to land early is simply lost.
  3. Since the release of 6 November, a packet that decrypts cleanly from an address the receiver never listed becomes a path on the receiving side. The punch can finish from whichever end gets through first.
  4. When an answer arrives that nothing could use, the next probe round is scheduled 5 seconds out, not 30.

October's logs cannot say which of the last two took the 16 seconds down.

Holding a hole open is another job, and we mostly skip it. A pair gets probed only while it has carried traffic within the past 45 seconds, and a learned address expires 45 seconds after it last proved itself. The relay stays up underneath, so a pair waking from idle starts there and punches again. The idle-timer arithmetic for a tunnel lives in WireGuard keepalive.

Roaming was one more case. In the same test network we moved a device onto another router mid-transfer: traffic flowed again after 2.4 to 2.8 seconds, and the path was direct again 0 to 2 seconds after that. Two of the five runs were direct at the first check.

Why would two devices on the same Wi-Fi still use a relay?

Our software never settled on the direct path as real. On 1 November 2026 an Android phone and a Mac of ours shared one Wi-Fi. From the moment both were back online (13:59 UTC) until the report ends at 14:07, every packet between them went through a relay. Our third device, an iPhone, came back at 14:00 and never handshook with the Android phone after that.

What we read on 1 November
Devices
three of our own, one account: an iPhone, an Android phone, a Mac, on the builds published in late October
Window
13:36 to 14:07 UTC, 1 November 2026; one reconnect round at 13:58 to 14:00
Source
each device’s diagnostic report. Only the Android phone had path events; the Apple reports had none, so every iPhone and Mac cell is read from the Android side or inferred
Clocks
each device its own; the offset between them was not recorded and is assumed under about a second
Code
read at the commit of that day; a cited line can be a few lines off the shipped build
Removed
peer keys, addresses, network names, report codes

In the tables, "sees" means packets from the row device reach the column device and are accepted. On the Android phone that shows up as a completed handshake or rekey.

Who saw whom, 1 November 2026, UTC

Before the reconnect

Row sees columniPhoneMacAndroid
iPhone-norelay until 13:39:38, then no
Macno-no
Androidrelay until 13:39:38, then nono-

After the reconnect

Row sees columniPhoneMacAndroid
iPhone-unknown, likely nono
Macunknown, likely no-relay only
Androidnorelay only (direct tried 6 times, no data came back)-

Before the reconnect nobody could see the Mac: its extension had died at 08:28:39 and stayed down for 5 h 30 min (a separate lifecycle bug). Afterwards Android and the Mac met only through the relay, and the iPhone replied to nobody we could watch. Nothing was ever direct.

The reconnect, minute by minute

TimeWhereWhat
13:58:01Android phoneBack online; its devices-only tunnel is up
13:59:01MacBack online
13:59:04.053Mac, towards AndroidFirst handshake, 2.03 s after the Mac's tunnel started at 13:59:02.027, over the relay
13:59:16.045Android phoneThe relay becomes the path it uses for the Mac
13:59:16 to 13:59:21Android phoneA direct path to the Mac's LAN address is opened and closed, three times over
14:00:19 to 14:00:21iPhoneBack online; no handshake with the Android phone in either direction for 7 minutes; the Mac side is not logged
14:01:04.9Android phone and MacA rekey 120 s after the first handshake. Rekeys need traffic, so data was moving, on the relay
14:03:22 to 14:03:30Android phoneThree more direct openings, each closed again
14:07:31Android phoneLast line of the report; no direct path was ever current

Row three tells most of it: the Mac handshook 2.03 seconds after it started, over the relay, and the relay was carrying data from that moment. Nothing ever came back on the direct path.

Why did the app say Online when the other device was unreachable?

What the badge called "Online" was presence: the coordination service could see an open socket, and the apps took that for a working path. No app looked at packets. The real per-peer path word was computed and sent to every app, and none displayed it.

On a test account that evening, Android showed the iPhone as Online in every snapshot, while the iPhone's own list read "Last connected".

It was not the NAT

The pages we read for this post blame symmetric NAT when punching fails. Our logs ruled NAT out: on one Wi-Fi the LAN path crosses no translation, and UDP crossed it both ways. NAT would have mattered only if each device had known just the other's public address (the hairpin case below).

Why can a direct path fail when UDP works both ways?

Android got an answer from the Mac over the LAN and tried a direct path, but the Mac kept replying through the relay, so the upgrade was lopsided. The phone kept the relay as its path, sent copies down the direct one for a couple of seconds, and ended the trial when nothing came back.

Below is the Android phone's report of 1 November 2026 (UTC, times from each event's own millisecond stamp, peer key cut to peer(…)). In it, meet is our name for the relay path, udp a direct one, and current the path the phone sends on.

The phone's log, line by line

  1. The phone probes the Mac's LAN address and gets an answer. The code opens a direct trial only once a probe has been answered, so each open after 13:59:16 is our evidence that UDP went both ways.
  2. The phone keeps the relay as its path and, for up to 2 seconds, also sends a copy of each packet down the direct path, then waits for tunnel data to come back on it. That 2-second trial matches the four opens that lasted two seconds.
  3. The Mac's replies keep going out on the relay.
  4. Nothing authenticated comes back on the direct path, so the phone ends the trial and tries again later; the relay carries throughout. Six times.

The second line is not part of the story: 13:59:15.697 closes a path to the Mac's old stored LAN address that the phone opened at 13:58:06, before the Mac was back. The attempts that matter start at 13:59:16.050.

13:59:14.697  [NET] disco: peer(…) - qlink: open kind=meet
13:59:15.697  [NET] disco: peer(…) - qlink: close kind=udp
13:59:16.045  [NET] disco: peer(…) - qlink: current kind=meet
13:59:16.047  [NET] disco: peer(…) - qlink: kick kind=meet sendable=true
13:59:16.050  [NET] disco: peer(…) - qlink: open kind=udp
13:59:18.057  [NET] disco: peer(…) - qlink: close kind=udp
13:59:18.059  [NET] disco: peer(…) - qlink: check kind=meet
13:59:18.060  [NET] disco: peer(…) - qlink: open kind=udp
The other 11 lines, to 14:03:30
13:59:19.424 close udp
13:59:19.685 open udp
13:59:21.687 close udp
13:59:21.729 check meet
14:03:22.695 open udp
14:03:26.702 close udp
14:03:26.704 open udp
14:03:28.710 close udp
14:03:28.712 check meet
14:03:28.714 open udp
14:03:30.716 close udp

Search those lines for current kind=udp: there is none. The phone opened a direct trial six times, and each open lasted between 1.4 and 4.0 seconds; four lasted two. One stayed open 4.0 s and one 1.4 s; the log does not say why. The first open and the last close are 4 minutes 14 seconds apart.

On the Mac, three explanations fit and we cannot separate them: a filter refused the phone's address, the Mac never probed it, or it probed and the sends failed without a trace. The Mac logged nothing that could choose. The fix works either way.

What does a successful hole punch look like in a test run?

Here is run 2 of the same family of scenarios on 24 November, as our test prints it (only the port number is replaced):

[mesh_punch_cone] PASS -- cone <-> cone went direct both ways in 1s; 0 meet bytes in 5 s after
[mesh_punch_symmetric] PASS -- symmetric <-> symmetric stayed relayed for 20 s, 0 endpoint switches, 0/20 lost
[mesh_punch_symmetric_to_portmapped] PASS -- symmetric guest <-> port-mapped exit went direct (endpoint = the mapping NNNNN); 5/5 with the relay cut
[mesh_punch_roam] PASS -- roam mid-transfer: traffic back in 2.4s, direct again via the new router after 1s more
[mesh_direct_lan] PASS -- a -> b direct on the LAN (endpoint=b's LAN address); 10/10 pings with the relay cut
[mesh_relayed_udp_blocked] PASS -- a <-> b over the meet relay with every UDP packet dropped; path=relayed

What changed since 1 November is how a receiver learns a path: it takes the sender's address from the sender's own authenticated traffic. Without that, a direct path that only one side tries never gets an answer, because each side answers on the path it trusts.

Where does hairpin NAT come in for two devices on one Wi-Fi?

Two devices behind one router can use each other's private LAN addresses with no translation at all. If either knows only the other's public address, the packet has to exit to the router's public side and re-enter, and that works only when the router supports hairpin translation.

hairpin translation
A router that receives a packet aimed at its own public address and turns it around into the LAN, rewriting both addresses (RFC 4787, section 6).

The 2005 authors advised trying both the private and the public address, since hairpinning was rare. RFC 4787 later required it (requirement 9, 2007). In that survey, 80 of 335 data points (24 percent) hairpinned UDP. We have no figure for today's home routers.

Ours is the awkward case. At the time of that report phones refused every public address, and the iPhone offered no LAN address, so an iPhone and an Android phone on one Wi-Fi had nothing to try. The public-address refusal was deleted on 6 November; the iOS LAN rule stays.

The iPhone app offers no LAN address and refuses a LAN source, on the belief that the iOS extension gets EPERM when it sends to a LAN address. Nobody has measured it on a device. As a result, an iPhone and a neighbour on one Wi-Fi can meet directly only via the router's public address, which needs hairpinning, or else via the relay.

The iPhone rule has no measurement behind it

What would settle it is one send to a LAN address on a real iPhone, with the error code written into the design record.

What does a relay cost?

Time, mostly, because every packet detours to a relay server and back. Two of our phones on one Wi-Fi measured a relayed round trip of 334 to 374 ms across three minutes on 6 November 2026. In our test network, where distance is nil, a relayed round trip had a median of 22.5 ms against 0.33 ms direct.

How we measured the round trip
Test network
24 November 2026, one cone pair, 300 pings over 60 seconds on each path, one run; the relay path made by dropping UDP at both routers
Phones
6 November 2026: an iPhone and an Android phone with only the devices feature on, one Wi-Fi, one ping a second for three minutes, the release code of that day
Not compared
the two setups differ, so we draw no ratio between them
  • Through the relay
  • Direct

Medianms

  • Through the relay22.5
  • Direct0.33

95th percentilems

  • Through the relay27.4
  • Direct0.45
With no distance to cover, a relayed round trip took 22.5 ms at the median against 0.33 ms direct.
Show the data
GroupSeriesValue, msRange
MedianThrough the relay22.5
MedianDirect0.33
95th percentileThrough the relay27.4
95th percentileDirect0.45

With no distance to cover, a relayed round trip still took 22.5 ms at the median (27.4 ms at the 95th percentile), while the direct path took a third of a millisecond at the median and 0.45 ms at the 95th. It is one run on loopback-class links, so real distance can only add to it.

Two parts make up the price: the relay's own handling (the gap in the chart) and the distance to whichever relay the devices happened to meet on. The phone pair shows what distance, and the phones' radios with it, can add: two phones on one Wi-Fi took a third of a second per round trip.

One thing is still open: a phone chooses its relay without being told which country it is in, so it may meet its neighbour through a relay on another continent.

Throughput has not been measured on devices. In the test network, 20 Mbit/s of offered load passed both paths in full, yet the test relay has no rate limit, so that run tells you nothing about relay speed.

The sharing section of our privacy policy covers what a relay can see: when a direct connection isn't possible, traffic passes through a ForestVPN relay that "can't read it and keeps no record of which devices talk to each other."

How do you keep a punched path from dropping traffic?

A direct path is now a lease laid over the relay. Each pair starts on the relay, moves to a direct path only once tunnel data has crossed it, and leaves the relay open underneath. If the direct path goes quiet, every packet goes out on both until one answers.

One pair, one direct path

  1. Relay first the first packet never waits
  2. Probe and answer a direct path becomes eligible
  3. Promote on data tunnel data answered on it
  4. In doubt, send on both 350 ms to 3 s without an answer
A direct path as a lease over the relay

The rules below come from our design record for mesh paths, accepted and shipped on 6 November 2026, and we ran them in the test network above. No phone has yet proven a direct path on one Wi-Fi under them.

  1. The first packet of a new pair never waits on a direct path; it goes on the relay while probes run beside it.
  2. An answered probe only makes a direct path eligible. It becomes current when tunnel data is answered on it. The WireGuard session moves to the new address without a fresh handshake; its Noise_IKpsk2 handshake is unmodified, and the protocol itself is untouched.
  3. A packet that decrypts from an address the receiver never listed becomes a path on the receiving side.
  4. The relay stays open for as long as a direct path carries traffic.
  5. If data on the direct path waits out its doubt window with no answer, each datagram also goes on the relay, and WireGuard's replay window discards whichever copy arrives second.
  6. Each address records its origin and when it was last proven. Learned ones lapse after 45 seconds, with at most 8 per peer.

The doubt rule in code

In the code (Rust, trimmed; road is the code's word for a path), the doubt rule reads:

/// Doubt fires when data has waited `clamp(2 × max(min_rtt, least handshake RTT), floor, ceiling)` for any answer.
pub(crate) const DOUBT_FLOOR: Duration = Duration::from_millis(350);
pub(crate) const DOUBT_CEILING: Duration = Duration::from_secs(3);
 
/// While the current road is a direct one in doubt (data waited its doubt window, 350 ms to 3 s) or
/// under repair, every datagram goes out on the relay too, until the direct road answers or the repair
/// moves the pair. The Noise replay window drops the copy that loses; the handshake is unchanged.
pub(super) fn relay_in_doubt(&self) -> Option<RoadId> { /* ... */ }

An end-to-end test called learned_source_upgrades_both_sides reproduced 1 November's shape and failed before the change: one side's direct upgrade opened and lapsed while the other held only its relay path. After the change, both sides were on the direct path within 20 ms of the first two-way delivery.

The cost is a second copy of each datagram on the relay, for the doubt window (at most 3 s) plus a repair that ends within 10 s. Each device keeps its home relay connection. A connection to a peer's home relay idles out after 120 s, so in the worst case the first relay copy after 2 minutes of direct traffic waits for a dial.

How should an app show a direct or relayed connection?

Each peer gets one verdict, worked out in shared Rust from the path, the relay, presence and sync: direct, relayed, connecting, unreachable (with a reason), offline or unknown. When a device's own socket closes, its peers are no longer all marked offline.

Direct and relayed both read "Connected" in our apps, since both carry your traffic; the difference lives in the diagnostic report. The word now comes from what the path and the relay have actually heard, with presence as one input.

Which fixes did we reject, and why?

Six, each for one reason:

  • Guessing ports for symmetric NAT means spraying probes across many ports. Our probing is limited to 8 addresses per peer and no more than one round every 5 seconds. It is aimed only at your own devices and devices shared with you, so no device can become a packet cannon. We would reopen this only if field data showed too many pairs stuck on relays, and we have none.
  • Running STUN on our relay servers brings back the fixed marker described above.
  • Trusting a path as soon as a probe is answered: on 1 November the probe was answered on the LAN and nothing came back on the path, so an answered probe proves only that the path is open.
  • Closing the relay once direct works turned each loss of the direct path into a gap in the traffic.
  • Refusing every public address on phones meant an iPhone and an Android phone on one Wi-Fi had nothing to try. That rule is deleted; the iOS LAN rule is not, yet.
  • Changing the handshake to carry path information was out: the handshake stays exactly as WireGuard defines it, and paths change around it (see the protocol page).

Is my connection direct or relayed?

From a computer, ping the other device by its name (the full name is on its detail screen under Devices) and time the round trip, then ping your own router from the same Wi-Fi and compare: a direct path on one Wi-Fi should come close to the router's number.

Hundreds of milliseconds between two devices on one Wi-Fi usually mean a detour through a relay, as with the 334 to 374 ms our phones showed. A direct pair in our test network answered in 0.33 ms.

Keep the screen on and send a few pings in a row: a phone in Wi-Fi power save can answer even a direct ping 100 ms or more late.

Our apps use one word, "Connected", for both paths. The path word lives in ForestVPN's diagnostic report, which the app shows you in full before anything is sent. Its mesh.path lines say whether each of your other devices' packets arrive direct or through a relay. Devices appear there under a short random tag, not by name.

What don't we know yet?

  1. Whether two phones on one Wi-Fi go direct today. Our iPhone and Android phone stayed relayed on 6 November, at 334 to 374 ms, and no device run has followed. One run on two phones is missing.
  2. Whether the iPhone's LAN rule is needed. Its EPERM has never been measured; one send on a real iPhone would tell us (hairpin section).
  3. Whether the public-address step works on real networks. During the November acceptance rounds our echo drew no answer on any device, so no device learned its public address, and no public-address punch ran on hardware, and we have not found why. That is why every claim of direct in this post rests on the test network.
  4. Which of three Mac-side causes produced 1 November. The Mac logged nothing that distinguishes them; a log line for the discarded send errors would.
  5. How many pairs go direct in real use. We hold no field data, so we have no NAT mix for our users.
  6. Why the relay costs 22.5 ms with no distance in the test network. We have not profiled it.
  7. How common hairpinning is on today's home routers. The 24 percent dates from 2005.
  8. Whether phones pick a nearby relay. They choose without knowing their country, and the phone apps contain no code we found that passes one.

Questions and answers

Can TCP connections be hole punched?

Sometimes. Both sides must send their opening packets at about the same time so each router sees the other's as a reply, and a router that answers an unexpected connection attempt with a reset breaks it. In a 2005 survey, 64 percent of data points allowed TCP hole punching, against 82 percent for UDP.

Does hole punching work behind carrier-grade NAT?

It can, when the carrier's NAT keeps one public port per device socket. RFC 6888 asks carrier NATs to follow RFC 4787, which requires that. If it picks a new port per destination, two devices fall back to a relay. We never measured how carriers behave.

Is a relayed connection less private than a direct one?

Traffic between your devices is end-to-end encrypted. Our privacy policy says that when a direct connection isn't possible, it passes through a ForestVPN relay that "can't read it and keeps no record of which devices talk to each other."

Do I need to forward ports to reach my own devices with ForestVPN?

No. There is no port forwarding and no router setup. If your router offers NAT-PMP, PCP or UPnP, a device you use as an exit asks it for a mapping by itself; if not, your devices punch or use a relay.

Is UDP still in use?

Yes. Name lookups (DNS), WireGuard and QUIC, the transport under HTTP/3, all run over UDP. It is also the easier protocol to punch: one outgoing datagram creates a router mapping, with no connection to set up first.

Sources

  1. Ford, Srisuresh, Kegel: Peer-to-Peer Communication Across Network Address Translators (USENIX 2005) (read November 24, 2026)
  2. RFC 5128: State of Peer-to-Peer (P2P) Communication across Network Address Translators (NATs) (read November 24, 2026)
  3. RFC 4787: Network Address Translation (NAT) Behavioral Requirements for Unicast UDP (read November 24, 2026)
  4. RFC 6888: Common Requirements for Carrier-Grade NATs (CGNs) (read November 24, 2026)
  5. RFC 8445: Interactive Connectivity Establishment (ICE) (read November 24, 2026)
  6. RFC 8489: Session Traversal Utilities for NAT (STUN) (read November 24, 2026)
  7. WireGuard: protocol and cryptography (read November 24, 2026)

How this was made

AI-assisted drafting from our own test runs of 24 November 2026 and the diagnostic reports of our own devices from 1 and 6 November, checked against the raw logs and code, with automated and editorial review.

All posts

Back to top

Ask us anything