A common frustration for Kali Linux users when they create a VPN connection to Hack The Box is that often, Internet access disappears like a fart in the wind. It’s often more of a nuisance than anything but some of the challenges have web applications that tried and load internet based resources (such as font files or JS files from CDN networks), that means these applications don’t load properly.
Fortunately, the problem – and the fix – are both relatively simple: for some reason the HackTheBox VPN configuration applies a default route to the routing table that captures all requests and directs them to the HTB network, rather than allowing split tunnelling.
To resolve this:
Establish a VPN connection with HackTheBox
Open a terminal window and enter the routes command:
You should be presented with something similar to this:
Note the top default route (marked with a red x), this is what is capturing all traffic yet the route at the bottom (green tick) also routes traffic for the 10.10.14.0 subnet over the VPN, so the top one is not needed:
To delete the top route, enter the following command, updating to match the details of your route (such as IP address and Iface):
sudo route del -net default gw 10.10.14.1 netmask 0.0.0.0 dev tun0
You should now have Internet access on your machine!
Unfortunately at the moment, this route returns every time you restablish a connection, I simple have the command in a bash script I run after connecting.