Skip to content

nanzeng/stunnel

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

STunnel

Overview

The intention of this project is to easily expose any server behind a firewall to the Internet. The STunnel server runs on a public accessible server. An STunnel client runs on a computer behind a firewall, where all the services are located. The client will connect to both STunnel server and local services, and build an encrypted communication channel between the STunnel server and local services. Access to the services from the Internet is through the STunnel server.

Requirements

  • Python 3.7+

Install

$ python setup.py install

Configuration

Server

  1. Create certificate
$ create_certificates -r server
  1. Start the server
$ stunnel_server -p 7777

Client

  1. Create certificate
$ create_certificates -r client
  1. Copy client public key to server
# on server machine
$ cd $HOME/.config/stunnel/certificates
$ mkdir clients
$ cp client.key clients
  1. Copy server public key to client
# on client machine
$ cd $HOME/.config/stunnel/certificates
$ mkdir servers
$ cp server.key servers
  1. Update client configuration file
# $HOME/.config/stunnel/config.yaml

servers:
    - name: local
      addr: localhost
      port: 7777
      key: server.key

services:
    - name: ssh
      addr: localhost
      port: 22
      bind_port: 2222
  1. Start an encrypted tunnel
$ stunnel_client
  1. Connect to bind_port on server
$ ssh server -p 2222

An ssh connection should have been established

About

Secure tunnel for exposing firewalled services

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors