NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

Hosting a Minecraft Server Without Extra Hardware

I would like to play Minecraft with my buddies, and I already have a server that is connected to the internet. However, my server is severely underpowered and cannot run an actual Minecraft server instance. However I have a spare, powerful laptop that is able to handle the load. Port forwarding is not possible. Both the server as well as the laptop are connected to my Tailscale network. Can I leverage all of this to set up an Minecraft server with an IP that is public? Yes, and I was amazed at how easy it all was. As a plus the server is usable and the latency was less than trying out random "free hosting" services.



Halfway with Tailscale



Tailscale is already installed on all my devices. This means that if I create an Minecraft server instance on one device, I can instantly connect to it from other devices. My friends don't yet have Tailscale! ) and so node sharing isn't in the picture at the moment. Tailscale still allows me to take advantage of Tailscale. My laptop will always have an IP that is relative to my server, and the server will always have an IP relative to public internet. The connection will be reliable, and I won't need to use dynamic shenanigans.



Let's try the theory.



Let's test if Minecraft recognizes it if I type in the Tailscale IP...



A huge success! Now all we need is to expose it to the world wide web.



Iptables to the rescue!



Iptables basically lets you set the rules of the Linux kernel firewall. https://1gameday.com/ It's very simple in concept. The user creates tables, and packets are routed through tables. Java edition Minecraft servers utilize TCP port 25565 between the server and client.



NixOS configuration



It was easy to enable IP forwarding and add the number 25565 on my list of open TCP ports:



The rule is created



We are now able to by adding the following commands into our firewall configuration. Let dest_ip represent the Tailscale IP address of the server. The first command adds a rule to the PREROUTING chain that is the place where packets arrive prior to being processed. The process basically forwards the packet over to the laptop identified by the IP address specified by Tailscale. The second command lets the IP address of the packet remain the same, which means the server is merely acting as an internet router.



We have the following setups:



Now we are rebuilding the server configuration, then verifying it in Minecraft, this time using the server's public IP. Everything is working exactly as we would be expected!



Final touches: A DNS record



For the final touches *chef's kiss* adding an A record gave me a nice URL that I could provide to people instead of an IP address.



Performance



In terms of performance, it's pretty good! My friends and I were able to play on the proxy server, located on the East coast. The Minecraft server is located on the West coast. I was able to pin people through the connection, and the latency was not too bad (77 milliseconds for someone from New York).



References



This post was inspired by Xe's article about Tailscale, NixOS, and Minecraft. However my requirements were distinct. I did not want to require my friends to install Tailscale to play on my server, and I wanted to make use of the hardware I had access to, using my server as a basic router.


Read More: https://1gameday.com/
     
 
what is notes.io
 

Notes.io is a web-based application for taking notes. You can take your notes and share with others people. If you like taking long notes, notes.io is designed for you. To date, over 8,000,000,000 notes created and continuing...

With notes.io;

  • * You can take a note from anywhere and any device with internet connection.
  • * You can share the notes in social platforms (YouTube, Facebook, Twitter, instagram etc.).
  • * You can quickly share your contents without website, blog and e-mail.
  • * You don't need to create any Account to share a note. As you wish you can use quick, easy and best shortened notes with sms, websites, e-mail, or messaging services (WhatsApp, iMessage, Telegram, Signal).
  • * Notes.io has fabulous infrastructure design for a short link and allows you to share the note as an easy and understandable link.

Fast: Notes.io is built for speed and performance. You can take a notes quickly and browse your archive.

Easy: Notes.io doesn’t require installation. Just write and share note!

Short: Notes.io’s url just 8 character. You’ll get shorten link of your note when you want to share. (Ex: notes.io/q )

Free: Notes.io works for 12 years and has been free since the day it was started.


You immediately create your first note and start sharing with the ones you wish. If you want to contact us, you can use the following communication channels;


Email: [email protected]

Twitter: http://twitter.com/notesio

Instagram: http://instagram.com/notes.io

Facebook: http://facebook.com/notesio



Regards;
Notes.io Team

     
 
Shortened Note Link
 
 
Looding Image
 
     
 
Long File
 
 

For written notes was greater than 18KB Unable to shorten.

To be smaller than 18KB, please organize your notes, or sign in.