catalogs
1.1 Server installation java environment
2. Testing of local area network (LAN) connectivity
3. Remote access to the public network
3.1 Installing cpolar Intranet Penetration
3.1.2 linux systems (support for one-click auto-installation scripts)
3.2 Creating a Tunnel to Map an Intranet Port
3.3 Testing the public network remote connection
4. Configure fixed TCP port addresses
4.1 Reserve a fixed tcp address
4.2 Configuring a fixed tcp address
preamble
This tutorial will build a java version of the local windows MC server, and cpolar intranet penetration to break through the LAN restrictions, to realize the public network environment with a small partner remote online, super simple configuration, no public IP, do not need to set up a router.
If your server has been built successfully and can be online on the LAN normally, you can directly skip to step 3, configure cpolar intranet penetration locally, create a tunnel mapping port 25565, and realize the off-site remote online.
1. Build my world server
Take windows 10 system as an example, configure the java environment and build the server.
1.1 Server installation java environment
Download java17
Select the exe file and double-click on the installer all the way through the default installation after the download is complete.
After java installation is complete, open the folder, find java, and copy down the jdk installation path, in this caseC:\Program Files\Java\jdk-17.0.5
Search in the Start menu barAdvanced System Settings
and open System Properties, clickenvironment variable
Click New System Environment Variable
- Variable name: JAVA_HOME
- Variable value: the path where the JDK is installed, in this case
C:\Program Files\Java\jdk-17.0.5
In the list of system variables, double-click the Path variable
Click on New on the right hand side and precede the variable name value with%JAVA_HOME%\bin
Click to confirm
Calibrate whether it is successful or not: Start menu bar search cmd, open the command prompt, type injavac
If the following appears, the configuration is successful.
1.2 Configuring the server
Download MC server side, the latest version of the server side can be downloaded from the official website
Download server for Minecraft | Minecraft
After the download is complete, create a new text file in the folder where the file is located
Then open this text file and enter the following information
java -Xms1G -Xmx2G -jar server.jar nogui
pause
- Xmx1024M: maximum memory allocated to the server
- Xms1024M: minimum memory allocated to the server
- server.jar: server name Make sure the server name is the same as in the directive.
Then save this text file and close it, rename it to change the suffix to .bat (windows doesn’t see the suffix by default, you can set it)
Double-click to open the .bat file, you will see a command window, after a while it will automatically close, you will see the folder has more files, find the eula.txt file and open it!
Change eula=false to eula=true and save
Open the server.properties file and make the following changes: online-mode=false (turn off genuine authentication), other changes can be made according to your own preferences. So far the server has been configured, the server settings details are in server.properties.
Re-click the .bat file to open the server.
2. Testing of local area network (LAN) connectivity
Open the My World launcher, click into the game, and select themultiplayer
strike (on the keyboard)Add Server
- server name
- Server address: fill in the local ip address + mc port number (default is 25565), such as
127.0.0.1:25565
strike (on the keyboard)fulfillment
After selecting the server you just created, clickJoin Server
The connection was successful, and the next test was to connect remotely in a public network environment.
3. Remote access to the public network
Above we realized the online in the LAN, the next we will break through the limitations of the LAN, the realization of the public network environment in the remote online, through the cpolar intranet penetration, the intranet port mapping to the public network, which will generate the corresponding public address, the public address can be through the public address of the small partners to play with the public network remotely online, do not need the public ip, do not have to set up a router, the operation is simple.
3.1 Installing cpolar Intranet Penetration
cpolar official website:cpolar – Secure Intranet Penetration Tool
3.1.1 windows
Windows system can be directly in the official website to download the zip archive for Windows platform, decompression to get cpolar installation package, and then double-click the installation package all the way to the default installation can be.
3.1.2 linux systems (support for one-click auto-installation scripts)
If your server is on linux, please refer to this tutorial to install cpolar intranet penetration
3.2 Creating a Tunnel to Map an Intranet Port
After cpolar has been successfully installed, access the cpolar web UI management interface on a browser (local port 9200 by default) in the form of [http 9200], such ashttp://127.0.0.1:9200/and log in with a cpolar account
After successful login, click Tunnel Management – Create Tunnel on the left side:
- Tunnel name: can be customized, be careful not to duplicate the name of the existing tunnel.
- Protocol: Select tcp protocol
- Local address: 25565 (my world’s default port number)
- Port type: random temporary TCP port
- Region: China vip
strike (on the keyboard)establish
After the tunnel is successfully created, the page automatically jumps to the tunnel list page, and you can see that the status is normally displayed asactive
The system is normally online.
Click on the status of the left dashboard – online tunnel list, you can see that just created a successful tunnel of my world already have generated the corresponding public address, we will copy it down, note that thetcp://
There is no need to copy, in this case3.tcp.vip.cpolar.cn:10786
3.3 Testing the public network remote connection
Launch My World and either add a new server directly, or edit the local server you just added
In the Server Address field, enter the public address generated by cpolar3.tcp.vip.cpolar.cn:10786
Click Finish
Join the server, public network remote connection success
4. Configure fixed TCP port addresses
It should be noted that the above steps use a random temporary tcp port address, the generated public address is a random temporary address, the public address will change randomly within 24 hours. In order to facilitate small partners to connect remotely, we next configure a fixed TCP port address, the address will not change, to facilitate small partners to connect remotely, without the need to repeat every day to modify the server address.
Configuring a fixed tcp port address requires upgrading cpolar to the Professional package or above.
4.1 Reserve a fixed tcp address
Log in to the cpolar website, click on Reservations on the left hand side and find Reserved tcp addresses, let’s reserve a fixed tcp address for my world:
- Region: Select China vip
- Description: i.e. notes, customizable
strike (on the keyboard)reservations
After the address reservation is successful, the system generates the corresponding fixed public address, in this case5.tcp.vip.cpolar.cn:12637
Copy it down.
4.2 Configuring a fixed tcp address
Accessing port 9200 on a browser.http://127.0.0.1:9200/To do so, log in to the cpolar web ui management interface, click on Tunnel Management – Tunnel List in the left dashboard, find my World Tunnel, and click on the right side of thecompiler
Modify the tunnel information to configure the reserved successful fixed tcp address into the tunnel
- Port type: change to fixed tcp port
- Reserved tcp address: fill in the address of the reservation success, this example is
5.tcp.vip.cpolar.cn:12637
strike (on the keyboard)update
After the tunnel has been successfully updated, click on Status – Online Tunnels list on the left dashboard, find my world tunnel and you can see that the public address has been updated to a fixed tcp address.
Test remote connection using a fixed public TCP port address
The public network remote connection was successful! Now that public address will not change randomly anymore.