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.
  3. Dude that is the most stupid way to do it... You can just use ssh. ( Go to cmd and type for example: ssh -R 8888:localhost:25565 with that you can join to game by using but if you want custom domain do: ping in cmd. Copy the numeric ip (something like Now go to and make an account. After you have logged in press registry from the left side tab. Then select one of the domains that is public. (for example if you choose you will be abled to make After you have selected the domain thing u will see window with things like: Type Subdomain Domain and Destination. Leave the type to A. Change the subdomain to anything you want to. for example if you typed myserver there your domain would be Then for the destination paste the numeric ip that you got from *ping*. Now do the human verification and press save. After this you can connect to And there you have it!

    i am probably going to make tutorial in youtube for this*
    • Useful Useful x 1
  4. Strahan


    That's good for a free domain, but doesn't address the point of his post - hosting without forwarding. Just setting up a domain will do nothing with regards to not having to forward.
  5. Can you explain how to use an SRV record with ngrok? I can't find an answer. Thanks