Skip to main content

Troubleshooting OpenVPN on Linux and Mac

BigFawn avatar
Written by BigFawn
Updated over 2 weeks ago

Most OpenVPN issues can be resolved with the suggestions below.

If you're new to the platform, you can follow this article to familiarize yourself with OpenVPN.

Although using OpenVPN has advantages, we recommend that beginners use the Attackbox, as this solution comes with all the necessary tools and no VPN connection is required.

Before troubleshooting, please update and upgrade your OS to ensure the issues aren't caused by old software. If you are using Linux, please make sure you use the terminal and not the network manager. Please refer to the OpenVPN room if you are unsure how to do this.


​These steps may not work for WLS/ WSL 2. We would recommend that you use a Virtual Machine with Virtual Box or VMware if you continue to have issues after following these steps

First troubleshooting steps:

To resolve issues you may be experiencing with OpenVPN, please attempt the following steps:

First, close any external VPN services (such as NordVPN, ProtonVPN or Windscribe); the only VPN service you should be running is OpenVPN.

If that does not work, or you do not have any external VPN services running, please try running this command in your terminal:

sudo killall openvpn

This command will stop all active instances of the OpenVPN service, including any running in the background or ones that have not shut down properly.

When prompted, enter your password; you should not see any output after running the command; just re-run the OpenVPN initialization command (sudo openvpn filename.ovpn) and try running the following command in your terminal:

ping 192.168.128.1

If an IP address (starting with 10.x.x.x) is returned, you are connected and ready to continue learning.

β€’ If the issue persists, even though you have tried the previous steps, please try turning down the maximum bytes you send across the network. To do this, execute the following command in a separate terminal window:

sudo ip link set dev tun0 mtu 1200

Issue:

You're not receiving reverse shells or Metasploit exploits are not creating sessions.

Solution:

This is often caused by incorrect settings (so double-check this first) or by using a VM running the VPN on your host machine. If the VPN is connected to your host and the VM is connected through the host, then you have a route into the network and can access machines: VM -> Host -> TryHackMe Network. Your reverse shells don't know about that extra step, though: as far as they're concerned, your TryHackMe IP belongs to your host -- not the VM. When the reverse shell is sent, it gets sent back to the host but goes no further -- it has no reason to because it's already reached its destination.

If none of the above solutions fixed your issue, please try running the script below.

Troubleshooting script:

  1. Download the TryHackMe OpenVPN Troubleshooting script directly to your Linux machine

  2. In your Linux terminal, make the script executable with chmod +x <path-to-script>. If you downloaded the script to your Downloads folder, this would be chmod +x ~/Downloads/thm-troubleshoot.

  3. Run the script by typing sudo followed by the path to the script into your terminal and pressing enter. If the script is in your downloads, it will be the following command: sudo ~/Downloads/thm-troubleshoot.

  4. The script will instruct you on how to proceed from there.

If you continue to experience issues after trying these steps, email us at [email protected] or open a ticket via our chatbot.

Did this answer your question?