System Information
Field |
Value |
Operating System |
Linux - Ubuntu 24.04.2 on x86_64 |
Product |
AMP ‘Phobos’ v2.6.0.12 (Mainline) |
Virtualization |
None |
Application |
Minecraft |
Module |
MinecraftModule |
Running in Container |
No |
Current State |
Ready |
Problem Description
Issue
I made an instance using the BigChadGuys Plus modpack and started it up no problems. I am able to connect to the server no problems after adding it to my server list. However, when my friends try adding the server, they just get a cannot connect message when pinging the server. The address I sent was the one under Connection Info next to Primary Endpoint on the status tab.
Reproduction Steps
- Add server to list
- refresh list
- get cant connect message
What’s the exact error they get, and is there an error in the log?
Also, make sure that you have things port forwarded correctly and that you’re giving them your public IP, and not the local IP of the AMP install.
When they’re on the server list they get “Can’t connect to server” and if they try joining they got “Failed to connect to the server connection timed out: no further information” (as seen in the screen shots provided)
. I dont have the know hows of networking so I’m pretty oblivious to what I’m doing. How do I know if I’m giving them the public IP vs the local IP? As for the portforwarding, is there a knowledgebase or a recommended guide on how to do it?
The local IP would be the IP that you use inside your local network to access the server, SSH, or similar.
Your public IP is the IP that your router has when communicating with other things on the internet.
Port forwarding is outside the scope of AMP, to find a guide you’d google your router’s model plus “how to port forward”.
Port forwarding is taking a local IP and port, and exposing/forwarding that through your router to a public IP and port. Eg:
Ubuntu PC on port 25565
↔ router
↔ Public IP on port 25565
(people cannot connect to your private IP addresses, only the public one)
So for port forwarding, I would want to set the internal and external ports as the game port number given under the network tab in config, right?
Exactly yeah, you don’t usually need to forward the other ports (some games have more ports however)
Okay, so I forwarded the port. The thing that I’m still a bit confused about is where exactly to find the IP needed for everyone to connect to the server. If I’m understanding correctly, I need to give them the local IP of the server? If so, how do I find that ip?
The local IP is for if you’re connecting in that same network using ethernet or wifi. (local IPs are not unique, so they can’t be used for public connections)
You give them the public IP, which you can get by googling “what is my IP”
I looked it up and got my public IP, however it still isn’t working. Is there anything I need to change in the network tab for the instance or should that public IP just be working assuming I port forwarded correctly?
If you can connect locally it should be working if the port forward is correct.
Check to see if the WAN IP in your router starts with 100
, or if it matches the public IP that you found. Some ISPs use something called a CGNAT, where you share a public IPv4 address and can’t port forward.
There’s also a site here that would tell you if the server is visible, as there are also situations where routers don’t allow you to connect to your own public IP.
https://mcsrvstat.us/
From my understanding the WAN IP is the sane as the public IPv4/6 IP’s that I can see in my router’s details, is that right?
Usually yeah, each router is different, so it might be named slightly different.
Assuming that it’s the same with my router, the IP I get when looking at my router and when I look up my public IP match. It does not start with a 100, is that significant in any way?
That’s good yeah, if it starts with 100, that usually indicates that you’re behind a CGNAT and can’t port forward (not fun).
Maybe give the port forward a sanity check for any typos, you should have either 25565 TCP
, 25565 Both
, or 25565 TCP/UDP
listed in your port forward config. (some routers display things slightly different, MC uses TCP for game traffic and UDP for some non-essential query information)
Out of curiosity, does it matter if the port is 25565 or can i be a different combination? Reason for asking is I tested it with a vanilla server that was using 25565 as the port and it worked, but the modded server I’ve been trying to get working used 25569 instead and wasn’t working.
It shouldn’t matter as long as you’ve added a port forward for each MC server port that you want to expose to the public (I probably should’ve mentioned that earlier), and as long as you can access it locally from another machine you know the port is open in the Ubuntu firewall
I’m a tad baffled about that now, I deleted the vanilla instance using port 25565 and set the modded server’s port as 25565 and it is now working according to mcsrvstat. It wasn’t working with 25569 as the port though, even though I had it port forwarded correctly. Could there be any specific reasoning behind that? And also a HUGE thank you for all the assistance, I was losing my mind trying to figure this out by myself.
That’s quite odd yeah, same sort of port forwards and all that for the other servers right, and when joining the server you tested with WhateverIP:25569
?
Same configs for port forwarding on both servers, I dont recall if i tested with with WhateverIP
with the port at the end though. The only IP’s I tried were the local IP from AMP (which obviously didn’t work) and then when using mcsrvstat to check I just used the public IP itself. Never added the actual port numbers to the end at any point in testing. Could that have been one of the issues along the way?