Minecraft Connection Refused: How to Fix (2026)

Published on

Fix 'Connection Refused' and 'Can't Connect to Server' errors in Minecraft. Covers ports, firewalls, IP issues, and network setup.

Written by Jochem – Infrastructure Expert – 5-10 years experience in game server hosting, VPS infrastructure, and 24/7 streaming solutions. Read author bio →

Minecraft Connection Refused: How to Fix (2026)

Minecraft connection refused fix

"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:

  1. Log into your router (usually 192.168.1.1)
  2. Find Port Forwarding settings
  3. Forward external port 25565 to your PC local IP on port 25565 (TCP)
  4. 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?

  1. Test locally first (connect with localhost)
  2. If localhost works but remote does not: firewall issue
  3. If localhost does not work: server issue
  4. Use telnet yourip 25565 to test port connectivity
  5. Check logs/latest.log for binding errors

Skip networking issues. View Minecraft Hosting Plans

Jochem

About the Author

Jochem – Infrastructure Expert – Expert in game server hosting, VPS infrastructure, and 24/7 streaming solutions with 5-10 years experience.

Since 2023
500+ servers hosted
4.8/5 avg rating

I specialize in Minecraft, FiveM, Rust, and 24/7 streaming infrastructure, operating enterprise-grade AMD Ryzen 9 hardware in Netherlands datacenters.

View my full bio and credentials →

Start Your MC Server Now Today

Join content creators worldwide who trust our Minecraft infrastructure. Setup is instant and support is always available. Start from €0.90/mo (Dirt) or €2.70/mo (Coal) and go live in minutes.

Minecraft Connection Refused: How to Fix (2026)