Step 1: give the server PC a fixed local IP
Routers hand out local addresses that can change after a restart, and a forward pointing at the old address silently stops working. In the router settings, look for DHCP reservation or static lease and reserve the current local IP for the server PC. You can find that IP by running ipconfig on Windows.
Step 2: create the forwarding rule
Open the router admin page, which is usually at 192.168.1.1 or 192.168.0.1, or printed on a sticker on the router. Find the section called Port Forwarding, Virtual Server or NAT, and add a rule.
- External and internal port: 25565
- Protocol: TCP for Java Edition (for Bedrock or Geyser, forward the Geyser port, default 19132, over both TCP and UDP)
- Destination: the local IP you reserved in step 1
- Save, and restart the router if it asks you to
Step 3: allow Java through the firewall
Windows Defender Firewall usually asks the first time the server starts; allow access on private networks. If you missed that prompt, add an inbound rule for TCP port 25565 in Windows Defender Firewall with Advanced Security. Third-party antivirus suites sometimes have their own firewall that needs the same rule.
Step 4: test it from outside
Start the server and ask a friend on a different network to connect to your public IP, or use an online port checker while the server is running. Testing from inside your own network with the public IP can fail even when everything is right, because many routers do not support connecting to themselves that way.
When port forwarding cannot work
If the WAN address shown in your router does not match the public IP that websites report, your provider uses carrier-grade NAT. Your connection shares a public address with other customers, and forwarding on your router cannot help. Some providers will give you a public IP on request; otherwise you need a tunnel service or a hosted server.
Also consider what you are exposing. Port forwarding publishes your home IP address to everyone who joins, and the server only runs while your PC is on. A hosted server such as StormNodes needs no forwarding at all, keeps your home IP private and stays online when your computer is off.