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:
    upload_2019-3-31_16-23-30.png

    In my case, my redirected IP/Port is: 0.tcp.ngrok.io:10986

    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 serveo.net 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):
    #!/bin/bash

    while true;
    do
        ssh -R xxxxx:localhost:25565 serveo.net
    done
    The reason why I use a forever loop is that serveo.net 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/script.sh
     
    #1 Zastrix, Mar 31, 2019
    Last edited: Apr 14, 2019
    • Useful Useful x 1
  2. Strahan

    Benefactor

    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. (serveo.net) Go to cmd and type for example: ssh -R 8888:localhost:25565 serveo.net with that you can join to game by using serveo.net:8888 but if you want custom domain do: ping serveo.net in cmd. Copy the numeric ip (something like 000.000.000.000) Now go to freedns.afraid.org 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 uk.to you will be abled to make servername.uk.to) 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 myserver.uk.to. Then for the destination paste the numeric ip that you got from *ping serveo.net*. Now do the human verification and press save. After this you can connect to myserver.uk.to:8888 And there you have it!


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

    Benefactor

    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.