Minecraft Connection Refused: How to Fix (2026)

"Connection Refused" means the Minecraft client reached your IP but nothing responded on port 25565. The server is either not running, listening on a different port, or a firewall is blocking the connection.
Quick Diagnosis
| Symptom | Likely Cause | |---------|-------------| | Connection refused | Server not running or port blocked | | Connection timed out | Wrong IP or firewall drops packets | | Can't resolve hostname | DNS issue or wrong address | | Outdated server/client | Version mismatch |
Fix 1: Verify Server Is Running
Check if the server process is active:
# Linux
ps aux | grep java
# Or check the port directly
ss -tlnp | grep 25565
If the server is not running, start it. Check logs/latest.log for startup errors.
Fix 2: Check the Port
Default Minecraft port is 25565. Verify in server.properties:
server-port=25565
If you changed the port, players must connect with yourip:port.
Fix 3: Open Firewall
Linux (UFW)
sudo ufw allow 25565/tcp
Linux (firewalld)
sudo firewall-cmd --permanent --add-port=25565/tcp
sudo firewall-cmd --reload
Windows
Open Windows Defender Firewall > Inbound Rules > New Rule > Port > 25565 TCP > Allow
VPS Providers
Most VPS providers have a security group or firewall panel. Make sure port 25565 TCP is open there too.
Fix 4: Check IP Address
| Hosting Type | Connect With | |-------------|-------------| | Same computer | localhost or 127.0.0.1 | | Same LAN | Local IP (192.168.x.x) | | VPS/Dedicated server | Public IP | | Behind NAT | Public IP + port forward |
Find your server IP:
# Public IP
curl ifconfig.me
# Local IP
hostname -I
Fix 5: Port Forwarding (Home Hosting)
If hosting from home behind a router:
- Log into your router (usually 192.168.1.1)
- Find Port Forwarding settings
- Forward external port 25565 to your PC local IP on port 25565 (TCP)
- Players connect with your public IP
Or skip port forwarding entirely with Playit.gg or ngrok.
Fix 6: Version Mismatch
Client and server must be the same Minecraft version. A 1.21.1 client cannot join a 1.20.4 server.
Check the server version in logs/latest.log:
Starting minecraft server version 1.21.1
Fix 7: server-ip Setting
In server.properties, the server-ip field should be blank:
server-ip=
Setting it to a specific IP can prevent connections. Leave it empty to listen on all interfaces.
Fix 8: ISP or Network Restrictions
Some ISPs block port 25565 or restrict inbound connections. Some school and corporate networks also block gaming traffic.
Solutions:
- Use a different port and forward it
- Use a VPS instead of home hosting
- Use Playit.gg to tunnel traffic
Still Not Working?
- Test locally first (connect with localhost)
- If localhost works but remote does not: firewall issue
- If localhost does not work: server issue
- Use
telnet yourip 25565to test port connectivity - Check
logs/latest.logfor binding errors
Skip networking issues. View Minecraft Hosting Plans
