Direct answer

Connection refused usually means the client reached the target device, but there was no Minecraft service accepting the connection on that address and port, or a firewall/device actively rejected it. Start by proving that the server is running and listening on the expected port.

Refused vs. reset

“Connection refused” is an initial endpoint/listener/rejection symptom. “Connection reset” is a different case where an established or in-progress connection is forcibly closed.

Check the server console first

Wait until the server finishes startup. If it exited, solve the startup error before touching your router. Confirm server-port and keep server-ip blank for a normal single-server host.

server-ip=
server-port=25565

Check whether the port is listening

On Windows, netstat can show listening TCP ports. Replace 25565 if you changed the Minecraft port.

netstat -ano | findstr :25565

On Linux, a common equivalent is ss -ltnp. If nothing is listening on the Minecraft port, fix the server/startup configuration before testing port forwarding.

If localhost works but the public address is refused

Targeted diagnosis: A refused TCP connection usually means the destination responded but no service accepted the connection on that address/port. Check whether the Java server finished starting and whether server-port points to the intended listener.

Now the Minecraft process itself is healthy. Check that the router forwards the external TCP port to the correct LAN IP and port, and that the host firewall allows the traffic. A changed DHCP address can silently break an old forwarding rule.

Fix and verify: From the server machine, inspect listeners with ss -ltn (Linux) and test the hostname and actual port from a different network. For Bedrock or Geyser, distinguish UDP gameplay from Java TCP; a TCP port test does not prove a Bedrock UDP listener is working.

Do not put the public IP in server-ip

Paper documents server-ip as the local IP address to bind to and says leaving it blank binds to all interfaces. A public internet address normally does not belong there. A wrong value can cause startup binding failures or make the server listen on the wrong interface.

Official references

These references were checked while preparing this fix. Version-specific behavior can change, so use the project documentation for your exact release when a detail differs.

Was this article helpful?
Help us improve this article

Tell us what is missing, unclear, outdated, or incorrect. You can also suggest something we should add.

What could we improve?
Do not include passwords, server IPs, or other private information.0 / 1000