NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

Hosting a Minecraft Server Without Extra Hardware

I'd like to play Minecraft with my friends, and I already have a server connected to the internet. However my server is underpowered and is not able to run a Minecraft server instance. However I do 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 on my Tailscale network. Can I leverage all of this to set up an Minecraft server with an IP that is public? It was possible, and I was surprised at how simple it was. The server is extremely user-friendly and the latency was lower than other "free hosting" services.



Tailscale Halfway to Tailscale



Tailscale is already installed on all my devices. This means that when I create an Minecraft server instance on one device, I am able to instantly connect to it from the other devices. Offtopichut.com My friends don't have Tailscale yet! ) So node sharing is not in the picture for the moment. However, I can still take advantage of Tailscale in that my laptop will always have a static IP relative to the server and the server will have a static IP relative to the internet's public. The connection will be reliable and I won't need to resort to any dynamic shenanigans.



Let's test the theory.



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



A huge success! Now we only need to expose it to the public internet.



iptables to the rescue!



In essence, iptables lets you to set the rules for the Linux kernel firewall. Conceptually it's quite simple. The user creates tables and packets are routed through the tables. 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



Now we can go ahead add the following commands to our firewall configuration. Let dest_ip be the Tailscale IP address of the server. The first command creates a rule in the PREROUTING chain. This is where the packets arrive before they are processed. We basically forward the packet to Tailscale's IP address. The second command basically lets the IP address of the packet remain the same, which means the server acts as a router.



We now have the following configuration:



We are now rebuilding the server configuration, then testing again in Minecraft, this time using the public server IP, it all works as expected!



Final touches: A DNS record



An A record was added to my configuration to provide people with an attractive URL instead of an IP address.



Performance



It's quite quick! The proxy server is on the East coast and even though the Minecraft server is on the West coast, having played for a few hours today my group of friends and I had no issues whatsoever. I was able pin people through the connection, and the latency was not too bad (77 milliseconds for those who is from New York).



Refer to



Xe's blog post on Tailscale, NixOS and Minecraft inspired me to write this, however my requirements were different. I didn't want my friends to install Tailscale to play on my server. I wanted to utilize the hardware I already had, letting my server serve as an router.


Read More: https://offtopichut.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.