Question Why can't anyone connect to my server outside my LAN?

Mountain_Goat1

New member
Dec 10, 2023
4
0
1
Help!
For the past two weeks I've been trying to get a Minecraft server running with PaperMC and Velocity.
Sadly, none of my friends have been able to join. This is not an uncommon problem to have;
usually the culprit is the NAT in one's router. However, I have tried everything under the sun, and
no matter what I try (also my ISP, the technicians there can't figure it out either), I just can't join my
server from outside my LAN.
Please help.
 

WildPenguin

New member
Oct 27, 2023
2
0
1
You need to tell your exact network configuration here. I.e. without the following pieces of information:
  • Your OS
  • Java or Bedrock? Do your friends understand the difference?!
  • The server subnet (and the server LOCAL address);
  • and the relevant netmask
  • Your router and/or modem model
  • Your router network configuration (firewall settings, zones, IP forwarding)
  • Your server.properties file contents copy+pasted here (remove any passwords, if any).

it is impossible to give any kind of guidance. There is no how-to which could cover all routers out there. But with the above information, someone here might have time to walk you trough it.

If providing screenshots (do use copy+pasteing text whenever possible, though, but pictures of the router UI from it's web page will be useful), bear in mind to not post any kind of private information, such as any passwords and your public IP address.

However, to self-host, you need to have a basic understanding on how networking (things such as IP addresses, subnet, netmask, gateway, ports, IPv4 and IPv6) work.

That being said - I think the tutorial in the the wiki for setting up a server is not on point but veering too much off-topic. It goes on and on about general recommendations, warnings, HW requirements, how to install Java etc. on practically any OS out there, which, strictly speaking, have nothing to do with how to set up a server (for example, JAVA could be installed for whatever reason besides running a MC server). They are requirements and were better put on a separate page IMO. For example, the port information is somewhere in a sub-section of 2nd level on the twelth main subsection.

To emphasize my point, what you need to set up a server:

  1. (assuming behind a NAT) On the router:
    1. Open and forward the required port (TCP+UDP, per default 25565, but can be changed, see below)
    2. IF some other kind of setup, the clients need to be able to access this port on the host.
  2. On the MC server (any computer):
    1. Choose how you run it (manually, by a script/batch file, timer/scheduling etc., containers?)
    2. Install it and all it's requirements in your chosen fashion.
    3. Edit server.properties

So the networking part is really simple.

EDIT: I'm not actually sure there is a tutorial which includes the networking part for PaperMC per se. I presume very few people run the vanilla server...
 
Last edited:

Mountain_Goat1

New member
Dec 10, 2023
4
0
1
You need to tell your exact network configuration here. I.e. without the following pieces of information:
  • Your OS
  • Java or Bedrock? Do your friends understand the difference?!
  • The server subnet (and the server LOCAL address);
  • and the relevant netmask
  • Your router and/or modem model
  • Your router network configuration (firewall settings, zones, IP forwarding)
  • Your server.properties file contents copy+pasted here (remove any passwords, if any).

it is impossible to give any kind of guidance. There is no how-to which could cover all routers out there. But with the above information, someone here might have time to walk you trough it.

If providing screenshots (do use copy+pasteing text whenever possible, though, but pictures of the router UI from it's web page will be useful), bear in mind to not post any kind of private information, such as any passwords and your public IP address.

However, to self-host, you need to have a basic understanding on how networking (things such as IP addresses, subnet, netmask, gateway, ports, IPv4 and IPv6) work.

That being said - I think the tutorial in the the wiki for setting up a server is not on point but veering too much off-topic. It goes on and on about general recommendations, warnings, HW requirements, how to install Java etc. on practically any OS out there, which, strictly speaking, have nothing to do with how to set up a server (for example, JAVA could be installed for whatever reason besides running a MC server). They are requirements and were better put on a separate page IMO. For example, the port information is somewhere in a sub-section of 2nd level on the twelth main subsection.

To emphasize my point, what you need to set up a server:

  1. (assuming behind a NAT) On the router:
    1. Open and forward the required port (TCP+UDP, per default 25565, but can be changed, see below)
    2. IF some other kind of setup, the clients need to be able to access this port on the host.
  2. On the MC server (any computer):
    1. Choose how you run it (manually, by a script/batch file, timer/scheduling etc., containers?)
    2. Install it and all it's requirements in your chosen fashion.
    3. Edit server.properties

So the networking part is really simple.

EDIT: I'm not actually sure there is a tutorial which includes the networking part for PaperMC per se. I presume very few people run the vanilla server...
Alright, just so it is clear: I have a much more than basic knowledge of networking, this is a PaperMC Java server with Velocity, and I'm running this server on Gentoo Linux (AMD64), with an AMD Ryzen 7900X and 64 GiB of DDR5-5600. I neglected to write about this in my original post since I was exhausted from trying to get the server to work correctly, and wasn't sufficiently caffeinated. The server works fine, as long as I connect to it through either my LAN IPv4 address or any of my IPv6 addresses. The problems start when someone tries to connect to it from outside my LAN, from either my global IPv6 address or my public IPv4 address. I have properly configured my NAT; I even got a technician from my ISP to check my work, and even try re-doing it, to make sure the port forwarding was set up correctly. Even with these changes, my friends (many of them have as much technical knowledge as I have) haven't managed to connect to my server, and from what I hear, they're getting either "Could not connect to host: no further information" error or the "Failed to connect to host: connection timed out" message. I will send whichever config files are needed (sensitive info removed of course). Please let me know what I should send, and thank you for taking the time to help me! I really appreciate it.
 
Last edited:

WildPenguin

New member
Oct 27, 2023
2
0
1
Alright, just so it is clear: I have a much more than basic knowledge of networking, this is a PaperMC Java server with Velocity, and I'm running this server on Gentoo Linux (AMD64), with an AMD Ryzen 7900X and 64 GiB of DDR5-5600. I neglected to write about this in my original post since I was exhausted from trying to get the server to work correctly, and wasn't sufficiently caffeinated. The server works fine, as long as I connect to it through either my LAN IPv4 address or any of my IPv6 addresses. The problems start when someone tries to connect to it from outside my LAN, from either my global IPv6 address or my public IPv4 address. I have properly configured my NAT; I even got a technician from my ISP to check my work, and even try re-doing it, to make sure the port forwarding was set up correctly. Even with these changes, my friends (many of them have as much technical knowledge as I have) haven't managed to connect to my server, and from what I hear, they're getting either "Could not connect to host: no further information" error or the "Failed to connect to host: connection timed out" message. I will send whichever config files are needed (sensitive info removed of course). Please let me know what I should send, and thank you for taking the time to help me! I really appreciate it.

As for the experience thing - good we are not on the same page. I would still point out: https://dontasktoask.com/ .

Post all the relevant information when asking problems - even things you think you have set up correctly. No one can help you with practically no information at all (as it stands) about the setup. For all we know it could be a simple TYPO somewhere which your own mind has become too used to spot it.

I would start by posting all the information I requested in my first reply. I've myself more often than not found the error/solution by compiling all information about a problem I have on the same page (when that happens, I've still posted it as a solution as someone might have the same problem).

You could also look at the PaperMC logs. There should be a line along something like: Starting Minecraft server on *:25565 - check the port is what you think it should be.

Then look at your router logs, enable more verbose logging if possible, use wireshark....
 

Mountain_Goat1

New member
Dec 10, 2023
4
0
1
My router settings:
Port forwarding for TCP on 25565 to 10.0.0.25,
firewall is currently inactive.

My IPv4 LAN address:
10.0.0.25 (static) all other addresses are dynamic.

Router/modem model:
Something from Bezeq Telecom, Broadcom-based.


server.properties:
#Minecraft server properties
#Thu Dec 14 19:52:19 IST 2023
allow-flight=false
allow-nether=true
broadcast-console-to-ops=true
broadcast-rcon-to-ops=true
debug=false
difficulty=normal
enable-command-block=false
enable-jmx-monitoring=false
enable-query=false
enable-rcon=false
enable-status=false
enforce-secure-profile=false
enforce-whitelist=true
entity-broadcast-range-percentage=100
force-gamemode=false
function-permission-level=2
gamemode=survival
generate-structures=true
generator-settings={}
hardcore=false
hide-online-players=false
initial-disabled-packs=
initial-enabled-packs=vanilla
level-name=world
level-seed=
level-type=minecraft\:normal
log-ips=true
max-chained-neighbor-updates=1000000
max-players=20
max-tick-time=60000
max-world-size=29999984
motd=Leyvi's Minecraft Server
network-compression-threshold=-1
online-mode=false
op-permission-level=4
player-idle-timeout=0
prevent-proxy-connections=false
pvp=true
query.port=25565
rate-limit=0
rcon.password=
rcon.port=25575
require-resource-pack=false
resource-pack=
resource-pack-prompt=
resource-pack-sha1=
server-ip=localhost
server-port=2445
simulation-distance=10
spawn-animals=true
spawn-monsters=true
spawn-npcs=true
spawn-protection=16
sync-chunk-writes=true
text-filtering-config=
use-native-transport=true
view-distance=24
white-list=false