Change IP Address from command line
Open up the following file, change eth0 to your primary ethernet adapter. More info here.
and under IPADDR set it to the new IP. Update netmask and gateway if needed.
Save file and restart network
systemctl restart network
You may need to run the following to update the license on the server.
Change Server IP in WebHost Manager
Other things to do
You may need to migrate IP’s to the new address.
If you are keeping the old address on the server, then you may need to readd it through the IP Functions.
Can look here to set a certificate up in Winbox
or here to configure from command line
Enable OpenVPN server
To setup a OpenVPN server on a router there are a few things that need to be done.
- Create certificates (See top of post)
- Create IP pool for clients to use
- Configure default-encryption profile
- Create User
- Configure OpenVPN server
Create IP Pool
Create an IP pool that clients can pull and address from when they connect
Modify the default-encryptoin Profile and specify the VPN IP pool.
Create new user, specify the default-encryptio profile
Turn OVPN Server on
Enable the OVPN server. Specify the “Default Profile:” to be the default-encyption, specify the certificate to be the server-template, or whatever the name is of the certificate you created.
The network configuration settings for the server edition of Ubuntu are now stored in the following location. Create the file if it does not exist.
sudo vi /etc/netplan/01-network-manager-all.yaml
Add or edit the config file to the following. Change eno1 to your interface name and the address and gateway to the appropriate IP’s
For more information, see netplan(5).
Now apply the changes with the following command.
sudo netplan apply
Create tmpfs ramdisk. Note if your Linux user is something other than steve you’ll need to change where appropriate.
In etc/fstab add the following
tmpfs /home/steve/mcdisk tmpfs defaults,size=4096m 0 0
This creates a 4GB ram disk at /home/steve/mcdisk
To mount it you can either reboot, or run
Copy your current Minecraft directory to the ram disk
cp -R /home/steve/Current_MC_Server/ /home/steve/mcdisk
Create a Bash script in “/home/steve” named “ramdisk_save.sh”
Paste the following in. You may need to install rsync if you do not have it installed
rsync -r -t $RAMDISK/ $MCDIR/
rsync -r -t $MCSTORE/ $MCPATH/
Now add the script to crontab
*/5 * * * * /home/steve/ramdisk_save.sh
This will now run every 5 minutes and sync any changes on the ram disk to the original directory.
Start the Minecraft server
java -Xmx3072M -Xms3072M -jar server.jar nogui