Code Monkey home page Code Monkey logo

sslh's Introduction

===== sslh -- A ssl/ssh multiplexer. =====

===== WARNING =====
This project is no longer needed as the upstream version now support IPv6


sslh lets one accept both HTTPS and SSH connections on the
same port. It makes it possible to connect to an SSH server
on port 443 (e.g. from inside a corporate firewall) while
still serving HTTPS on that port. 

==== Compile and install ====

If you're lucky, the Makefile will work for you:

make install

(see below for configuration hints)


Otherwise:

Compilation instructions (the binary produced won't contain
the version number, which is stored only in the Makefile)

Solaris:
  cc -o sslh sslh.c -lresolv -lsocket -lnsl

LynxOS:
  gcc -o tcproxy tcproxy.c -lnetinet

Linux:
  cc -o sslh sslh.c -lnet
or:
  cc -o sslh sslh.c

To compile with libwrap support:
  cc -o sslh -DLIBWRAP sslh.c -lwrap

To install:

make
cp sslh /usr/local/sbin
cp scripts/etc.default.sslh /etc/default/sslh

For Debian:
cp scripts/etc.init.d.sslh /etc/init.d/sslh
For CentOS:
cp scripts/etc.rc.d.init.d.sslh /etc/rc.d/init.d/sslh

and probably create links in /etc/rc<x>.d so that the server
start automatically at boot-up, e.g. under Debian:
update-rc.d sslh defaults



==== Configuration ====

You can edit settings in /etc/default/sslh:

LISTEN=ifname:443
SSH=localhost:22
SSL=localhost:443

A good scheme is to use the external name of the machine in
$LISTEN, and bind httpd to localhost:443 (instead of all
binding to all interfaces): that way, https connections
coming from inside your network don't need to go through
sslh, and sslh is only there as a frontal for connections
coming from the internet.

Note that 'external name' in this context refers to the
actual IP address of the machine as seen from your network,
i.e. that that is not 127.0.0.1 in the output of
ifconfig(8).

==== Libwrap support ====

Sslh can optionnaly perform libwrap checks for the sshd
service: because the connection to sshd will be coming
locally from sslh, sshd cannot determine the IP of the
client.

==== OpenVPN support ====

OpenVPN clients reportedly take more than one second between
the time the TCP connexion is established and the time they
send the first data packet. This results in sslh with
default settings timing out and assuming an SSH connexion.
To support OpenVPN connexions reliably, it is necessary to
increase sslh's timeout to 5 seconds.

==== IP_TPROXY support ====

There is a netfilter patch that adds an option to the Linux
TCP/IP stack to allow a program to set the source address
of an IP packet that it sends. This could let sslh set the
address of packets to that of the actual client, so that
sshd would see and log the IP address of the client, making
sslh transparent.

This is not, and won't be, implemented in sslh for the
following reasons (in increasing order of importance):

  * It's not vital: the real connecting IP address can be
    found in logs. Little gain.
  * It's Linux only: it means increased complexity for no
    gain to some users.
  * It's a patch: it means it'd only be useful to Linux
    users who compile their own kernel.
  * Only root can use the feature: that's a definite no-no.
    Sslh should not, must not, will never run as root.

This isn't to mean that it won't eventually get implemented,
when/if the feature finds its way into the main kernel and
it becomes usuable by non-root processes.


Comments? questions? [email protected]

sslh's People

Contributors

slubman avatar

Stargazers

Ronan Launay avatar Thibault NORMAND avatar  avatar 波哥 avatar LateRain avatar  avatar Sunlei avatar Remi Caput avatar Stefan Morgenthaler avatar Frédéric JARDON avatar Glenn Y. Rolland avatar number23 avatar Chris Hamant avatar André Kelpe avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

qardeneden

sslh's Issues

Doesn't work with mosh

I'm getting invalid password if using SSLH+mosh (my server does not accept passwords, only public keys). If I move mosh to listen to port 21, it works as it should, could you look into this?

kernel logs

Getting lots of messages in syslog and kernel logs?

kernel: [27363] 117 27363 3645 83 0 0 0 sslh

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.