Wala pa ang page na ito sa Filipino. Ipinapakita ito sa Ingles.
Expose a UDP service
Sa page na ito 7 seksyon
A UDP tunnel forwards UDP traffic from a public host name and port to a local port. Use it for real-time, latency-sensitive services such as game servers and voice servers.
UDP tunnels are created with the same form as TCP tunnels and behave the same way in most respects. This page gives you the steps and the differences. The shared mechanics, such as the server port, the reserved port and the Tunnel IP, are explained on the TCP page.
Before you start #
- The Localtonet client is installed on the device and connected with an AuthToken. If it is not, follow the Quick start.
- Your service listens on a UDP port and you know the number.
- Check which protocol your service really uses. If it needs TCP and UDP on the same port, create a UDP - TCP tunnel instead.
Steps #
-
Open the TCP - UDP page #
Open My Tunnels › TCP - UDP and select Create TCP - UDP Tunnel.
-
Fill in the form #
Field What to enter Protocol UDP Device token The token used by the Localtonet app on your device. Server region Choose a region close to your device for lower latency. Local IP address 127.0.0.1when the service runs on the same device as the client.Local port The UDP port your service listens on. URL type and Domain Random subdomain on localto.networks right away. Custom subdomain needs Balance.Select Create tunnel.
-
Start the tunnel and share the endpoint #
Select the start button in the Actions column. The URL column then shows the endpoint as
<SUBDOMAIN>.localto.net:<SERVER_PORT>, and the Protocol Type column showsUDP. Give your players or clients this host and port.
What is different from TCP #
| Topic | UDP tunnel |
|---|---|
| Server port and Is Reserved? | Same as TCP. The port is assigned at the first start. It stays the same across restarts only when it is reserved, which needs Balance. |
| Is SslStream? | Not offered. |
| Proxy Protocol? | Not offered. |
| Show SSH Command | Not offered. Starting a tunnel with plain SSH works for HTTP and TCP tunnels only, so a UDP tunnel needs the Localtonet client. |
| Other settings | The same as for TCP: Server Port, Legacy Connect?, Tunnel IP, IP Restriction, the limits, the logs, Arguments, Outbound Port and Tunnel Note. See the settings table on the TCP page. |
Example: a game server #
Many game servers use UDP. Create a UDP tunnel with the game's port as Local port, start it, and let your friends add the server with the host name and the server port from the URL column. Minecraft Bedrock Edition is an exception: since Bedrock 26.60 it needs TCP and UDP, so it uses a UDP - TCP tunnel. The step-by-step guide is Using Localtonet with Minecraft.
Hosting for more than one evening? Reserve the port so the address your friends saved keeps working. See Reserved port on the TCP page.
On the Free plan #
UDP tunnels count as TCP/UDP tunnels for the Free session limit: they stop after 30 minutes. Select Start to begin another session. The server port is not reserved on the Free plan, so it can change when the tunnel starts again. See Plans and Balance.
Troubleshooting #
Clients cannot reach the server
Check that the tunnel is started and that the Connection column shows ON. Compare the host and port your clients use with the URL column, because an unreserved port changes after a restart. Make sure the service listens on UDP, not TCP, on the local port of the tunnel.
The service needs TCP as well
A UDP tunnel carries UDP only, and the page has no option to change the protocol of an existing tunnel. Create a UDP - TCP tunnel, which carries both protocols on one server port, and delete the UDP tunnel if you no longer need it.
"You need to purchase balance to use this feature."
A custom subdomain, a reserved port and a server port of your choice need Balance.