Direct answer
If your public IP fails only from devices on the same LAN but external players can join, your router may lack NAT hairpinning (loopback). Use the server’s private LAN IP locally, and test the public address from a truly external network.
What it means
Home routers vary in how they handle packets aimed at their own public address from inside the LAN. Local hairpin failure does not establish that port forwarding is broken.
Practical example: Example: an outside friend connects successfully to play.example.com, but your PC at home times out on the same hostname. Before editing router forwarding, connect to the machine’s 192.168.x.x address. If that works, investigate NAT loopback or local DNS instead of changing the Minecraft server’s listening port.
If you are a player
- Use the server computer’s private IP, such as 192.168.x.x, when on the same network.
- Try the domain from mobile data instead of the same Wi-Fi.
- Record whether direct LAN and genuinely external connections work separately.
If you run the server
- Confirm the server listens on the intended TCP port and that LAN clients can connect.
- Test the public IP from a separate network to establish whether port forwarding works.
- Check the router’s NAT loopback/hairpin setting if only inside-public fails.
- For local players, provide a LAN hostname or local IP; optionally configure split DNS.
- If external connections also fail, investigate firewall rules, double NAT, CGNAT and port forwarding.
References
Use the documentation for the exact software and release you run. These sources support the settings or diagnostic behavior used in this fix.
Related fixes and guides
Help us improve this article
Tell us what is missing, unclear, outdated, or incorrect. You can also suggest something we should add.