NotesWhat is notes.io?

Notes brand slogan

Notes - notes.io

Hosting a Minecraft Server Without Extra Hardware

I want to play Minecraft with my friends, and I already have a server exposed to the internet. My server isn't powerful enough to run a Minecraft server instance. However I do have a spare, powerful laptop that can take 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 spin up an Minecraft server with an IP address that is public? The answer was yes-and I was pleasantly surprised by how easy it was. Plus the server is accessible and the latency was lower than trying random "free hosting" services.



Halfway with Tailscale



I already use Tailscale on all my devices, so when I spin up an Minecraft server instance on one device I can connect immediately to it from my other ones. My friends do not have Tailscale yet! ) and so node sharing isn't in the picture for the moment. Tailscale still lets me take advantage of Tailscale. My laptop will always have an IP that is relative to my server, and the server will always be an IP that is connected to the public internet. Arttalk.Net So altogether the connection will be reliable and I won't need to resort to any dynamic shenanigans.



Let's test the theory.



Let's test whether Minecraft recognizes it when I enter the Tailscale IP...



It has been an enormous success! Now we only need to make it available to the world wide web.



Iptables to the rescue!



In essence, iptables lets you to set up the rules of the Linux kernel firewall. It's really simple. The user creates tables and when a packet arrives it is passed through a chain of rules that are in the tables. You are able to pass the packet through basically any treatment you want. Java edition Minecraft servers use TCP port 25565.



NixOS configuration



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



Creating the rule



We are now able to add the following commands to our firewall setup. Let dest_ip represent the Tailscale IP address of the server. The first command creates an order to the PREROUTING chain. This is where the packets arrive before they are processed. The process basically forwards the packet over to the laptop indicated by the IP address provided by Tailscale. The second command lets the source IP of packets remain the same, which means the server acts only as a router.



We now have the following configuration.



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



Final touches: A DNS record



An A record was added to my configuration in order to give people an attractive URL instead of an IP address.



Performance



It's extremely fast! My friends and I were able to play on the proxy server, which is located on the East coast. The Minecraft server is located on the West coast. I was able to pin players through the connection, and latency was acceptable (77 milliseconds for those who is from New York).



Refer to



Xe's article on Tailscale, NixOS and Minecraft inspired me to write this, however, my requirements were different. I didn't want to require my friends to install Tailscale to play on my server, and also wanted to make use of the hardware I had access to, making my server as a crappy router.


Homepage: https://arttalk.net/
     
 
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.