Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have set up a Minecraft server and have built lots of things, now I want my friend to play on it too.

I'm hosting it on my home computer and don't want to have to set up a new server elsewhere so I need to allow my server to be accessible over the internet.

How can I make this server available for my friend to connect to over the internet?

share|improve this question
3  
This question is only marginally about Gaming; the only gaming-relevant bit about this question is knowing that Minecraft uses port 25565 by default. Migrated to Super User, where more general networking problems are on topic. –  badp May 8 '11 at 9:44
add comment

migrated from gaming.stackexchange.com May 8 '11 at 9:45

This question came from our site for passionate videogamers on all platforms.

1 Answer

Here's what the scheme of things probably looks like:

┌───────────┐             ┌────────┐           ┌────────┐             ┌──────────┐
│ Your      │192.168.0.2  │ Your   │82.15.X.Y  │ Friend │192.168.0.1  │ Friend   │
│ computer  ├─────────────┤ router ├───────────┤ router ├─────────────┤ computer │
├───────────┤  192.168.0.1└────────┘  78.13.Z.T└────────┘  192.168.0.2└──────────┘
│ Minecraft ├ Port 25565
└───────────┘

└───────────────────────────┘ └───────────────────┘ └────────────────────────────┘
      Your home network           Teh Internets            Friend home network

Your minecraft server is listening is listening on port 25565 of your home computer, 192.168.0.2. However, this is a private address that only makes sense when connected to your router. Each router has its own private addresses, which means that your computer can be on 192.168.0.2, your friend computer can also be on 192.168.0.2 and everything is still okay.

To connect to you, your friend needs the IP address your router is connected to the internet with. Your ISP (more or less) dynamically assigns this number to you and it's what those "what is my ip" sites show to you. So, to your friend, you're 82.15.X.Y, and that's what he will enter on Minecraft.

However, 82.15.X.Y is not your computer, but your router. Your router doesn't know what to do with connections to that port and rejects the connection. What now?

Your router needs to know that, if he sees attempts to connect to port 25565 (Minecraft servers' default listening port), he should forward those connections to the computer on address 192.168.0.2 — this is port forwarding.

To make port forwarding work, you need two things:

  • A static IP address in your home network. You can get this by configuring static allocation DHCP, so that your computer* always gets the same IP address (say, 192.168.0.200).
  • The port forwarding information (forward all connections to port 25565 to 192.168.0.200).

The exact configuration process depends by your router make and model. Sites like portforward.com have extended guides to get this working.

* or, more accurately, the MAC address of your computer's network card.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.