Try Hack Me - OpenVPN

How to connect to OpenVPN. Let’s go!

In this article, I will help you to use OpenVPN to do CTFs. I hope you like it and helps you to start in cybersecurity. Let’s go!

First of all, we have some options and different systems to use OpenVPN. So, I will give a guide for all of them and you can focus on the system that you are familiar to use. Enjoy!

Task 1: Connecting to our network

The first step is to get the CONFIGURATION FILE to use OpenVPN. To access the machines that Try Hack Me offers for us, we need to connected our network using a VPN. So, you will need to get this file and download it to your computer.

Go to the website and download the configuration file by clicking on “Download My Configuration File”: here

Complete the task to continue!

Now, you don’t need to follow every task. You must read only the task that is suited for your computer. If you are using Linux, read Task 4, if you are using Windows read Task 2, etc. Let’s go!

Task 2: Connecting with Windows

In Windows, we need to download the OpenVPN installer.

Go to: here

Install the OpenVPN application and after that open it as Administrator.

You will see in the system tray the OpenVPN running, but you still need to import your configuration file. So, you just need to right click on the application and click “Import File”.

Select your configuration file and right click on the application, go to your configuration file, and click “Connect”.

If you want to disconnect because you’ve finished a room, follow step 4 and click “Disconnect”.

Task 3: Connecting with MacOS

Let’s download the OpenVPN for MacOS. Go to: here

Open and run the application. You will see OpenVPN running in your top bar.

Right click on the application and import file and click “From local file…”

Select your configuration file, click on the application again to select your file and click “Connect…”.

If you want to disconnect because you’ve finished a room, follow step 4 and click “Disconnect…”.

Task 4: Connecting with Linux

I use Linux to do learn on Try Hack Me and I used to struggle to connect OpenVPN. As you do it, you will see that is simple. I hope I can be even more clear that the room using images, let’s go!

First, you will need to download OpenVPN, so in your terminal run the command:

sudo apt install openvpn

Locate the full path of your configuration file. The file will probably be in Downloads. The format will be:

sudo openvpn /path to your configuration file/file name.ovpn

Before you do it, remember to check the path you currently are on. I prefer to do it like the image below:

What did I do? I was not on the correct path, so I run “cd” to go to Downloads using:

cd ./Downloads

And then, I run the correct command in the path of the file. You need to check if you’re on the correct path. Remember to always do it!

So, when you are sure (in my case, I am in Downloads), you can run the command:

sudo openvpn filename.ovpn (FILENAME IS YOUR USER)

I prefer to do it like that, but it’s up to you!

Enter your password and wait.You probably are connected if you see it:

But, why not check on Try Hack Me website?

Go to here

Check if you are connected or not.

We did it!

Task 5: Using TryHackMe without a VPN

“If you are unable to connect to our network through the VPN, you can deploy a Kali Linux machine and control it in your browser. You can then access all TryHackMe machines through that machine. Free users can deploy the machine for 1 hour a day, subscribers have unlimited access.”

Follow the steps to deploy your own machine in your browser:

Subscribe to TryHackMe: here

Go to the My Machine page: here

Deploy a web-based machine of your choice!

“A in-browser window will then appear, wait for your machine to load and you will be able to access machines through the Kali Linux machine without being connected to a VPN. If you’re using the Kali Linux machine, start the machine on the “My Machine” page, and paste the machines and IP into the Kali Linux’s machines web browser.”

Task 6: Check you’re connected

You can check if you did it right by deploying a machine and accessing the website.

Click Start Machine and wait a few seconds to get your IP Address.

Try to open it. If you are able to see it, you’re connected (I’m sure you’re, we did it!)

Go to the website and get the flag to answer Task 6.

Copy the flag and finish the room!

Thank you!

Categories:

Updated: