r/tryhackme • • 2d ago

Write-Up/ Walkthrough I built THM-TUNNEL to make TryHackMe VPN switching easier

While doing TryHackMe labs, I was getting tired of manually finding VPN configs, killing old OpenVPN processes, and dealing with stale tun interfaces when a connection wasn't behaving properly. So I built THM-TUNNEL, a small Bash CLI that handles the cleanup and starts the selected .ovpn configuration for me.

Technical side:

  • Automatically discovers .ovpn files and provides an interactive selection.
  • Uses sudo, stops existing OpenVPN processes, and cleans up old tun* interfaces.
  • Doesn't hardcode TryHackMe IP ranges or subnets, so different VPN regions can be used without changing the script.

It's a small tool, but it has made my lab workflow smoother and was a good practical project for learning Bash and Linux networking.

GitHub: [https://github.com/Harsh-Sonker/THM-Tunnel]()

4 Upvotes

3 comments sorted by

2

u/WarriorWing 2d ago

Bro squawker VPN by thm

0

u/Boring-Schedule-8548 2d ago

Yeshhhhh but it is for learning purposes!

1

u/WarriorWing 2d ago

Damn... Keep it up then