Socat VPN = OpenSSL + Tunnel Interface

Demonstration using socat to create and connect two end point tunnel interfaces over OpenSSL

Refer to previous posting on creating server and client keys.

Server:

socat -d ssl-l:443,reuseaddr,fork,cert=server.pem,cafile=client.crt,verify=1 TUN:192.168.255.1/24,up

Client:

#socat ssl:www.dns-google-analytics.com:443,cert=client.pem,cafile=server.crt TUN:192.168.255.2/24,up

To test the connection:

Server:

#nc -lvp 4444 -e /bin/bash

Client:

#nc 192.168.255.1 4444

Advertisements