This does a hole punch connection to the remote machine with a given local port, for use in peer-to-peer hole punching.

It takes two parameters:

  1. The IP to connect to, which must include the remote port.
    This remote port should be the same one chosen on the other end as their local port.
  2. The local port to use, or 0 to pick a free port.
    Because Linux-based OSes require root privileges for using ports below 1024, it's recommended you pick a port larger than 1024.


This is for firewall hole punching, an advanced concept for peer-to-peer connections, allowing clients can host their own servers without router configuration beforehand. You will not need to use it in normal server-client arrangements.


The server must not be hosting when you use this action.

It is expected the server hole-punches to the client, then after a short delay, the server should host normally on the same port. See the example under Guides > Peer-to-peer play.