Skip to content

Latest commit

 

History

History
44 lines (26 loc) · 1.76 KB

File metadata and controls

44 lines (26 loc) · 1.76 KB

HackTheBox-WSL2-Configuration

This guide explains how to connect to HackTheBox (HTB) servers using OpenVPN and WSL2, with specific considerations for users in Egypt.


Prerequisites

  1. OpenVPN Community Edition: Download and install the latest version (e.g., Version 2.6.13).
  2. HTB Configuration File: Download your .ovpn configuration file from the HTB platform. Ensure you select the TCP version, not UDP.

Steps to Configure OpenVPN with WSL2

1. Modify the Configuration File

Before importing the .ovpn file into OpenVPN, add the following line to the file:

windows-driver wintun

This ensures compatibility with WSL2.

2. Import and Run the Configuration

  1. Open the OpenVPN application.
  2. Import the modified .ovpn file.
  3. Connect to the HTB server using the imported configuration.

3. Launch WSL2

Once the VPN connection is established, start your WSL2 terminal. You should now be able to access HTB servers directly from WSL2.

Using UDP Instead of TCP

If you prefer to use the UDP configuration file instead of TCP, follow these additional steps:

  1. Run a Secondary VPN: Before connecting to HTB via OpenVPN, start another VPN service (e.g., Kaspersky VPN, Cloudflare Warp, or Windscribe). This creates a "tunnel inside a tunnel" and bypasses restrictions.
  2. Connect to HTB: Once the secondary VPN is active, connect to HTB using the UDP configuration file in OpenVPN.

Notes for Egyptian Users

In Egypt, certain VPN protocols may be restricted. Using TCP or a secondary VPN (as described above) can help bypass these restrictions and ensure a stable connection to HTB servers.

By following these steps, you should be able to seamlessly connect to HackTheBox servers using OpenVPN and WSL2. Happy hacking!