How to port forward a Minecraft server

Your router blocks visitors from the internet, which keeps you safe. Port forwarding is one rule that tells it: "Minecraft players knocking on port 25565 should go to this PC." It takes about five minutes.

Using HostCraft? Its Network tab fills in your real addresses and can try to do this automatically (UPnP).

1. Find your PC's local address and your router's address

Press Win + R, type cmd, press Enter, then type ipconfig. Look for:

2. Log in to your router

Type the Default Gateway address into your browser. The username and password are usually on a sticker on the router (often "admin").

3. Find the port forwarding page

RouterWhere to look
TP-LinkAdvanced → NAT Forwarding → Virtual Servers
NetgearAdvanced → Advanced Setup → Port Forwarding / Port Triggering
ASUSWAN → Virtual Server / Port Forwarding
LinksysSecurity → Apps and Gaming → Single Port Forwarding
BT Smart HubAdvanced Settings → Firewall → Port Forwarding
Virgin Media HubAdvanced settings → Security → Port forwarding
Sky / Vodafone / othersLook for "Port Forwarding", "Virtual Server" or "NAT". Menus differ between models.

4. Add the rule

SettingValue
NameMinecraft
ProtocolTCP
External / internal port25565 (or the port you chose)
Internal IP / deviceYour PC's IPv4 address from step 1

Using Geyser so Bedrock (phone/console) players can join? Add a second rule: UDP 19132.

5. Stop the address from changing

Routers can give your PC a new local address later, which silently breaks the rule. Look for DHCP reservation (or "Address reservation" / "Static lease") and reserve your PC's current address.

6. Allow it through Windows Firewall

The first time the server starts, Windows asks whether to allow Java. Tick Private networks and click Allow access. HostCraft can also add the rule for you from the Network tab.

7. Test it

Friends join using your public IP (search "what is my IP") followed by :25565. People on your own Wi-Fi must use your local address instead. Most routers can't loop back to their own public IP.

Can't port forward? (CGNAT)

Some internet providers, especially mobile and 4G/5G home broadband, share one public address between many homes ("CGNAT"). Port forwarding can't work then. Options: ask your provider for a public IPv4 address, use a tunnel like playit.gg, or use Tailscale or ZeroTier so friends join a private network with you.

My public IP keeps changing

Most home connections change their public IP now and then. A free dynamic DNS name like DuckDNS gives you an address such as myserver.duckdns.org that always points to your current IP.