To access the target modules and practice sandboxes hosted on Hack The Box (HTB) Academy, you must establish a network tunnel between your local computer and our lab servers. We utilize the OpenVPN client to securely route your network data straight into our isolated subnets.
You can do this using the Pwnbox or using the OpenVPN file on your own Virtual Machine (VM).
Before downloading files or provisioning cloud servers, you must choose your preferred method of network access.
To configure your primary connection settings, scroll down until you see Connect to HTB to proceed with either Pwnbox or downloading the OpenVPN file for your VM
My Workstation / Pwnbox
Pwnbox is fully equipped with the tools of the trade and can be used to attack target systems or just to practice with Linux! It's automatically connected to our network, so there's no need to worry about connecting to a VPN when using it. You can access Pwnbox directly within any Interactive module sections.
Spawning Pwnbox
Deployment Location: Select the preferred VPN Server first from under the VPN tab if you'd like, after that go back to the Pwnbox tab and select the Pwnbox region closest to your physical location, with the least amount of
msto limit interface latency and frame lag.Initialization: Click the Start Pwnbox button to provision your virtual instance. Once loaded, click Open Desktop to open your cloud system inside a new browser tab.
Terminate, Reset, and Extend time for Pwnbox: After spawning a Pwnbox instance, you can open it in full screen in a new browser tab, terminate, reset, and add more time to it.
Warning: You must operate the OpenVPN client pack and the web-based Pwnbox cloud workspace independently. Attempting to initiate both connection models at the same time will trigger a routing collision on your local machine that will immediately drop your active lab connection.
If you are a free user who has never made a purchase on Academy, you cannot spawn Pwnbox again once you've terminated it until the next day. Additionally, If you are having trouble with your instance, reset it instead.
VPN File
Downloading and Connecting to a VPN File
If you wish to use your own Virtual Machine to practice and attack Academy targets, you just need to download the VPN file and connect to it, choose one of the recommended servers.
The VPN tab only appears in sections that require a VPN connection to access the targets. Other sections use Docker-based instances that are accessible without a VPN, and you will only see the Pwnbox tab.
Unless you need to switch servers, you only need one VPN file for all sections and modules; you don't have to download a VPN file for every section.
Once you have configured your preferences under the Connect to HTB menu options, follow these exact sequential text instructions to open your network tunnel:
Step 1 - Save the configuration pack: Click the green Download VPN icon button to download your personal VPN configuration pack (saved as
[your_username].ovpn) directly into your default system storage directories.Step 2 - Prepare your Linux terminal path: Open a new terminal console window on your host operating system and change your current working path to the directory where the file was saved by executing the command:
cd ~/Downloads
Step 3 - Launch the OpenVPN utility script: If you have already running VPN files, use
sudo killall openvpnto kill them first. Initialize the terminal connection with full administrative superuser privileges by executing the exact command:sudo openvpn [your_username].ovpn
Step 4 - Verify connection completion status: Observe the running console stream data. Your tunnel is successfully established once the log trace displays the exact phrase:
Initialization Sequence Completed
Step 5 - Keep the console window running: Minimize this terminal tab. You must leave this terminal instance open and running in the background for the duration of your lab work; closing this terminal window kills the script and severs your lab connection instantly.
Step 6 - Open an operational terminal: Open a completely separate command terminal window or workspace panel to execute your network assessment scripts and target scanning utilities.
VPN Connection Troubleshooting
If you encounter any VPN issues, here are some steps to help you troubleshoot them.
Switching VPN Servers
Changing VPN server for the VPN File
Switching VPN servers is done from the VPN Servers dropdown, choose one of the recommended VPN servers that has Medium or low Load, and download the new VPN file.
Changing the VPN server for Pwnbox
To change the VPN server for the Pwnbox, you need to change the VPN server from the dropdown for VPN Servers.
All VM instances associated with the old VPN Server will be terminated when switching to a new VPN server. The existing Pwnbox instance will automatically switch to the new VPN server.
Switching to TCP
If you're experiencing connectivity issues with your VPN, switching from UDP to TCP might help improve stability and performance, especially if your network is prone to interruptions.
Switching to TCP on the VPN File:
This is done by changing the Protocol to
TCP 443and downloading a new VPN fileSwitching to TCP on the Pwnbox:
Open a terminal on your Pwnbox and run the following command:
sudo sed -i 's/udp/tcp/g; s/1337/443/g; s/tls-auth/tls-crypt/g' /etc/openvpn/*.conf; sudo systemctl restart openvpn
Check the VPN logs by running
cat /var/log/openvpn/htb.log, you should seeInitialization Sequence Completedmessage at the end, indicating success.
Using resource-effective RDP commands
Students are encouraged to experiment with various xfreerdp options to enhance their RDP session performance. Here's an example command that optimizes for different settings:
xfreerdp /u:username /p:password /v:TargetIP /cert-ignore /bpp:8 /network:modem /compression -themes -wallpaper /clipboard /audio-mode:1 /auto-reconnect -glyph-cache /dynamic-resolution
Adjusting MTU
If you have some VPN issues, you might want to try lowering the Maximum Transmission Unit (MTU). You can use the ip command. For example:
sudo ip link set dev tun0 mtu 1200
You can use either the Pwnbox or the OpenVPN file with your virtual machine, NOT BOTH.
Related Articles







