Video není dostupné.
Omlouváme se.
Host A Game Server When Your ISP Doesn't Want You To - NGROK
Vložit
- čas přidán 14. 08. 2024
- Hosting a server can be difficult when ISPs use things like CGNAT or restrict access to your router settings and ports. With NGROK, we can easily host something like a Minecraft server without port forwarding.
Links:
NGROK - ngrok.com
Systemd Script - github.com/vin...
NGROK2Discord - hub.docker.com...
---------------------------------------------------
Music (in order):
"Hardware Haven Theme" - Me (tinyurl.com/2p...)
"Dog" - C418
"Moog City" - C418
---------------------------------------------------
Timestamps:
0:00 Intro
0:44 Explanation
1:42 What You Need
2:48 Getting Started
4:10 Setting Up NGROK
4:42 Running NGROK On Windows
7:40 Running NGROK On Linux
9:04 Setting Up NGROK As Service
22:30 Sending URL Updates To Discord
29:41 Closing Thoughts
Lets just talk about how much of a genius this guy has to be to even make the MUSIC for his videos himself
Definitely not a genius. I just managed to combine two of the very few skills I have into one product haha
I've heard it elsewhere, another channel I'm subscribed to, but now for the life of me I can't remember
@@HardwareHaven
Sensational.
this channel is for sure going to blow up
No
He has 20k :/
rember my name when you get the 1 mill sub button
I hope so. It's awesome. So, it deserves to.
@@IronwingTechHaven ď
Seriously, you're the best homelab/tech youtuber I've found. Slick and clean editing, calming or groovy music, and easy to understand tutorials. Very nice.
Wow, thanks! If you're into home lab stuff, maybe check out Techno Tim if you haven't
@@HardwareHaventechno tim rocks
ayyyyy ngrok, was talking to some one about this on the discord server the other day. HOWEVER there is one major caveat: the addresses that it assigns to you are not random they are progenerated. this means that if you restart your server and get a new ip you might get the ip that was assigned to some one else's server before. this means that you can get random people joining from time to time. not a big deal but be sure to whitelist the server if you don't want it public!!!!
Good point!
If anyone needs an alternative with static ips, i use playit which usually is quite well, sometimes with a little downtime.
@@msinfo32 oh nice next time im messing around on mc ill look into it
Thank you for this!! As I told you on your last video, I managed to do it on my own, but it was pretty complicated figuring everything out first so I'm glad you made a tutorial!! You did a great job, man!
Thanks!
19:51 thats a pipe, its used to pipe the output of one command as the input to another command
What’s weird is that I know what it does, just not what to call it 😂 thanks
underrated channel.
ngrock is useful for many purposes.
Oh my god, I’ve always known I could route traffic to not expose any ports on my network. But never paid a server to do it. Now, this is amazing.
Huge thanks!
There are safe ways to do that, for example network segmentation. :) For example you can create a vlan, connect your server to that vlan and set to rules. 1st Allow connection from WAN to Vlan on port xx and 2nd drop all traffic from Vlan to Lan - that's all. The difference between block and allow is that drop blocks connection quietly and block sends backk status connection rejected, so attacker knows about that firewall blocked connection... You don't even need a managed switch if your router is supported by custom firmware like OpenWRT or DD-WRT. I
@@PiotrK2022 Yes, but you'll still need to expose a port and public address to the internet and are pontentially vulnerable to attacks, port scanners, etc if your network is not secure, i.e. a lot of crap ISP routers. It's fine for a small private game server, but if you have a dedicated address, control over NAT and you're willing to spend a bit more time configuring, use something like TCPShield, it's at least better than nothing. Though I would prefer if there were more affordable services that allow more advanced configuration like L7 firewall, rate limiting, custom domains and static addresses.
@@VideoklipBG Pfsrnse router is enough for home I think. For business nxgfw with IPS/IDS and VPN gateway for remote access . 😉
@@PiotrK2022 Yeah even an old PC with pfsense or OpenWrt AP is gonna be perfectly fine for most home usecases. Add wireguard and a Pi hole to that an you're golden.
I think this is great. Getting people aware of docker and using linux at a young age is valuable if they ever want to get into a technical field.
Yeah that's a really cool point! Hadn't really thought of it like that
As usual a interresting video with something new I didnt know before. NGROK seems very interresting
You didn't even watch the full video
@@gautamjha7213 I have very little time and watch most vids at 1.5x speed and skip through em
bro your he best youtuber who never focuses on his content (TOO) much but rater more about the information he gives what a legend. I bet you are ging to blow up and you made me from making a simple mc server to making literally everything thank you.
Amazing video, although there are alternatives such at PlayIt, and Cloudflare Tunneling (I personally use PlayIt as it has lower ping for me, and even allows 6 ports controlled via a web panel, useful for if i don't have the server access at the time). NGROK sometimes is a little annoying for multiple tunnels. Just alternatives though. So this may be useful if ngrok gives you quite high ping. PlayIt is meant to have Ipv6 soon apparently.
Good to know! Thanks
yes just installed playit and can confirm the ping is much better than ngrok, thanks man also apparently the ip url stays the same
i had bad ping with ngrok to begin with but i just whacked network compression to max on the mc configs and that mostly fixed it
Can you pls give playit link I tried to google it but it shows something different pls
@@shubhamkulkarni1465 playit.gg/
Never gonna lie. You deserve more subs.
Yes, i agree
Agreed
Really glad to see the channel starting to get big! Great content! 👍
Thanks! Still crazy to me
I've been looking for this exact solution for years! Me and my buddies have been stuck with free hosting services for quite a while and we eventually had to put a halt on our server since most of us have been busy with college lately, but now that I have a bit of free time, I can finally revive the server! You have no idea what a godsend this video is to me and everyone else whose been looking for the same solution, so I want you to know that your efforts are greatly appreciated.
Hey its me again. I just wanna tell you thanks because now i can finally play along with my friends in peace without having troble with my ISP. I'll say it again you are a very great person and your video are very well made. You should have more subscribers because you do such nice video and pretty detailed. Keep going on mate you're doing great.
That’s awesome to hear! Thanks for the comment
Holly cow thanks!!! I did have to figure some stuff on my own but would have never gone so far without you! Now my old laptop is a nice mc server
Thank you, I was opening the server in ngrok with just the port number, didn't work. Had no idea I had to include the IP as well.
You a legend.
Thank you so much for this. Thank you for inspiring me to turn my old computer into a server so I can play with buddies. This was super helpful because my parents won't give me the router info to port my PC. This was so helpful.
hey I know that guy
Man, finally one that works. my ISP don't allow to do port forwarding, so I was stuck with hamachi and Aternos/Exaroton.
Thanks a lot
Glad I could help!
Try zerotier
Thank you SOOO MUCH!!!!!
I spent hours trying to figure out why my ports werent opening to then find out my ISP uses NAT and you just fixed my problems in literally 2 minutes.
Absolute Lifesaver!
It would be really neat if you could revisit this concept of hosting a game server behind cgnat, but using a reverse proxy running on a free vps such as the free tier from oracle. For example I have a local machine running my game server and tailscale, and on the vps I have nginx proxy manager with cloudflare dns and tailscale. I saw someone else who had the same setup, but without nginx, instead running velocity or bungeecord on the vps which then connects to the game server on the local machine through tailscale.
Been a minute since I watched! Glad you're still doing good! 400 to 19k! HIT THAT SILVER!!!
Thanks! It’s been crazy haha
You are amazing. I will try this; haven't yet but just the fact that there is a legitimate way to do what i've always wanted to do for years and you're showing exactly how to do it, makes me wanna thank you a million times. Once i try it and it works out, I will come thank you again. Please never delete this video!
I really like your videos about Minecraft servers. I would love to see how to put a map you have or that you find on the internet on the server!
If your isp supports upnp with cgnat you can use upnp testing tools to open ports through cgnat. This also works in double nat situations.
I'm 43 seconds in and I'm getting logmein hamatchi vibes. Those were the good old Minecraft days lol.
sudo actually stands for "substitute user do"! If there are other users on the computer, you can also use sudo to run commands as those other users, not just as root! Just figured you might want this info! 15 year sysadmin veteran here very much enjoying your journey and learning over time in the home lab space!
I thought it was “super user do”, but guess I’m wrong. Thanks!
And I’m glad you’re enjoying the journey with me. That’s the goal 🙂
@@HardwareHaven It's a VERY common misconception, I used to think the same thing, then I started using it to run commands as non-root users and was like "wait a minute, this can't stand for super user, let me Google this" :D
THANK YOU SO MUCH SO HELPFULL i have been racking my brain trying to do this stuff lol
Amazed by this...also thanks very mcuh for sharing your song..Now i can keep it on my playlist when i am studying.Btw tcp and sub netting are always confusing for me....i feel will have to try this ...this vid was in-depth amd interesting as usual
YES YES YES THANK YOU THANK YOU!!
I believe the bar is called a pipe
Another amazing video! Easy to follow. I don't have issues with port forwarding but this'll be good to save in case I have issues in the future with my isp.
Note: I think the reason why the message that appeared in the mc-url chat section had clear on the end of "The Server Changed" was because "!!" references the last command (e.g. "sudo !!" runs sudo on the most recent command in the terminal history).
This is exactly what I always needed. You saved me
that is the most slick intro
Just something to note (it is an issue I ran into): when troubleshooting port forwarding (especially on some ISP routers) use an online tool to check if your port is open, rather than trying your public IP from the same internet connection that has it. While the latter may work, the router may not support "hairpin NAT" which allows for a connection to be made to a portforwarded service from inside the same NAT using the public IP address. The portforward will still be working, just not for anyone inside the network.
Great video! Hope your channel keeps growing!
Thanks Juan!
1:58 Nazaré Tedesco meme from Brazil! LOL....
You deserve way more than 200k 🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉🎉.
Dude, you are an absolute SAINT. THANK YOU!!!!
Glad to see my ngrok suggestion on the server build video inspired you! Thanks for taking the time to work out the Docker stuff, that is awesome! I've manually added the ngrok address to my dynamic DNS domains but never bothered to make it automatic. One of my servers is on a UPS so rarely has to reboot so I can usually just use the consistent ddns address (for example .ddns.net) to get to the server.
Perhaps you can make another video expanding on the "ngrok2discord" idea and automatically update the dynamic DNS info with the current nrgok address? I haven't tried that hard but so far wasn't able to figure out how auto update my ddns automatically with the unusual syntax ngrok uses for the address but it will work if you do it manually.
Unfortunately I don’t think ddns works with tcp traffic, only http traffic. There’s a good chance I might do that with something like a simple website of something though!
That's right, forgot about that. the application where I've linked ngrok to my ddns is an https application. be interested in what you come up with.
Oh man I was thinking about making something like this but instead for Project Zomboid, clearly never got it to work mostly due to the fact that ngrok only supports the TCP protocol while Project Zomboid requires both UDP and TCP I believe. I was planning on integrating a Discord bot myself to post the new server IP every time but again this boat sunk before it even sailed.
Minecraft most definitely works though! Great video man!
Check out playit.gg! And thanks!
I LOVE YOU SO MUCH 8 hours worth of time to find this
This is exactly what I needed. My ISP remotely disabled IPv4 NAT on my modem, and its IPv6 equivalent would require disabling the entire firewall. I had thought of a similar solution, but never had the time to implement it. So thank you -- and fuck Vodafone.
Or alternatively you can purchase a cloud server (VPS) and host the server on that.
18:13 you accidentally leaked your Ngrok auth token, it showed for 1-2 seconds which is long enough to pause the video and get the token
You just not earned a subscriber but also my respect bro. And the docker container you made can be way too useful in many ways not only for Minecraft server, basically by this method you can put online any server you want publicly.
continue your content! It is awesome!!
Surely good content! You've interested me in nas/minecraft server build. So Im waiting for windows tutorial for ngrok
I didn't understand anything but i've enjoyed it! Thanks 😊
nice video bro!
btw you forget to blur at 18:13
I really want to set-up a server. All this time my friends and I would just use a VPN that allows us to play LAN if that makes sense. The benefit of this is I can have them play on the world without the host needing to open their world. Maybe someday when I can get some cheap pc parts for it. Great vid!
Have a look on local sale pages on facebook might find an old PC cheap that will get u going with a couple of friends
I hope you respond, and I've already looked it up, but what should I do when my SSH stops responding? It keeps telling me that the connection times out. It started to happen after I did the command at 10:26. Any help is appreciated!
Ngrok is very useful but it doesn't allow tunnelling big amount of data.
Have you run into issues? I’d be curious to know
Ngrok worked well but I hit my bandwith limit within a couple hours using it for free. Switched to playit but it feels laggy compared to ngrok, going to try and retry port forwarding tomorrow.
| is the pipe character, you have amazing content!
Cool that you include the errors you encounter as well
27:30 I think that it interpreted the three exclamation marks as two exclamation marks meaning prvious command, which was why it said "clear" instead of "!!" and the third exclamation mark just remained.
ive been using ngrok for a phew years works nice but instead of having people connect through the ngrok url you could setup cloudflare with a domain and just put all the ngrok info on it through an a record and srv record also a good way to keep ngrok running without having to have ssh open the whole time on windows would be to use screen that way the ip doesnt constantly change only bad thing is with the way i do it is that i have to manually do alot of stuff could make it automatic by making a script to do everything for me but i have the time to do everything myself the reason i like having a domain connected is it never changes for the people playing on ur server so they dont have to constantly change the ip to connect to the world
Look up the CloudFlare DDNS docker container, it's super easy, all you have to do is create a token that gives access to change dns, then give the container your token, should only take like 5 minutes.
Hi, can you help me doing this? I have buyed a domain
Your so intresting to watch
I love your videos! thanks for making them fun and informational!
Glad you like them!
@@HardwareHaven Hey i know this is late but for me ngrok is stuck at pinging and does not connect to my server? it used to work before do you know how i can diagnose the issue?
I now have a Minecraft server setup and I am excited to use it with my friends but I’m going out of state Friday and I was wondering if there was a way to turn on the computer while I was away without someone physically pressing the power button because I don’t want it to be constantly on. (P.S the computer is running on Ubuntu)
If you have ssh access, you can run ‘sudo shutdown’
You can change a setting in your bios that allows it to automatically restart after a power loss.
Amazing video! Keep it up.
for the issue about the ip instead of posting a link
in chat you can get a free domain from freenom and write up a script in python or bash to update the domain via cloudflares api
I’m not an expert so I could be missing something, but I don’t know how to direct traffic to a specific port like that.
@@HardwareHaven you need something called an srv record
@@MinerKingX Thanks! I'll look into that
Thank god you did this video!!!!!
Is it possible to use DuckDNS with ngrok so it resolves the DuckDNS ip to ngroks?
Have you heard of the alternative playit?
I don't know much about it but what it looks like is that's it also has a free option but then you get to keep an address
Playit
Ping high! :(
19:55 That symbol has a couple different names but I've found it's most commonly referred too as 'pipe'
ive been looking for a program like this
i love you (no homo)
Would it be fine if you make the docker/git repo for your ngrok2discord open source? I would like to share 2 of my servers to my friends and currently, I can't have my own ISP since my landlord wants us to pay for and use their internet. Hence, no portforwarding options can be done so I needed to revert back to ngrok.
I think you could even set up some way to automatically point a DDNS hostname to ngrok. DuckDNS for example lets you do it via a simple command.
How do I add UDP as the second protocol in the ngrok.yml config?
20:46 it says
"curl: (7) Failed to connect to mylocalhost port 4040 after 0ms: connection refused"
Any help please?
Make sure ngrok is running, and use localhost not mylocalhost or the local ip address of the pc running ngrok
Really nice tut
Thanks!
hey i have a problem when i try to systemctl status it makes this failure "code=exited status=1/failure " can you help me because i tried to find it on google but with no luck thanks
Did you find the solution ?
@SJG no unfortunately you can t set ngrok as service unless you pay
!!ATTENTION!! as of today some ISP's are now blocking NGROK backends/tunnels, I am not sure which ones for sure, but I know that I use T-mobile and about 7 months ago, this worked, there have been no changes to the setup and now it DOES NOT, it throws an "Unknown Host" error which basically means your ISP blocked the NGROK tunnel because the server runs and can connect, however, ONLY from the IP its being hosted on and as soon as you attempt to connect through NGROK, it fails.
Welp, I usually just use tmux and that should kept things alive in the background. But it is a very documentary video. Learned from it 😂
That’s the goal! Thanks for the comment
I am trying to use this tutorial to set up a TF2 server, it seems like it's going to work because it needs to do the same thing as the Minecraft server tutorial thing needed but with a different port, and different software
NGROCK is useful for a lot of things
To go back to your home directory, you can just use "cd" by itself without the tilde (~).
I have an idea to fix the problem of the dynamic URL generated by ngrok, and it could work. Using a No-IP hostname to redirect to a URL can solve this issue. By doing so, you will need to update the URL at No-IP every time you restart ngrok. And Thank you for introducing me to this wonderful application.
nice very nice video, I'm doing my own Minecraft server with ngrok but without this automation, but there is one problem, nobody want play on this server
I can’t help with that last part haha
that's great!
i'm playing it with my firends non stop from yesterday
but how you acces your console as developer in mc?
The 'The Server Changed clear!' message in discord happens because of shell syntax. Replacing the 'The Server Changed!!' message with 'The Server Changed\!\!' or 'The Server Changed\!' should fix it. The double exclamation mark is actually an operator in POSIX shells (i.e. bash, zsh, etc.) used to print the previous command. In this case, you used the `clear` command before running that docker instance, and in doing so added the 'clear' string to your update message.
you can use custom domain with cloudflare api and srv record to get static URL. sorry for my English ❤
I think this would work with http traffic but not tcp. I might be wrong though. And don't apologize!
@@HardwareHaven i am using cloudflare to do this. working fine for me
With NGROK? Or using the cloudflare tunnels?
Never mind, I actually read into it a bit more. That’s interesting, thanks!
thanks for all the info, it works perfect, but how do you add mods to the server?
You're videos are so great! Maybe a bit late but this "|" is called a pipe :)
I've used ngrok for awhile now, had some issues with the bedrock edition but that was because of a conflict so I change the port from bds from 19132 to another port and then set it back to the default for ngroks interface
hey ive watched many tutorials setup, im just doing windows, but when I get the unique ngrok address it doesn't allow me to connect to the server
Nice video ! i followed the "two first" about minecraft server and it finnally work perfectly. I was now wondering : will i get any advantage using an old graphic card, like a 640GT?
I wanted to host a Minecraft server but I could not get port forwarding to work in my router settings but this video made it possible and now I can Host a server across the web thx so much
The video I didn't know I needed
I have the server setup and working and I was wondering how could I implement server mods like Cobblemon/Pixelmon etc. ?
I really should be sleeping but i can't fall asleep
@hardware haven
Please upload a video for building a server for MCPE for Cracked (tlauncher)
I BEG YOU pls
Me and my friend are trying this pls
Its simple, follow his same steps if you want, and go into server.properties and set online-mode to false
@@aeter34 savior
do you have any tutorial btw
pls
@@pranavsai7748 just edit the server.properties when you are done with the server setup
this is so fricking cool
SO now ngrok asks for a debit card to validate id (like all the shit today) and EVEN VALIDATING it still asks to validate again like I did nothing.
Reminds me of using hamachi back in the day to connect to private servers
Cool video. Maybe you can try online VPN service like tailscale or zerotier on your local Minecraft server and directly skip the docker setup.
I’m trying to run a server for a game called “Unturned”, I looked it up and it says the game uses 2 ports. Is there any way to use Ngrok for it?
I set up ngrok for a Minecraft server everything was fine for about 5 days but I ran out of the data transfer out limit free account have… is there something wrong I must have done because I feel like it’s impossible to actually host a Minecraft server through ngrok for free if there sever is only accessible 5 days out of the month
unfortunately, my isp has even blocked the ngrok website and even after getting ngrok using vpn, when i run the "ngrok tcp 25565" command, my cmd just closes.