husayn gokal
Geneva

← Writeups

VPNs

Concept
Date
2026-05-17

VPNs work by routing a connecting device’s internet connection through a private server rather than the ISP. Data will appear to originate from the VPN server, and have a public IP address different from the connecting device.

There are two types of VPNs: Client-Based and SSL-Based VPNs.

SSL-Based VPNs use the browser as the VPN client. Its gateway can be configured to only allow access to web-based applications, or even the internal network, without needing to use specialized software.

Client-Based VPNs require the use of specialized software to establish the VPN connection. The user’s host will work (mostly) as if it were connected to the company network and be able to access resources allowed by the server configuration. About that - some companies place VPN users on a specific segment of the network, meaning that not everything will be accessible.

There is always a chance that the VPN endpoint data is being logged or the service itself is not performing security best practices. The provider may be logging all of the data! Hence VPNs are only useful for bypassing certain network/firewall restrictions. It does not disguise what activities you may be doing.

A successful VPN connection shows a “tun” adapter connection.


Note: We are connecting to the IP in 'tun0' because we can only connect to HackTheBox boxes through the VPN connection, as they do not have internet connection, and therefore cannot connect to us over the internet using eth0. In a real pentest, you may be directly connected to the same network, or performing an external penetration test, so you may connect through the eth0 adapter or similar.