If you are hosting a Minecraft server, and your friends want to join it, then they’ll need the IP address of the server and the port on which Minecraft server accepts connections. Here’s how you find your IP address:-
- Click Start.
- For Windows XP, click on Run, type cmd and then click OK. For Windows Vista and 7, type cmd in the search box, and click on the cmd program that appears in the Start menu.
- Type ipconfig and press Enter.
- The IPv4 is the IP address of your system.
- Click Apple menu.
- Open System Preferences.
- Select Network.
- Select Ethernet or AirPort (which ever you’re using) from the left-hand side menu. The IP address will be mentioned here.
- Launch Terminal.
- In case you’re using Ethernet, type ipconfig getifaddr en0. In case you’re using AirPort, type ipconfig getifaddr en1
On executing the above command, you should get your LAN IP address.
- At the terminal prompt, type ifconfig eth0
The inet addr: is your IP address.
Suppose you are using a router, you will have to forward the right port (25565 by default) for allowing friends outside your network to connect to your server. They will have to use the external IP address of your router, for connecting. To find your external IP address, you can visit any website which reports it back to you, like one of these:-
Note:- Here is a tutorial which tells you how to set up remote access for computers with dynamic IP addresses. You will have to register with a provider, who will give you a name for your computer. A software-client, suitable for your OS should be downloaded and installed, which will keep the provider’s server updated with your new IP address (everytime it changes). So in case your computer is set for dynamic IP address, you needn’t bother about telling your friends about a new IP address every other time. They will simply have to use your computer’s name to connect to your Minecraft server.
Your friends will have to use your IP address and port (25565 by default) to connect to your Minecraft server. Ensure that they use the external IP address of your router, in case you have one, and have forwarded the port for Minecraft server.
For connecting from the browser, the following link can be used if you are using the official Minecraft server:-
http://www.minecraft.net/play.jsp?server=<YOUR IP>&port=<SERVER PORT>
- Ensure that you’ve entered the right value for the server-ip key in the server.properties file. The value you need to enter is the local IP address (not the external IP address of the router). In case you are playing on the same computer that the Minecraft server is running, you can simply enter localhost to connect. For any other computer on the same network, the local IP address and port can be used for connecting to the server. For someone outside the network, the external IP address of the router and port must be used. Some people put localhost as the value of the server-ip key in the server.properties file. It is recommended that you enter the right IP address rather than localhost.
- It is better to stick to port 25565 for Minecraft server. This is not a hard and fast rule, but, in case you want to configure another port, ensure that it is not being used by any other program on your system. You should be able to get a list of ports that are reserved for standard programs from the internet. You could as well check this website – yougetsignal.com, to test the status of any port on your computer. Also ensure that you enter the correct port number in the server.properties file, against server-port=. Plus, you’ll have to forward the same port in case you have a router, and let your friends know about it as well.