VPN or virtual private network, as the name suggests, is a virtual network. It can be thought of as a virtual local area network. Despite computers being remotely located, in a VPN, they are treated as if they belong to the same LAN. The Internet is used to establish the connection between them. Normally data communication is encrypted over a VPN. Moreover, the VPN service provider will usually have the right kind of hardware (central authentication server perhaps) and software (including firewalls) to ensure that data transmitted over the network is secure. Check VPN Wiki for more details.
Some of the advantages you get by setting up a VPN for Minecraft are:-
• A private network, which can be used only by you and your trusted friends, with whom you’ve shared the network login credentials. This means, you don’t really have to bother much about griefers/hackers.
• You need not waste time and energy configuring ports (port forwarding).
• For people who use dynamic IP addresses, the VPN will usually have a fixed one assigned to your server, so you need not alter the server-ip key in the server.properties file and let your friends know about it every other time.
• Enhanced security.
The most commonly used VPN software for Minecraft is Hamachi, developed by LogMeIn Inc. It is free and easy to set up. Thus Hamachi is used for setting up a private minecraft server. An important question that may arise now is – If I share my IP address with my friends only, and never make my server public, I can always have a private minecraft server. Then why VPN? The point to note here is that, your IP address is something that is visible on the internet. When using a VPN software, you’ll be given an IP address that can be kept private. It will not be seen on the internet. Plus, with the additional security features offered by VPN software, it makes your data more safe.
Since Hamachi is a common VPN client used for setting up a private minecraft server, this article will consider the installation of the same.
For these operating systems, the steps followed are almost similar.
Step 1. Get the minecraft server installer – Download minecraft_server.jar file from the official website.
Step 2. Run the jar once – We need to run this jar file once, and then shut it down. This step is done for the creation of the properties file. Certain keys need to be set in it. Double click the jar file to start it. You might see errors in the console, but do not bother about them, as we are only concerned with the creation of the server.properties file. A few new files, including server.properties will be created in the same folder as the .jar file. Once the initialization is done, shut the server down, by typing stop at the console.
Step 3. Get the Hamachi software – Download and install the Hamachi software from the LogMeIn website. Use the download under Unmanaged.
Note:- This Hamachi software must be downloaded and installed by you (server) and all your friends who wish to connect to your server.
Step 4. Set up the network – After installing and registering with Hamachi (you will be guided step-by-step during the installation), you should be able to see a new IP address in the Hamachi screen. This is the IP address that you’ll be using for your minecraft server, and this is what you’ll need to share with your friends, who will be connecting to your server. You then need to create the network. For this, click Network. You will get 2 options. Select ‘Create a new network’. Enter the Network ID (or name of network) and password and click on Create.
Step 5. Configure minecraft server – In your minecraft folder, edit the server.properties file with Notepad (in the case of Windows) or TextEdit (in the case of Mac OS X). Enter the Hamachi IP address after the ‘=’ sign for the server-ip key. Save and close the file. You could make other changes depending on your preferences. Check the post on Server.properties file for more details.
Step 6. Start your minecraft server. For more details on creation of batch file or command file for starting the minecraft server check How to set up a minecraft server.
Step 7. Ask your friends to join – You’ll have to share the login details of the network you just created with your friends, along with the Hamachi IP address. They will need to click on Network, on the Hamachi screen, then select ‘Join an existing network’ from the options. Enter the login details and join the network. Once they are connected to your network, they can start the minecraft client, enter your Hamachi IP address, and start playing. The default port for connecting is 25565. Hence if nothing is entered, this value is taken. But in case you’ve changed this port number in your server.properties file, then your friends will have to enter your Hamachi_IP_address colon port_number, while connecting to your server. For example:- 220.127.116.11:25567
In-order to install and set up a VPN using Hamachi on LINUX, check this link – Hamachi for Linux
Get the .tgz file for your OS (32-bit or 64-bit) and check the README file inside it, for details on the installer to be used for the different distros of LINUX. The commands are enlisted too.
To check whether you’re running a 32-bit or 64-bit Linux, type uname -m at the terminal prompt. If you get x86_64, it is a 64-bit OS (kernel actually) and if you get i686, it is a 32-bit OS.
Other useful links:-
Check this forum post for steps to set up a Hamachi CentOS Minecraft server.