User avatar
XenoBaby
Posts: 16
Joined: Sat May 05, 2018 12:40 am

Problems with port forwarding to my RPi Minecraft Server

Wed Jun 12, 2019 3:23 am

This morning, I decided to give an attempt at creating a Minecraft Bedrock Edition server on my RPi 3B+ a second go. I am using Nukkit, not emulating x86_64 to use the official Bedrock server hosting software, as it is incredibly slow, and was quite a complicated process to set up. I followed the direction at:

https://pimylifeup.com/raspberry-pi-min ... pe-server/

I successfully set up a local server on my Pi for Bedrock, however the end goal was to create a server for me, and my friends, not just my family at home. The first time I attempted this one year ago, I was using an AT&T Wi-Fi router, however, any attempts made following instructions at:

https://pimylifeup.com/raspberry-pi-port-forwarding/

were completely useless. I now use an xFinity router, which, looked completely different, so I though it could work on a different router. I soon found out though, that port forwarding is still dysfunctional. I came here to see if anyone else has successfully port forwarded to a RPi 3B+ on an xFinity router, and if any of your knowledge would help.

For the "Common Service," I just have it set to "Other." After researching all the services I didn't recognize, I saw that, from my knowledge, the services didn't have anything for server hosting. I have the "Service Name," as "Nukkit," not that it really matters. For the "Service Type," I just have at the default of "TCP/UDP." I should probably mention that I really don't have much networking knowledge, so if I leave anything important out, please just ask me and I'll try my best to produce an answer. I'm forwarding the 19132 default port for Minecraft. I have that set as both the "Start Port," and the "End Port." I am not revealing my RPi's IP address, as I don't see why you would need except for some malicious intent. I can say that for the server, the IP address used to connect to the server is the same as my RPi's IP address. On top of the IPv4, I also added the IPv6 to see if that would help out, it did not.

Just in case I didn't say it, the server works fine at home on my private network, however, the goal is to create a server on my RPi using Nukkit using the above instructions, that can be accessible from pretty much anywhere with Minecraft and an internet connection. Thanks for any help you guys may be able to give me.
Check out my YouTube at:

www.youtube.com/xenobaby

klricks
Posts: 6445
Joined: Sat Jan 12, 2013 3:01 am
Location: Grants Pass, OR, USA
Contact: Website

Re: Problems with port forwarding to my RPi Minecraft Server

Wed Jun 12, 2019 4:36 am

Verify that your ISP is not using CGNAT. (Put you behind a local router at the ISP).
Check the Internet IP shown in you routers status page. If this address is in a private IP range such as 192.168.x.x or 10.x.x.x, or 172.16-31.x.x then it will be impossible to port forward or run any type of server.

Or try:

Code: Select all

traceroute 8.8.8.8
There should not be any private IP's past the 1st hop.

Note that most wireless broadband ISP's use CGNAT.
Unless specified otherwise my response is based on the latest and fully updated Raspbian Buster w/ Desktop OS.

User avatar
XenoBaby
Posts: 16
Joined: Sat May 05, 2018 12:40 am

Re: Problems with port forwarding to my RPi Minecraft Server

Wed Jun 12, 2019 6:03 am

klricks wrote:
Wed Jun 12, 2019 4:36 am
Verify that your ISP is not using CGNAT. (Put you behind a local router at the ISP).
Check the Internet IP shown in you routers status page. If this address is in a private IP range such as 192.168.x.x or 10.x.x.x, or 172.16-31.x.x then it will be impossible to port forward or run any type of server.

Or try:

Code: Select all

traceroute 8.8.8.8
There should not be any private IP's past the 1st hop.

Note that most wireless broadband ISP's use CGNAT.
After a little browsing, I found mixed results as to whether or not Comcast uses CGNAT. In the following Reddit post, there are comments saying that Comcast does not use it, and comments that say they do. Not really sure, but what I do know is that my RPi's IP is indeed in the 10.x.x.x range. Does your "traceroute 8.8.8.8" code have to do with getting around this? I have no idea what that code is really meant to do, as I have said, my knowledge of networking stuff is limited. I would assume that the command there is meant to reroute you to a different DNS, but I don't know why that would help. I could also be entirely wrong. A reply with confirmation on what I'm supposed to do with "traceroute 8.8.8.8" would be greatly appreciated.

Edit: Here is the Reddit post I was referring to:

https://www.reddit.com/r/HomeNetworking ... n_xfinity/
Check out my YouTube at:

www.youtube.com/xenobaby

User avatar
rpdom
Posts: 14483
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Problems with port forwarding to my RPi Minecraft Server

Wed Jun 12, 2019 6:28 am

traceroute does what it says on the tin. It traces the route between you and the destination IP address. 8.8.8.8 is one of Google's public DNS servers which will always reply to the ping that traceroute sends it. It is entirely harmless to run. It will not affect anything.

A typical traceroute session looks like this (I've hidden part of my IP addresses for privacy reasons):

Code: Select all

[email protected]:~ $ traceroute 8.8.8.8
traceroute to 8.8.8.8 (8.8.8.8), 30 hops max, 60 byte packets
 1  xxxxxx.rpdom.xxx (192.168.1.1)  0.564 ms  0.366 ms  0.418 ms
 2  * * *
 3  xxxxxxxxx.network.virginmedia.net (82.2.xx.xx)  19.531 ms  19.718 ms  19.956 ms
 4  * * *
 5  tele-ic-7-ae2-0.network.virginmedia.net (62.253.175.34)  50.945 ms  51.162 ms  51.314 ms
 6  74-14-250-212.static.virginm.net (212.250.14.74)  19.742 ms  14.657 ms  19.541 ms
 7  108.170.246.161 (108.170.246.161)  20.341 ms 74.125.242.65 (74.125.242.65)  20.113 ms  19.612 ms
 8  172.253.68.213 (172.253.68.213)  22.841 ms 216.239.57.117 (216.239.57.117)  19.893 ms 216.239.56.193 (216.239.56.193)  20.940 ms
 9  google-public-dns-a.google.com (8.8.8.8)  18.845 ms  18.166 ms  18.865 ms
It's just the first 3 or 4 lines that are important. In my case the ISP (virginmedia) is not using CGNAT, as the second address shown is a public, not private, one. If the second one had started with 192.168, or 10, or 172.16 to 172.31, it would have been CGNAT, but 82.2.x.x is fully public.

User avatar
XenoBaby
Posts: 16
Joined: Sat May 05, 2018 12:40 am

Re: Problems with port forwarding to my RPi Minecraft Server

Wed Jun 12, 2019 7:36 am

For me, I got an IP starting with 96.x.x.x But I see two different ones on lines 2 and 3. If I were to port forward to my RPi, would I have to use one of these? And if so, do I use the one on line 2 or 3?

Edit: When I try either one, it says server IP is out of range.
Check out my YouTube at:

www.youtube.com/xenobaby

User avatar
rpdom
Posts: 14483
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: Problems with port forwarding to my RPi Minecraft Server

Wed Jun 12, 2019 8:10 am

In my example, it's the 82.2.xx.xx address I would connect to externally, and in my router I would forward the ports to 192.168.1.X (the internal IP of the Pi I want to connect to).

You say the first address after your router begins with 96. That sounds like you're not affected by CGNAT, so after setting up forwarding you should be able to connect to that address externally, as long as your ISP isn't blocking any ports.

Note that you might not be able to connect to that address from inside your network as many routers don't allow connections to go out and back in again (known as "hairpinning").

User avatar
XenoBaby
Posts: 16
Joined: Sat May 05, 2018 12:40 am

Re: Problems with port forwarding to my RPi Minecraft Server

Wed Jun 12, 2019 8:55 am

After attempting to connect to the public IP, with port forwarding on, on a different network, it still fails to connect. I have the port forwarded to the private IP, and connected externally using the public IP. Any other ideas?
Check out my YouTube at:

www.youtube.com/xenobaby

User avatar
HawaiianPi
Posts: 4286
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Problems with port forwarding to my RPi Minecraft Server

Wed Jun 12, 2019 9:55 am

I run a couple of Java Edition servers, and this is how I have them configured.

Code: Select all

Service Name	External Port		Internal Port		Internal IP		Protocol
Minecraft 1.13	25001			25001			192.168.0.1		TCP	
Minecraft 1.12	25002			25002			192.168.0.2		TCP
Then, from the game I configure the server login as, xxx.xxx.xxx.xxx:25001
Where xxx.xxx.xxx.xxx = my router's external WAN IP: followed by the port number of the server.

There are online sites that can check your server status (such as https://mcsrvstat.us/). If your server shows up there but you can't connect, then your problem may be local (Firewall on client machines).
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

User avatar
XenoBaby
Posts: 16
Joined: Sat May 05, 2018 12:40 am

Re: Problems with port forwarding to my RPi Minecraft Server

Wed Jun 12, 2019 10:23 am

It seems I can't actually change the IP in the server.properties file to anything but my Pi's own IP address. If I change it to anything else, Nukkit, my server hosting software just crashes once it attempts to bind to the given IP and port, saying that there might be a server running on that port already. I remember a video where in some special situation, certain types of Wi-Fi dongles were needed because the Pi's built in Wi-Fi lacked certain functions. Is it possible the Pi's built in Wi-Fi isn't suited for this? I'm running a RPi 3B+ if it makes any difference. I'm not really knowledgeable enough on networking to be able to do anything myself, so I'm just tossing any ideas I get, as this time, I really want to get this server running properly.
Check out my YouTube at:

www.youtube.com/xenobaby

User avatar
XenoBaby
Posts: 16
Joined: Sat May 05, 2018 12:40 am

Re: Problems with port forwarding to my RPi Minecraft Server

Wed Jun 12, 2019 10:25 pm

HawaiianPi wrote:
Wed Jun 12, 2019 9:55 am
I run a couple of Java Edition servers, and this is how I have them configured.

Code: Select all

Service Name	External Port		Internal Port		Internal IP		Protocol
Minecraft 1.13	25001			25001			192.168.0.1		TCP	
Minecraft 1.12	25002			25002			192.168.0.2		TCP
Then, from the game I configure the server login as, xxx.xxx.xxx.xxx:25001
Where xxx.xxx.xxx.xxx = my router's external WAN IP: followed by the port number of the server.

There are online sites that can check your server status (such as https://mcsrvstat.us/). If your server shows up there but you can't connect, then your problem may be local (Firewall on client machines).
Keep in mind that this is for Minecraft Bedrock Edition, not the Java Edition of Minecraft, so logging into the server is actually different. You don't log in using x.x.x.x:19132, instead, those two bits are two different inputs, although, I'm sure that doesn't make a difference. I read around on the internet, and I found in order to connect to my Pi's server outside of my network, I would need to use its external/public IP address. I ran the following code to get it.

Code: Select all

curl ifconfig.me
The IP I got was the same as my router's external WAN IP, so I'm assuming your directions are definitely on the right track, however, when I try to set the server's IP in the "server.properties" file to this IP, it still fails to connect, saying a server might already be running on that port. This file also gives the option to change the port, so if that could help, what port should I change it to?

Also, If I leave the IP in "server.properties" as the internal IP, it works only on the local network, but this is the only way I can keep the server from immediately crashing. I tried connecting externally using the external IP I got from the above command, keeping the IP in "server.properties" as the internal IP, still to know avail. Got any other suggestions?
Check out my YouTube at:

www.youtube.com/xenobaby

User avatar
HawaiianPi
Posts: 4286
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Problems with port forwarding to my RPi Minecraft Server

Wed Jun 12, 2019 11:12 pm

Why are you trying to change the IP of the server?

The point of port forwarding is to connect internal and external IP addresses. The server would be on the default private IP of the Pi and you forward traffic from the external IP and port to the internal IP and port. (ex: 192.168.0.10:25565 <> 50.60.70.80:25565).

It's true I've not run a Bedrock server, but the principles of port forwarding still apply. You shouldn't need to configure the IP at all, unless you just want a fixed IP for ease of access on your local network, in which case I recommend you reserve the IP in your router's DHCP settings (it's simpler and more reliable than mucking about with static IP settings in the OS and server software).

Have you checked the documentation of the server to see what port protocols you need (Java only needs TCP)?
Can you ping the server from the external IP and port?
Have you checked the server status on a test site (like the one I linked above)?
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

User avatar
XenoBaby
Posts: 16
Joined: Sat May 05, 2018 12:40 am

Re: Problems with port forwarding to my RPi Minecraft Server

Wed Jun 12, 2019 11:34 pm

HawaiianPi wrote:
Wed Jun 12, 2019 11:12 pm
The point of port forwarding is to connect internal and external IP addresses. The server would be on the default private IP of the Pi and you forward traffic from the external IP and port to the internal IP and port. (ex: 192.168.0.10:25565 <> 50.60.70.80:25565).
So, I decided based off of this to just try again. I set the server's IP to the internal IP and connected to the server externally using my router's WAN IP and well, it worked!

I now have an up and running server! No more needing to pay ludicrous amounts of money for a server. The only money spent is on the electricity bill, but that's for my parents, so its free for me. Thanks for your help!
Check out my YouTube at:

www.youtube.com/xenobaby

User avatar
HawaiianPi
Posts: 4286
Joined: Mon Apr 08, 2013 4:53 am
Location: Aloha, Oregon USA

Re: Problems with port forwarding to my RPi Minecraft Server

Thu Jun 13, 2019 12:13 am

Glad you got it working.

How well does your bedrock server work on a Pi? How many players have you had online at the same time, and how is the lag?

My headless Java Edition 1.12.2 SMP server on a 3B+ plays pretty well for a small group with minimal lag. Most we've had online simultaneously is 4 players. Only time we really see a slowdown is going through a portal (it takes awhile for the other dimension to load). Tried version 1.13 when it came out, but that was too much for the little Pi (although I haven't tried the latest Spigot 1.13.2 builds).

My 1.13.2 "Broken Laptop" SMP server currently runs on an old Sony quad-core i7 laptop with 8GB of RAM, which is, in fact, broken (keyboard was messed up, so I just removed it and run the server headless).

Nice thing about the Pi server is that it draws so little electricity.
My mind is like a browser. 27 tabs are open, 9 aren't responding,
lots of pop-ups...and where is that annoying music coming from?

User avatar
XenoBaby
Posts: 16
Joined: Sat May 05, 2018 12:40 am

Re: Problems with port forwarding to my RPi Minecraft Server

Thu Jun 13, 2019 12:47 am

HawaiianPi wrote:
Thu Jun 13, 2019 12:13 am
Glad you got it working.

How well does your bedrock server work on a Pi? How many players have you had online at the same time, and how is the lag?

My headless Java Edition 1.12.2 SMP server on a 3B+ plays pretty well for a small group with minimal lag. Most we've had online simultaneously is 4 players. Only time we really see a slowdown is going through a portal (it takes awhile for the other dimension to load). Tried version 1.13 when it came out, but that was too much for the little Pi (although I haven't tried the latest Spigot 1.13.2 builds).

My 1.13.2 "Broken Laptop" SMP server currently runs on an old Sony quad-core i7 laptop with 8GB of RAM, which is, in fact, broken (keyboard was messed up, so I just removed it and run the server headless).

Nice thing about the Pi server is that it draws so little electricity.
My server is also running on a 3B+. The lag is more than I remembered when I created it last year, likely due to 1.11 being more resource heavy than older versions. The most notable new issue I saw from my few minutes of testing was that particles as well as items in movement were jittery and stuttery. The was also noticeable lag between when you broke a block, and when it actually disappeared. Other than that, it ran as expected.

One problem with using Nukkit however, instead of emulating the x86_64 for the official Bedrock server hosting software, is that Nukkit is very outdated. While it is still updated for support for the newest versions of Minecraft Bedrock, that's all it is. If you visit https://nukkitx.com/ you'll see features from even older versions of Minecraft Bedrock are missing. Things like redstone are not functional, only used for opening doors. Functionality is just missing. Using Nukkit for a survival server is pretty much impossible too, as mobs don't at all. They don't spawn, and if you spawn them yourself, they don't move. You just kill them.

For a creative server, it's not that bad though. As long as you're not making a redstone server, and it's just creative building and stuff, provided you don't need the new blocks from Update Aquatic and Village and Pillage, then this works just fine. Haven't had the chance to get more than just me on the server, but I assume it would be about the same as your experiences with more people online.

Now I just wait until the official Bedrock server hosting software is ported to the Pi, and I can create an up to date server without using emulation.
Check out my YouTube at:

www.youtube.com/xenobaby

Return to “Networking and servers”