Skip to main content

SSL Tunnel Tool for secure and flexible network tunneling

Project description

README for SSL Tunnel Tool

Overview

SSL Tunnel Tool is a Python-based utility for creating secure SSL tunnels. It can be used to set up SSL servers and clients for secure communication over untrusted networks. The tool supports both Layer 2 (Ethernet frames) and Layer 3 (IP packets) operation modes.

Features

  • Secure SSL tunnel creation for servers and clients.
  • Support for both Layer 2 and Layer 3 operation modes.
  • Automatic certificate and configuration management.
  • Supports auto-reconnect for clients.
  • Logging and error handling capabilities.

Installation Command

Copy and paste the following command:

pip install ssl-tunnel

Usage

Server Commands

  • Initialize the server with default settings and certificates:
    ssl_tunnel server init [--overwrite]
    
  • Create a client certificate and config:
    ssl_tunnel server create-client --name [CLIENT_NAME] [--days [DAYS]] [--server-address [ADDRESS]] [--server-port [PORT]] [--overwrite] [--output-dir [DIR]]
    
  • Start the SSL server:
    ssl_tunnel server start [OPTIONS]
    

Client Commands

  • Initialize the client with default settings:
    ssl_tunnel client init [--overwrite]
    
  • Load, uncompress, and set up the client configuration from a .gz file:
    ssl_tunnel client load --file [FILE_PATH] [--overwrite]
    
  • Start the SSL client:
    ssl_tunnel client start [OPTIONS]
    

Certificate Commands

  • Create a self-signed certificate:
    ssl_tunnel certificate --cert-name [NAME] --cert-out-file [OUT_FILE] --key-out-file [KEY_FILE] [--days [DAYS]] [--key-size [SIZE]] --common-name [COMMON_NAME] [OTHER_OPTIONS]
    

Options

  • [OPTIONS] includes various flags and parameters that you can pass to customize the server or client. Refer to the script's help for more details:
    ssl_tunnel --help
    

Logs

Logs are stored in /var/log/ssl-tunnel.log. Make sure the script has the necessary permissions to create and write to this file.

Note

Ensure that all certificates and keys are securely stored and backed up. Proper access control should be maintained for sensitive files.

Example

A Linux Server Running the SSL Tunnel Server

Initialize the server and generate default certificates and configurations:

sudo ssl_tunnel server init

Output:

📜 Generated certificate: /etc/ssl-tunnel/server.pem
🔑 Generated private key: /etc/ssl-tunnel/server.key
👌 Created default configuration file: /etc/ssl-tunnel/config.json

Create a client profile with a certificate and configuration:

sudo ssl_tunnel server create-client --name client1 --output-dir ./

Output:

🖥️ Server address: "ec2-3-138-125-203.us-east-2.compute.amazonaws.com:443" has been included in the client profile.
👌 Client profile for "client1" has been created and archived into "client1_setup.tar.gz".
👏 The new client certificate has been copied to the server's trust store.

Start the SSL Tunnel Server:

sudo ssl_tunnel server start

Output:

******************************
 The SSL Tunnel Server starts 
******************************
📌 Running on the auth mode in l3 operation
🚀 SSL server is running on 0.0.0.0:443... Press CTRL+C to exit.

A Linux Server Running the SSL Tunnel Client

Load the client configuration and certificates from a provided .gz file:

sudo ssl_tunnel client load --file ./client1_setup.tar.gz

Output:

👌 Client configuration and certificates have been successfully extracted and set up.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ssl-tunnel-0.4.tar.gz (19.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ssl_tunnel-0.4-py3-none-any.whl (23.0 kB view details)

Uploaded Python 3

File details

Details for the file ssl-tunnel-0.4.tar.gz.

File metadata

  • Download URL: ssl-tunnel-0.4.tar.gz
  • Upload date:
  • Size: 19.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.13

File hashes

Hashes for ssl-tunnel-0.4.tar.gz
Algorithm Hash digest
SHA256 ec5d2bbd346e5d5e2ab3afbb5fcaa2e88fcd7d74e95f0c80c39f8f8bea3c071d
MD5 efc9f8e047e7b0dee5c1aa021766ed8b
BLAKE2b-256 ddd809e80235bc93cb898e8350d8c64ef64d6a45dc1c84bb8804caa17b249b9e

See more details on using hashes here.

File details

Details for the file ssl_tunnel-0.4-py3-none-any.whl.

File metadata

  • Download URL: ssl_tunnel-0.4-py3-none-any.whl
  • Upload date:
  • Size: 23.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.13

File hashes

Hashes for ssl_tunnel-0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 6854fb3fb3748579afc76bde04c66eba141f9bc149168b3de28e49cbe33e453e
MD5 a28af07249da857d28f9a920048042e5
BLAKE2b-256 e3b6bddb53a1d769b07ef665dedbfedc8828d7a1e7b90ef8e94a4e0173c32f02

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page