NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

Hosting a Minecraft Server Without Extra Hardware

I want to play Minecraft with my buddies, and I already have a server exposed to the internet. However, my server is severely underpowered and is not able to run an actual Minecraft server instance. On the other side, I have a spare beefy laptop that is able to handle the load, but port-forwarding isn't possible. Both the server as well as the laptop are connected to my Tailscale network. Could I use all this to create a Minecraft server with an IP that is public? Yes, and I was pleasantly surprised by how simple it was. The server is extremely user-friendly, and the latency was lower than other "free hosting" services.



Halfway to Tailscale



I have Tailscale on all my devices, so of course when I start an Minecraft server instance on one device I can connect immediately to it from all my other devices. However my friends do not have Tailscale (yet! ) So node sharing isn't in the picture for now. 30tt However, I still have the advantage of Tailscale by ensuring that my laptop will always have a static IP in relation to the server and the server will also have a static IP to the internet's public. The connection will be stable and I won't have to make use of dynamic shenanigans.



Let's try the theory.



Let's test whether Minecraft can recognize it if I type in the Tailscale IP...



It has been a huge success! Now we only need to make it available on the internet for all to see.



Iptables to the rescue!



iptables essentially lets you configure the rules of the Linux kernel firewall. It's really simple in its terms of. The user defines tables , and when a packet comes in it is passed through a chain of rules within the tables and you can send the packet to any treatment you want. Java edition Minecraft servers utilize TCP port 25565.



NixOS configuration



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



The rule is designed



We can now add the following commands to our firewall configuration. Let dest_ip represent the Tailscale IP address of the server. The first command adds a rule the PREROUTING chain that is the place where packets arrive prior to being processed. The packet is then routed to Tailscale's IP address. The second command allows the IP address used to send packets remain the same, so the server is only acting as a router.



We have now the following setup.



Now, we rebuild the server configuration and test it again in Minecraft using the public IP. Everything works exactly as was expected!



Final touches: a DNS record



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



Performance



It's extremely fast! 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 players via the connection, and the latency was not too bad (77 milliseconds for a player who is from New York).



References



This post was inspired by Xe's article about Tailscale, NixOS, and Minecraft. However, my requirements were different. I did not want my friends to install Tailscale in order to play on my server. I wanted to make use of the hardware I already had, essentially making my server a router.


Read More: https://30tt.com/
     
 
what is notes.io
 

Notes is a web-based application for online 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 14 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.