Back to Guides
TroubleshootingBeginner

How to Fix Connection Refused Error

Step-by-step solutions to resolve Minecraft server connection refused errors and networking issues.

Blockhead Support Team
10 minutes
Connection refused errors usually indicate network or firewall issues preventing clients from reaching your server.
1

Verify Server is Running

First, confirm your Minecraft server is actually running:

  • Check the server console for "Done!" message
  • Look for any error messages in the console
  • Verify the server process is active in Task Manager (Windows) or Activity Monitor (Mac)
  • Try connecting locally using localhost or 127.0.0.1
If the server isn't running properly, fix server startup issues first before troubleshooting connections.
2

Check Server Port Configuration

Ensure your server is configured with the correct port:

In server.properties:

server-port=25565
server-ip=
online-mode=true

Test port locally:

# Windows
telnet localhost 25565

# Linux/Mac
nc -zv localhost 25565
3

Configure Firewall Settings

Allow Minecraft through your system firewall:

Windows Firewall:

  1. Open Windows Defender Firewall
  2. Click "Allow an app or feature through Windows Defender Firewall"
  3. Click "Change Settings" then "Allow another app..."
  4. Browse and select your Java executable or Minecraft server
  5. Check both "Private" and "Public" networks

Alternative: Add port rule:

# Windows Command Prompt (Run as Administrator)
netsh advfirewall firewall add rule name="Minecraft Server" dir=in action=allow protocol=TCP localport=25565
4

Router Port Forwarding

Configure your router to forward traffic to your server:

  1. Find your computer's local IP address:
    # Windows
    ipconfig

    # Linux/Mac
    ifconfig
  2. Access your router's admin panel (usually 192.168.1.1 or 192.168.0.1)
  3. Navigate to Port Forwarding or Virtual Server settings
  4. Create a new rule:
    • Service Name: Minecraft Server
    • Port Range: 25565-25565
    • Local IP: Your computer's IP address
    • Protocol: TCP
  5. Save and restart your router
Router interfaces vary by manufacturer. Consult your router's manual for specific instructions.
5

Find Your Public IP Address

Players need your public IP address to connect:

  • Visit whatismyipaddress.com to find your public IP
  • Share this IP address with your players: YOUR_PUBLIC_IP:25565
  • If using default port (25565), players can omit the port: YOUR_PUBLIC_IP
Your public IP may change. Consider using a dynamic DNS service for a consistent domain name.
6

Test Connection from Outside

Verify external connectivity using online tools:

  • Use mcsrvstat.us to check if your server is reachable
  • Try Port Checker to verify port 25565 is open
  • Ask a friend to test connecting from a different network
7

Common ISP and Network Issues

Address provider-specific connectivity problems:

  • CGNAT (Carrier-Grade NAT): Some ISPs use CGNAT which prevents port forwarding. Contact your ISP for a public IP address.
  • VPN/Proxy: Disable VPN connections while hosting a server
  • University/School Networks: Gaming servers are often blocked on educational networks
  • Mobile Hotspots: Most mobile carriers block incoming connections
8

Alternative Solutions

If direct hosting doesn't work, consider these alternatives:

  • Minecraft Realms: Official hosting service with easy setup
  • Hamachi/VPN: Create a virtual LAN for small groups
  • Ngrok: Tunnel service for temporary access
  • Professional Hosting: Dedicated Minecraft hosting providers

Example Ngrok setup:

# Install ngrok, then run:
ngrok tcp 25565
Once port forwarding is properly configured and your firewall allows connections, players should be able to connect using your public IP address.

Need More Help?

Our support team is available 24/7 to help with any Minecraft server issues.