Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Building Minecraft Server Modifications - Second Edition

You're reading from   Building Minecraft Server Modifications - Second Edition Create and customize your very own Minecraft server using Java and the Spigot API

Arrow left icon
Product type Paperback
Published in Dec 2015
Publisher
ISBN-13 9781785883026
Length 158 pages
Edition 2nd Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Cody M. Sommer Cody M. Sommer
Author Profile Icon Cody M. Sommer
Cody M. Sommer
Arrow right icon
View More author details
Toc

Table of Contents (12) Chapters Close

Preface 1. Deploying a Spigot Server FREE CHAPTER 2. Learning the Bukkit API 3. Creating Your First Bukkit Plugin 4. Testing on the Spigot Server 5. Plugin Commands 6. Player Permissions 7. The Bukkit Event System 8. Making Your Plugin Configurable 9. Saving Your Data 10. The Bukkit Scheduler Index

Port forwarding

Where's the fun in running your own Minecraft server when no one else can log on to it? I will now explain how to allow your friends to connect to your server so that they can play with you. In order to do this, we must first find your IP address. Just like your place of residence has a street address, your computer has an address on the Internet. This is what your friends will type into their Minecraft client to find your server. To find the IP address, simply search IP on Google. At the top of the results will be a line that states, "Your public IP address is XX.XX.XXX.XX" (the X signs will be replaced by numbers, and its overall length may be different). You can also visit www.whatismyip.com to find out your IP address.

Once you have your IP address, try using it to connect to your server rather than using localhost. If you are able to connect, then your friends will be able to do so too. If not, you will have to take additional steps to allow other players to connect to your server. This will be the case if your computer is attached to a router. We must let the router know that it should point other Minecraft players towards your computer, which is running the server. This process is called port forwarding. To do so, we will first need some additional information.

We need to know the IP address of your computer on your local network. This IP address will be different from the address that we obtained earlier. We will also need to know the IP address of your router. To find out this information, open a new command prompt window. The command prompt can be found at the following path:

Start Menu/All Programs/Accessories/Command Prompt

You can also search for cmd.exe to find it. Once the command prompt is open, type in the following command:

>ipconfig

Then, press the Enter key. A screen will be displayed, which will be similar to the one shown in the following screenshot:

Port forwarding

In the previous image, the two IP addresses that you were looking for have been highlighted. The numbers will most likely be very similar to these sample numbers. IPv4 Address is the address of your computer, and Default Gateway is the address of your router. Make a note of both of these IPs.

Next, we will log in to your router. In a web browser, type the IP address of the router, which is 192.168.1.1 in our example. If you do this correctly, then you will be prompted with a login form asking for a username and password. If you do not know this information, you can try to input admin for both the fields. If this is unsuccessful, you will have to find the default username and password, which can be found in the paperwork that was provided with your router. This information can usually be found online as well by searching for the name of your router along with the term default login.

Once we are logged in to the router, we must find the area that includes the settings for port forwarding. There exist many brands and models of routers in the world, and all of them present this option differently. Therefore, I cannot provide a specific walkthrough of how this page is found. However, you will want to look for a tab that says something that includes the terms Forwarding, Port Forward, or Applications & Gaming. If you do not see any of these, then expand your search by exploring the advanced settings. Once you find the correct page, you will most likely see a table that looks like the following one:

Application Name

External Port

Internal Port

Protocol

IP Address

Bukkit Server

25565

25565

TCP and UDP

192.168.1.100

Fill in the fields, as shown in the previous table. The layout and formatting will of course differ depending on your router, but the important details are that you forward port 25565 to the IP address that you found earlier, which is 192.168.1.100 in our example. Ensure that you save these new settings. If you have done this correctly, then you should now be able to connect to the server by using your public IP address.

You have been reading a chapter from
Building Minecraft Server Modifications - Second Edition - Second Edition
Published in: Dec 2015
Publisher:
ISBN-13: 9781785883026
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image