Can't connect to VPN, using OpenVPN - UDP nor TCP protocols

Hi. I’m trying to start playing machines but I just can’t I installed OpenVPN, then I downloaded both VPNs (UDP & TCP) but none of them are working. I verified that IPv6 is available on my Arch btw, I did sudo pacman -Syu plenty of times, OpenVPN is up to date, but I just can’t connect successfully

When I try using UDP, I get it stuck with a message in the terminal saying “protocols options: explicit-exit-notify 1”, no matter how much time do I wait, it just can’t get past it.
Using TCP it get stuck too, but with the message “timers: ping 10, ping-restart 120” and the same.

I already read the troubleshooting section on HTB, but nothing seem to work. I also used this command “sudo sysctl net.ipv6.conf.all.disable_ipv6=0” and nothing happened. I will appreciate help, thanks.

What is the exact command you’re using to connect to the VPN?

Does this happens in every section? There are a vew different types of VPN connection.
One for the labs, one for CTF, etc.

Did all of them return the same issue?

You should’ve connected, just ping target IP and you’ll find it (at least TCP works)

Either there is an issue with your network cfg, or you may have to remove openvpn by typing in sudo pacman -R openvpn and reinstall it with sudo pacman -S openvpn. Try out a different package manager like paru or yay if pacman can’t install it properly. Make sure to check the AUR page for the right package name if I got the name of the pkg wrong.

Try out different server locations and see if any of them work. If you have another vpn running at the same time, that could be the root cause of the issue. If not, it’s something a little more advanced.

I had the same problem and I had not found anyone talking about it. I found two solutions:

  1. (Recommended) Give OpenVPN the capability to open TUN interfaces with sudo setcap CAP_NET_ADMIN+eip /usr/bin/openvpn. Now, the openvpn command should work even as an unprivileged user.

  2. Add this line to the /etc/sudoers file and get unlimited sudo time: Defaults timestamp_timeout=-1. This will allow the sudo openvpn command to never expire and never close the session.

sudo openvpn name.opvn

If this is your first time ever having this issue, try again when you read this. It might have simply been an issue with their servers.

I am not super familiar with arch, but here are a few things I’d look at:

  • if you have any familiarity with network traffic, open up wireshark and see what is actually happening, like whether or not something is denying the connection within your own network, it’s not even reaching HTB etc
  • Firewall rules - Try temporarily disabling to see if that works. If that works, make a rule to allow the traffic
  • See if you can open up a browser from the machine and connect to the internet at all (if it’s virtualized, you may not have it set to reach the internet)
  • Make sure all openvpn modules are loaded

The fact that the error has something to do with pinging makes me think that your openvpn software either cannot reach the server, or it is reaching the server and the traffic is getting dropped on the way back

You could also try reinstalling openvpn

I just threw the error into ChatGPT and this is the response:

The error message “Timers: Ping 10, ping-restart 120” in OpenVPN usually indicates that your client is not receiving any response from the VPN server within the set timeouts. This could be due to several potential issues, especially when using Arch Linux to connect to Hack The Box (HTB). Here are some troubleshooting steps you can follow:

  1. Verify OpenVPN Configuration

    • Ensure that your .ovpn configuration file from HTB is correct and up to date. Sometimes HTB might update the configuration files, so downloading a fresh one can help.

  2. Check Network Connection

    • Verify that your internet connection is stable and that there are no firewalls blocking the VPN connection. You can try using ping to test the server’s IP to ensure connectivity.

  3. Firewall Rules

    • On Arch Linux, the firewall (e.g., ufw or iptables) might be blocking OpenVPN traffic. Try disabling the firewall temporarily to see if that resolves the issue:

sudo ufw disable

•	If this resolves it, add a rule to allow OpenVPN traffic:

sudo ufw allow 1194/udp

  1. Reinstall OpenVPN

    • Sometimes, reinstalling OpenVPN can resolve any underlying issues with the package.

sudo pacman -Syu openvpn

  1. Run OpenVPN with Verbose Logging

    • Run OpenVPN with verbose logging to get more information on what might be causing the issue:

sudo openvpn —config /path/to/your/htb.ovpn —verb 5

•	Look for any specific errors in the output that could give more clues.
  1. Try Different DNS Servers

    • If there’s a DNS issue, you might not be able to connect to HTB’s VPN server. Try setting your DNS to a public DNS server, like Google’s:

sudo echo “nameserver 8.8.8.8” | sudo tee /etc/resolv.conf > /dev/null

  1. Ensure Tun Module is Loaded

    • The OpenVPN client needs the tun module to be loaded. Check with:

lsmod | grep tun

•	If it’s not loaded, you can load it manually with:

sudo modprobe tun

  1. Check HTB Status and Network

    • Occasionally, HTB may have downtime or maintenance. Check HTB forums or status updates to ensure the VPN is operational.

These steps should help narrow down the issue. If the error persists, let me know if any specific error logs come up during these checks.

Thank you so much, I appreciate the help, but it results that Timers: Ping 10… Is not an stuck state. Maybe I’m too stupid or blind, but there’s a success message on the terminal, but it’s not at the end

But as I said, I appreciate the help, for you and the other people that commented my post.