Problems connecting to my Minecraft Server

I have openend a minecraft server for my friends and I, but I have an issue. Anyone with a different IP can connect (tested by connecting via Mobile Data Tethering on my phone), but anyone with the same public IP address as the server cannot connect (tested on different computers/ports with different IPs (such as public IP and the server's IP)) (if it's any use, the error when I try to connect is: io.netty.channel.AbstractChannel$AnnotatedConnectException: Connection refused: no further information). I have tried restarting the router, as well as the server and I have no different outcomes (and yes, I do have my server open).

Note: I did read similar posts to mine, but none of them seemed to be able to help me out.


I don't know how you managed to get multiple computers with the same IP address (it's certainly possible, but unlikely to happen accidentally), but that is very likely the issue. IP addresses are used to select which computer to send a package to via the internet, so your two computers might get packages they didn't request and not know how to handle them or they might not get packages that they requested and either wait for them forever or show an error message.

You should never have two computers with the same IP address connected to the same network (like the internet), this will always lead to various issues, some of them might be very hard to debug.