AlexProgrammerDE / balena-minecraft-server

Build a Minecraft Server using a Raspberry Pi 4! Supports common Servers, SCP, RCON and Wifi Connect.
Apache License 2.0
199 stars 67 forks source link

Can't connect to the minecraft server via WinScp outside of the LAN #34

Closed MadMowgli closed 4 years ago

MadMowgli commented 4 years ago

Connection timed out So we've set up a balena minecraft server on a Raspberry Pi 4 (8Gb RAM), went for the dev-OS installation, connected smoothly to both the gameserver as well as the scp-server, took the Pi to it's new location where it's meant to stay and connected to both servers again without any problems. Through out all those connections we always were in the same local network as the Pi itself.

Now when we try to connect to the scp-server from home, without being in the same LAN as the Pi, WinScp is searching for the host and gives us a Connection timed out error as shown below.

SearchingForHost ConnectionTimedOut

The IP-adress is blended out, since we're trying to connect over the external server IP. As soon as we WinScp-connect over the local network, sitting right next to the Pi and using the internal IP, we can connect without problem. So, what are we doing wrong?

What we've tried

Raspberry Pi (please complete the following information):

Minecraft (please complete the following information):

issue-label-bot[bot] commented 4 years ago

Issue-Label Bot is automatically applying the label bug to this issue, with a confidence of 0.90. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

AlexProgrammerDE commented 4 years ago

@MadMowgli so do i understand that right? You cant connect to the Pi outside of the network the Pi is in? You will need to port forward the port 22 on the Pi and use the public ip to connect to it through the web.

MadMowgli commented 4 years ago

Yes, that's right. I can't connect to the Pi outside of the network the Pi is in! Okay, so I need to set up port forwarding on the Pi itself? So basically I forward all incoming traffic from port 22 to port 22? Do you know the linux commands for it?

AlexProgrammerDE commented 4 years ago

@MadMowgli no. The Pi is good. You will need to allow the port in the router. And use the public ip of the Pi.

MadMowgli commented 4 years ago

Will give it a try. Should I forward all the ports minecraft uses? Like: 25565, 25575, 22

AlexProgrammerDE commented 4 years ago

@MadMowgli no port 22 is all you need for SCP. But if you want to play from somewhere else then forward the other ports too.

MadMowgli commented 4 years ago

Worked just fine. Forwarded all the ports, now i'm able to connect to all the services. Huge support, 10/10 would recommend.