VPN tunnel via SSH SOCKS5 proxy using tun2socks
tun2socks in PATH, sudo access
- Download
tun2socksand place it in PATH - Make
vos.shexecutable
Edit the settings block at the top of the script:
SSH_USER=""
SSH_HOST=""
SSH_PORT=""
SOCKS_PORT=""
./vos.sh start Start VPN tunnel
./vos.sh stop Stop VPN tunnel
./vos.sh status Show tunnel status
- All traffic routes through TUN interface -> tun2socks -> local SOCKS5 -> SSH tunnel
- Traffic to the SSH server itself bypasses the tunnel to keep the connection alive
- Two default routes: VPN via TUN (metric 1) and fallback via physical gateway (metric 10)