TryHackMe is an excellent resource to learn about cyber security. When attempting to connect to machines to complete exercises, TryHackMe offers a web based attackbox for easier access which pops up on the browser itself. The downside is that this is for 1 hour per day for non-premium members.
There is an alternative method using OpenVPN which allows you to connect to a VPN to access TryHackMe's machines. This would bypass the 1 hour per day limit and allow you to use your own command line rather than a cloud attackbox.
While there is documentation on how to do this, I had issues which is why I am creating this guide.
You will need a TryHackMe account to follow along so make sure you set one up before reading further.
Step 1: Download configuration file
Go to the access page. On this page, we will be downloading the configuration file used to connect to the VPN server. Under machines, check if the location is the closest to you. If not, select the dropdown and change accordingly e.g. I am in Sydney, so I will select AU-Regular-1.
Anytime you change the VPN server, you must also click the Regenerate option so that it can update the configuration. This will take about 10 seconds to do. Download the configuration file when it is available.
Step 2: Modify Configuration File
Unfortunately, going through the step by step process on how to connect to an OpenVPN server on TryHackMe did not work for me. Looking at the logs OpenVPN was creating, this error looked useful for my troubleshooting:
Client exception in transport_recv: crypto_alg: BF-CBC: bad cipher for data channel use
To fix this error, open the downloaded configuration with any text editor and find and replace like so:
data-ciphers -> cipher
Step 3: Follow existing guide
Go to the OpenVPN room and click the Connecting with Windows tab. Follow the tutorial but at step 5, use the configuration file we modified in step 2.
That is, it! You should be able to connect now. Once connected, try a Linux fundamentals room, and try to connect to a machine using OpenVPN.