Ubiquiti EdgeRouter 4 Port Forwarding

Editorial • guide

Port Forwarding for Game Servers

Set up router port forwarding so players outside your home network can connect to your game server.

Published 5/8/20263 min read

What port forwarding actually does

Most home networks sit behind a router. Your game server may be running on a Windows PC, Linux box, or spare machine inside that network, but players on the internet only see your public IP address.

Port forwarding tells the router: when traffic arrives on this public port, send it to this internal device and port.

Without that rule, local players may connect fine while everyone outside your house times out. With the wrong rule, the router sends traffic to the wrong device, the wrong protocol, or a machine whose local IP changed after a reboot.

Forward only the ports your server needs

Do not use DMZ mode as a shortcut. Forward the specific TCP or UDP ports required by the game, and remove rules for servers you no longer run.

Before you open the router

Collect three pieces of information:

  • The server machine local IP address, such as 192.168.1.50
  • The game server port or port range
  • Whether each port is TCP, UDP, or both

Then reserve the server machine IP in your router DHCP settings. A static reservation prevents the router from giving that address to a different device later. If the local IP changes, a perfectly good forwarding rule can start pointing at the wrong machine.

Router fields

Common port forwarding fields

Routers use different labels, but most rules ask for the same information.

Field
What to enter
Example

Service name

A label you recognize

Minecraft Server or Valheim

External port

The public port players connect to

25565

Internal IP

The local IP of the server machine

192.168.1.50

Internal port

Usually the same as the server port

25565

Protocol

TCP, UDP, or both as required by the game

UDP

Test from the outside

After saving the rule, restart the game server and test from a network that is not your home Wi-Fi. A phone hotspot is useful because it proves the traffic is coming from the internet.

If players still cannot connect:

  1. Confirm the server is actually listening on the expected port
  2. Check Windows Firewall or your Linux firewall
  3. Confirm the router rule points to the current local IP
  4. Check whether the game uses a separate query port
  5. Ask your ISP whether you are behind carrier-grade NAT

Carrier-grade NAT is common on some residential connections. If your router WAN address does not match your public IP shown by an IP lookup site, port forwarding may not work until your ISP provides a public IPv4 address or you use a hosted server.

FAQ

Common questions

Do I need TCP or UDP?

Use the protocol required by the game. Many real-time game servers use UDP for gameplay, but web panels, RCON, and some launchers may use TCP.

Is port forwarding safe?

It is safer when limited to the exact game ports and paired with firewall rules. Avoid forwarding remote desktop, admin panels, or database ports to the public internet.

Why does the port checker say closed?

Some port checkers only test TCP, while many game servers use UDP. Also make sure the server process is running while you test.

End of guide

Router done? Check the server firewall next.

Port forwarding gets traffic to your machine. The local firewall still decides whether the server process can receive it.

Article details

Author: Eps · Editorial Team

Published: 5/8/2026

Updated: 5/8/2026

Feedback

Spotted a problem, outdated step, or missing command? Let us know and we will keep this guide accurate.

Rate this guide

Hover the stars to rate this article. Your rating is saved to your account for this page.

Click a star to leave a rating.