← Back to list

Practical Virtualization: Hosting and Hardening a Minecraft Server in VirtualBox

In this personal project, I demonstrate how to host and harden a Minecraft server within a VirtualBox Windows environment. This walkthrough…

Declan · 2025-12-14 05:26 · 1 claps · 7.1 min read
#active-directory #windows-server #information-technology #virtualization #port-security
Open on Medium ↗
Wiki topics: 🎬 · Film & Television 🛠️ · Crafts & DIY

Practical Virtualization: Hosting and Hardening a Minecraft Server in VirtualBox

In this personal project, I demonstrate how to host and harden a Minecraft server within a VirtualBox Windows environment. This walkthrough highlights practical skills in virtualization, operating system–level firewall configuration with Windows Defender, and the application of least‑privilege access principles. The project reflects my ongoing learning process in IT and showcases transferable techniques for secure service hosting.

Prerequisites:

Before we continue we will be using Window 10 Pro and installing in onto a Virtual machine, I have covered this process on part one of my Virtual home lab walkthrough, I’d recommend referring to this article in how to setup the machine we will run the server on then come back to this article as the setup process covered on this won’t be as in depth as the linked article and assumes you already have knowledge to setup a machine on VirtualBox — https://medium.com/@DDr23/setup-a-home-lab-running-active-directory-using-virtual-box-part-1-walkthrough-42da35f9c0cf.

Install the following first off.

Windows 10 Installation Media — https://www.microsoft.com/en-us/software-download/windows10

VirtualBox — https://www.virtualbox.org/wiki/Downloads

⚠️ Important: Before downloading your ISOs, check whether your system is 64-bit or 32-bit and choose the matching version accordingly.

Setup of Windows 10 Machine

  1. Create a new VM, and select a file location. RAM: 2–4 GB minimum but I’d personally recommend more 8GB. CPU: 2+ cores. Storage: 20 GB+ dynamically allocated.

  1. Enable Bridged networking so the VM gets it’s own LAN (e.g 192.168)

  1. Add the ISO to the machine, and try to boot into the system. When you get to this screen select Windows 10 Pro.

  1. The installation might take awhile, but once through select language, and keyboard region layout. When you get to this screen click Offline account.

  1. And Limited experience.

  1. Set the name to User for now, and continue with no password. Abd put no/skip on the following options after this.

  1. Now run CMD > Ipconfig and take note of the IP address, in my instance the VMs IP is 192.168.0.23. I will go ahead and set this as the static IP address.

  1. Go to control panel > Network and Internet > Network and Sharing Centre, then click on Ethernet.

  1. ind IPv4 and then set the IP address to the one that’s assigned, also the default gateway too, and add Preferred DNS server to the google.com IP which is 8.8.8.8.

  1. We will need to install java in order to be able to run a Minecraft server on this VM. Open up the browser on the system, and search the following, then click on the top Download Java.

  1. Click Download Java for Desktops.

  1. Now run installation, it should come up with a window like this, click install.

  1. Also download the following from the Oracle, the Java Development Kit. Run and install it like with Java.

  1. Now it’s time to install Minecraft server jar. Search Minecraft server jar, and click on the top link.

Note: if you are installing a specific version just keep the search the same but add at the end the version, here is an example. You will likely need to scroll down and find a site like minecraftversions.org in order to find a specific server jar which as been archived to use.

  1. Once jar folder is installed open up eula and put true. Also configure the whitelist to help make it more secure.

  1. Now on host machine and go to 192.168.0.1 to configure you’re routers port forwarding, everyone's routers are different, but this is how I did it using a different port from the default one used for Minecraft servers. In my example it’s 26565, also the address of the VM.

  1. Now run the server and try test joining it.

Turn off the firewall on the VM

When connecting to the server first test by IP_ADDRESS:PORT

192.168.0.23:26565

Then

PUBLIC_ADDRESS:26565.

Applying Principle of Least Privilege

The principle of least privilege relates to user accounts and the permissions they hold within a system. To demonstrate this, I created a second standard user account inside the virtual environment, configured to automatically sign in and run the Minecraft server. By isolating the server to a non‑administrative account, any attempt to make system‑level changes would trigger a prompt for administrator credentials. This setup enforces the principle of least privilege by ensuring that elevated actions cannot be performed without explicit authorization. Below are the steps I followed to apply the principle of least privilege in my demonstration.

  1. Go to control panel, and go to User Accounts inside.

  1. Go into Manage another account.

  1. Then Add a new user in PC settings.

  1. Then the following.

  1. I called it ducky, added no password.

  1. Now click here, and sign into ducky and run the server.

Port Filtering: Restricting Network Access to the Server Only

I then went into the w

  1. Start by login to the administrator account, opening advanced windows settings win + R and input wf.msc

  1. This will open the advanced setting’s for windows defender firewall. Right click inbound and click new rule.

  1. Select Port > TCP > 26565 my port number to connect to the Game server.

  1. And leave it on Allow the connection, then Next twice.

  1. Now name it something easy to remember like in my example

Minecraft Server Port 26565 Allow. Then finish.

  1. For each profile (Domain, Private, Public): • Set Inbound connections to Block (default). • This ensures only explicitly allowed rules (like your Minecraft port) are permitted.

  1. Now for outbound rules literally do the exact same allow outbound on port 26565. And go back to the above settings and set outbound connections for Domain, Private, also Public to block.

Test

  1. Now login to the standard user for least privilege, and let the server run, then open cmd as admin run the following command to see the active ports. If done right you should see not a lot, but the MC server one running.

  1. Now test connecting via Minecraft. Uh oh I have ran into this issue what to do?

  1. The VM needs to reach Mojang’s servers for authentication, so allow outbound rule for HTTPS (443). Open up advanced firewall setting’s and using what we learned apply a new rule for outbound for port 443 and allow connection.

  1. Once you have set the outbound rule try again and hopefully it should work.

Conclusion

This walkthrough demonstrates technical steps required to host and secure a Minecraft server in a virtualized Windows environment, while reinforcing core IT principles that extend far beyond gaming. The process highlights how virtualization, firewall configuration, and least‑privilege access can be applied to real‑world service hosting scenarios. This project serves as a practical showcase of my ability to combine hands‑on implementation with security‑focused best practices, while continuing to build a portfolio of transferable skills for future IT roles.


메타데이터
post_id
9ed55dcc9fd0
slug
practical-virtualization-hosting-and-hardening-a-minecraft-server-in-virtualbox-9ed55dcc9fd0
url
https://medium.com/@DDr23/practical-virtualization-hosting-and-hardening-a-minecraft-server-in-virtualbox-9ed55dcc9fd0
canonical_url
https://medium.com/@DDr23/practical-virtualization-hosting-and-hardening-a-minecraft-server-in-virtualbox-9ed55dcc9fd0
author_url
https://medium.com/@DDr23
status
ok
fetched_at
2026-07-17 14:47:18