You set up port forwarding. Your friends can access your server from the internet. But YOU can't reach it from inside your own network using your public IP or domain name.

This is called hairpin NAT (or NAT loopback), and most routers don't support it.

The Problem

You're trying to access: yourserver.com or 203.45.67.89:25565

That resolves to your public IP. Your router sees traffic going TO its own public IP coming FROM inside the network and drops it. Router thinks "this doesn't make sense" and kills the connection.

Quick Fix: Use Local IP Instead

Access your server using 192.168.1.50:25565 (your server's local IP) when you're home.

Use yourserver.com only when you're outside your network.

Find your server's local IP:

Windows (on the server):

Command
ipconfig

Look for IPv4 Address.

Mac/Linux:

Command
hostname -I

Bookmark http://192.168.1.50 or whatever your server's local IP is.

Better Fix: Enable Hairpin NAT on Router

Some routers support this. Check your router settings.

Look for:

  • "NAT Loopback"
  • "Hairpin NAT"
  • "NAT Reflection"

Usually in Advanced > NAT settings.

If you find it, enable it. Now you can use your public IP from inside your network.

Common routers that support it:

  • Most ASUS routers (enabled by default)
  • Some Netgear (must enable manually)
  • pfSense/OPNsense (must configure)
  • Ubiquiti (usually works)

Don't support it:

  • Most ISP-provided gateways
  • Budget routers under $50
  • Older TP-Link/Linksys models

Alternative: Split-Horizon DNS

Set up your local DNS to resolve yourserver.com to 192.168.1.50 instead of your public IP.

If you run Pi-hole or custom DNS: Add local DNS record: yourserver.com → 192.168.1.50

Now yourserver.com automatically works from inside AND outside your network, going to the right IP depending where you are.

Most people: Just use the local IP when home. Simple and works.

Why This Happens

Normal traffic: Your PC → Router → Internet → Server

Hairpin attempt: Your PC → Router (sees destination is itself) → ??? (confusion)

Router isn't designed to route traffic from inside network to its own public IP back to inside network. It's a weird edge case that only self-hosters encounter.

Bottom Line

When you're inside your network, use your server's local IP (192.168.1.x).

When you're outside, use your public IP or domain name.

Or enable NAT Loopback on your router if it supports it. But honestly, just using the local IP is easier and works on every router.