Making Minecraft server public without port-forwarding v2.0

Discussion in 'Systems Administration' started by Zastrix, Mar 31, 2019.

  1. As the name implies, I shall show you here how to make your server public without any port forwarding.

    (Note that this should be used when your router doesn't port forward and UPnP isn't working and you really don't want to call your ISP)

    Solution one:

    This is rather a simple tutorial.

    Firstly you will need to start your server on any port you want (I will use 25565 as it's the default one but any other will work as well)

    When you have your server running, you will go to NGROK and make an account and download it for your system.

    After you logged in and downloaded NGROK for your system (in this case I use Windows 64bit) use this command in the terminal:
    Code (Text):
    ngrok.exe authtoken AuthToken
    Where the AuthToken can be found here under button/section 3.

    This will connect your NGROK client to your profile. After you've done that, you will do:
    Code (Text):
    ngrok.exe tcp 25565
    (You can replace 25565 to any port your local server uses)

    When you have done that, you should get something similar to this:

    In my case, my redirected IP/Port is:

    After each time you start NGROK the IP/Port will change, so I'd recommend using an SRV record so that your clients won't need to edit the address each time.

    Solution two:

    Note that there are other SSH redirect services, it just happens that I use this one.

    Instead of using NGROK where you need to have a profile to connect and have dynamic ports, you can use SSH and without any external profiles or downloads. It has some limitations as well as NGROK so it's not an alternative to not opening your ports but it's good, again, for using it when you can't open ports (pesky dorm life).

    For this, I just make a .sh script (running on Linux)
    Code (Text):

    while true;
        ssh -R xxxxx:localhost:25565
    The reason why I use a forever loop is that does sometimes close the connection so this just (almost instantly) starts it again.

    In the script xxxxx is the public port you want to have. I displayed mine like that because if someone does take your port, you have to change it and I'm really lazy to edit my SRV records...

    I start this script with the following command (still on Linux)
    Code (Text):
    gnome-terminal -e /yourPathHere/
    #1 Zastrix, Mar 31, 2019
    Last edited: Apr 14, 2019
    • Useful Useful x 1
  2. Strahan


    Caveats: Unless you pay, you get a randomized domain at every start and a limit of 40 connections/min. Though, if your server is sufficiently decent to be busy enough to hit that limit, you likely aren't using a crutch like this heh.

Share This Page