Hosting a Minecraft server behind a router


As Minecraft became more and more popular a plethora of server hosting solutions began to appear. Unfortunately Minecraft is a hungry resource eater, and even for about 10 players it requires quite a beefy computer with lots of RAM. Needless to say, the cheapest solutions of hosting are often disappointing, while those that provide lots of slots have ridiculous slots.

But what if you have a beefy computer and good connection? Well, you could host your own server then! It might not have 99% uptime, but for some fun sessions with your friends it proves to be more than enough.

Oh, but you have a router… it matters not! I’m sure you heard about port forwarding. Now, I’m not sure if this is a 100% proof solution if you’re on a DSL connection, and it also depends on how well a router can be configured, but I assume that this is basic stuff every router should have.

So normally you can connect to a minecraft server even if you’re behind a router, but that’s because YOU are the one who is requesting this connection. This matters because in reality you only have one IP address assigned by your ISP, but every device that connects to the internet must have its own IP. That’s the job of the router: it acts like a gateway  between your devices and the internet. So for example, your computer can access any server in the world, but if somebody from that world were to knock to your door, it would only see the router. Thus, any request of connecting to your server gets discarded at the door. Isn’t that a waste?

Luckily, there’s port forwarding. In plain english, it’s kind of a doorman who points at some room and tells the guest: ” You should go to that room”.

How do you do this? It depends on the router, but on most of them this can be solved in a similar way. I currently have a Cisco Linksys router, so here’s how I did it:

Open a browser and type this in the address bar: 192.168.1.1 (this is true on most routers). It will show you a login screen. On most(if not all) devices the access and password are both admin.

Now, before I go any further, I should also tell you about DHCP. This is essentially a procedure through which your router automatically assigns IP adresses to your LAN devices (you know, those 192-starting addresses). This is something good, but can confuse the router in the long run if you start playing with port forwardings. It is possible to to assign a FIXED address to the computer you are running the server on.

For me, all I had to do was go to Setup>Basic Setup>DHCP Reservation. From there I could assign a fixed IP to the computer I would use as a Minecraft server.

ciscofixedIPNow that we took care of this, let’s finally deal with the port forwarding. The default port for a Minecraft server, if you don’t change it, is 25565.

I went to Applications&Gaming>Single Port Forwarding.

There I simply added a new entry called “Minecraft” and put 25565 for both internal and external port, and selected “Both” for the type of ports( although on the minecraft wiki I read that TCP is sufficient).

portforward

Done! It should now work. To connect to your own server, find your address by googling “my ip” or something like that, and then type in the prompt yourIPaddress:25565.

Easy, wasn’t it?

 

 

 

Advertisements

5 thoughts on “Hosting a Minecraft server behind a router

    1. It’s all right :). Thank you. That’s a crazily comprehensive tutorial you’ve got there. If I’ll ever want to test a Minecraft server under Linux, I’ll check this.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s