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

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s