Growing up, I loved to play games, Minecraft in particular. At one point, Minecraft was the reason my interest for cybersecurity grew a big amount.
One time when I logged on a server, my friend had mentioned that he couldn’t log in after multiple attempt, and that the connection would time out or the server would lag and everyone would be standing still.
Soon after he mentioned this, I realized I was starting to get the same problems as him. Later, I was informed that the server had been flooded by a DDoS attack.
A DDoS attack is an attempt to disrupt the normal traffic coming in for a server/service. The goal of the attack is to make its target unavailable by causing resource exhaustion.
After the attack happened, I delved deeper into my curiosity about learning how to safeguard myself from an attack in the future, or how a service can mitigate the attacks from happening in the future.
This curiosity helped build my understanding of cybersecurity principles and techniques through researching.
I set up my Minecraft server by using Amazon’s AWS EC2 instances they provide in their cloud.
Click here to create a free account: https://aws.amazon.com/
After creating an account I launched an instance, created a name for my machine and used the following configurations for the machine:
Now that the instance is up and running, it is time to connect to the instance. You can do this by opening up a terminal, “cmd” on a Windows machine.
You can use ssh in order to connect to the machine using the key-pair. Use the following command below to access your server:
Once connected to the instance, I first created a new directory to help organize my files for the future using this command:
Now that we have the server.jar file in our instance we can run the minecraft server by running this command:
Once the server is running, you can now connect.
However, before connecting, head to the console page on your aws instance and add two new inbound security groups rules under your network settings.
Add a new group type called Custom TCP giving it a port range of 25565 and a source range of 0.0.0.0/0 and another new group type called Custom UDP giving it the same port range and source range.
Now that the new rules have been added you can connect to your machine.
Grab the public ipv4 address from your aws instance and copy and paste it to your minecraft client and click ‘join server’.
You can edit the Minecraft server configurations by heading into the server-properties file.
You can stop the server by heading to the terminal and entering stop.
In order to run the server, you would have to run the java command we ran earlier.
Since this may be a hassle to type you can create a bash script and run the script instead of running the command everytime you want to run the server.
Name the script anything, example: start_server.sh
When first connecting to the newly created instance using ssh, I ran into this problem: