In the previous post, I did some work in managing Security Lists to protect the Minecraft Server. To read about that, head (here). Another method of connecting to the Minecraft Server is through a Bastion Host. As part of Oracle Cloud Infrastructure, it is free to create a session through the Bastion Service (service limits do apply). Here’s a brief encounter of getting this up and going.
Here’s a standard architecture view of the Bastion Service. You can read more about it in the documentation (here). It’s relatively simple and to create this connection there are some steps to take.
- Create a set of SSH Keys – Check out the details (here).
- Create a Bastion Instance – Check out the details (here).
- Create a Bastion Session – Check out the details (here).
- Connect a session – Check out the details (here). If you want to do this with Putty, check out this blog by @callanhp (here).
This got a little tedious every time that I wanted to connect up to Minecraft. So, I scripted it. You can find the git repository (here) where I have two scripts – one to create a Bastion Instance and a Bastion Session and create a SSH tunnel to the Minecraft Server; one to delete a Bastion Instance. I do have a couple of pre-requisites.
- You’ve installed the OCI Command Line Interface which you can install with the instruction (here).
- You’ve installed jq (a lightweight command line JSON processor) which can be installed from (here).
- You’ve created a configuration to connect you your tenancy which you can configure with the instructions (here). I’ve also got a script that runs in the OCI Cloud Shell that can be cloned from (here).
- The current scripts are built for SSH and executable on Linux (I’ve tested this on Ubuntu on Windows 10).
(Updated) I’ve updated the repository to include both bash scripts and Powershell scripts variations.
If you need any help with these pre-requisites, let me know.
What the outcome is a port 25565 listening on localhost (which is the default for SSH Tunnelling) that can be connected to by your Minecraft Client. This means that 25565 (or even 22) doesn’t have to be open to the internet protecting your Minecraft Server from the outside world.
If this is the first article that you’ve seen about running your own Minecraft Server for free on the Oracle Cloud Always Free Tier, check out these other titles (here) to learn how to get it up and running with either the standard Minecraft Java Edition install or using the Bukkit Spigot version (where you can install or build your own plugins).
If you need an environment to do this, sign-up (here) for the free Oracle Cloud Trial. I’d be interested to hear your experiences and learn from others as well. Leave a comment or contact me at firstname.lastname@example.org if you want to collaborate.