Skip to content

Hole Punching

Pelorojo edited this page Oct 5, 2026 · 1 revision

Hole Punching

The problem

Online races in NFSU are peer-to-peer: every player talks to the host over UDP 3658. The lobby only tells the players each other's IP, never a port - the game assumes 3658.

Behind a router without port forwarding, and on mobile internet (carrier-grade NAT), the real port is a different one, and the race never starts.

The solution

On servers that support it (shown as Hole Punch in the launcher), the plugin:

  1. tells the server the real public port of the game's own UDP socket,
  2. asks the server for the real ports of the other players,
  3. sends the game's packets to those ports - the game's own start packets then open the way through both routers,
  4. if nothing arrives directly 2.5 seconds after the race start, the race is relayed through the server.

It is always on. Players without the plugin and servers without the service work as before.

Still not working?

  • A local firewall must allow UDP 3658 (on Linux with ufw: sudo ufw allow 3658/udp).
  • For a bug report, set this in scripts\NFSUServerChanger.ini, race again and send scripts\NFSUServerChanger_HolePunch.log:
    [HolePunch]
    Log = 1

For server operators

The service is part of nfsuinfoserver (holepunch.py, UDP 10910, started together with the info server; --no-holepunch switches it off). UDP 10910 must be open in the server's firewall.

Clone this wiki locally