git ssb

0+

cel / sslh



Tree: c02e2d7aeeba25cb53d8a81acad55318ce63a4c4

Files: c02e2d7aeeba25cb53d8a81acad55318ce63a4c4 / sslh.pod

6847 bytesRaw
1# I'm just not gonna write troff :-)
2
3=head1 NAME
4
5 sslh - protocol demultiplexer
6
7=head1 SYNOPSIS
8
9sslh [B<-F> I<config file>] [ B<-t> I<num> ] [B<-p> I<listening address> [B<-p> I<listening address> ...] [B<--ssl> I<target address for SSL>] [B<--ssh> I<target address for SSH>] [B<--openvpn> I<target address for OpenVPN>] [B<--http> I<target address for HTTP>] [B<--anyprot> I<default target address>] [B<--on-timeout> I<protocol name>] [B<-u> I<username>] [B<-P> I<pidfile>] [-v] [-i] [-V] [-f] [-n]
10
11=head1 DESCRIPTION
12
13B<sslh> accepts connections on specified ports, and forwards
14them further based on tests performed on the first data
15packet sent by the remote client.
16
17Probes for HTTP, SSL, SSH, OpenVPN, tinc, XMPP are
18implemented, and any other protocol that can be tested using
19a regular expression, can be recognised. A typical use case
20is to allow serving several services on port 443 (e.g. to
21connect to ssh from inside a corporate firewall, which
22almost never block port 443) while still serving HTTPS on
23that port.
24
25Hence B<sslh> acts as a protocol demultiplexer, or a
26switchboard. Its name comes from its original function to
27serve SSH and HTTPS on the same port.
28
29=head2 Libwrap support
30
31One drawback of B<sslh> is that the servers do not see the
32original IP address of the client anymore, as the connection
33is forwarded through B<sslh>.
34
35For this reason, B<sslh> can be compiled with B<libwrap> to
36check accesses defined in F</etc/hosts.allow> and
37F</etc/hosts.deny>. Libwrap services can be defined using
38the configuration file.
39
40=head2 Configuration file
41
42A configuration file can be supplied to B<sslh>. Command
43line arguments override file settings. B<sslh> uses
44B<libconfig> to parse the configuration file, so the general
45file format is indicated in
46L<http://www.hyperrealm.com/libconfig/libconfig_manual.html>.
47Please refer to the example configuration file provided with
48B<sslh> for the specific format (Options have the same names
49as on the command line, except for the list of listen ports
50and the list of protocols).
51
52The configuration file makes it possible to specify
53protocols using regular expressions: a list of regular
54expressions is given as the I<probe> parameter, and if the
55first packet received from the client matches any of these
56expressions, B<sslh> connects to that protocol.
57
58Alternatively, the I<probe> parameter can be set to
59"builtin", to use the compiled probes which are much faster
60than regular expressions.
61
62=head2 Probing protocols
63
64When receiving an incoming connection, B<sslh> will read the
65first bytes sent be the connecting client. It will then
66probe for the protocol in the order specified on the command
67line (or the configuration file). Therefore B<--anyprot>
68should alway be used last, as it always succeeds and further
69protocols will never be tried.
70
71If no data is sent by the client, B<sslh> will eventually
72time out and connect to the protocol specified with
73B<--on-timeout>, or I<ssh> if none is specified.
74
75=head1 OPTIONS
76
77=over 4
78
79=item B<-t> I<num>, B<--timeout> I<num>
80
81Timeout before forwarding the connection to the timeout
82protocol (which should usually be SSH). Default is 2s.
83
84=item B<--on-timeout> I<protocol name>
85
86Name of the protocol to connect to after the timeout period
87is over. Default is 'ssh'.
88
89=item B<-p> I<listening address>, B<--listen> I<listening address>
90
91Interface and port on which to listen, e.g. I<foobar:443>,
92where I<foobar> is the name of an interface (typically the
93IP address on which the Internet connection ends up).
94
95This can be specified several times to bind B<sslh> to
96several addresses.
97
98=item B<--ssl> I<target address>
99=item B<--tls> I<target address>
100
101Interface and port on which to forward SSL connection,
102typically I<localhost:443>.
103
104Note that you can set B<sslh> to listen on I<ext_ip:443> and
105B<httpd> to listen on I<localhost:443>: this allows clients
106inside your network to just connect directly to B<httpd>.
107
108Also, B<sslh> probes for SSLv3 (or TLSv1) handshake and will
109reject connections from clients requesting SSLv2. This is
110compliant to RFC6176 which prohibits the usage of SSLv2. If
111you wish to accept SSLv2, use B<--default> instead.
112
113=item B<--ssh> I<target address>
114
115Interface and port on which to forward SSH connections,
116typically I<localhost:22>.
117
118=item B<--openvpn> I<target address>
119
120Interface and port on which to forward OpenVPN connections,
121typically I<localhost:1194>.
122
123=item B<--xmpp> I<target address>
124
125Interface and port on which to forward XMPP connections,
126typically I<localhost:5222>.
127
128=item B<--http> I<target address>
129
130Interface and port on which to forward HTTP connections,
131typically I<localhost:80>.
132
133=item B<--tinc> I<target address>
134
135Interface and port on which to forward tinc connections,
136typically I<localhost:655>.
137
138This is experimental. If you use this feature, please report
139the results (even if it works!)
140
141=item B<--anyprot> I<target address>
142
143Interface and port on which to forward if no other protocol
144has been found. Because B<sslh> tries protocols in the order
145specified on the command line, this should be specified
146last. If no default is specified, B<sslh> will forward
147unknown protocols to the first protocol specified.
148
149=item B<-v>, B<--verbose>
150
151Increase verboseness.
152
153=item B<-n>, B<--numeric>
154
155Do not attempt to resolve hostnames: logs will contain IP
156addresses. This is mostly useful if the system's DNS is slow
157and running the I<sslh-select> variant, as DNS requests will
158hang all connections.
159
160=item B<-V>
161
162Prints B<sslh> version.
163
164=item B<-u> I<username>, B<--user> I<username>
165
166Requires to run under the specified username.
167
168=item B<-P> I<pidfile>, B<--pidfile> I<pidfile>
169
170Specifies a file in which to write the PID of the main
171server.
172
173=item B<-i>, B<--inetd>
174
175Runs as an I<inetd> server. Options B<-P> (PID file), B<-p>
176(listen address), B<-u> (user) are ignored.
177
178=item B<-f>, B<--foreground>
179
180Runs in foreground. The server will not fork and will remain connected
181to the terminal. Messages normally sent to B<syslog> will also be sent
182to I<stderr>.
183
184=item B<--background>
185
186Runs in background. This overrides B<foreground> if set in
187the configuration file (or on the command line, but there is
188no point setting both on the command line unless you have a
189personality disorder).
190
191=back
192
193=head1 FILES
194
195=over 4
196
197=item F</etc/init.d/sslh>
198
199Start-up script. The standard actions B<start>, B<stop> and
200B<restart> are supported.
201
202=item F</etc/default/sslh>
203
204Server configuration. These are environment variables
205loaded by the start-up script and passed to B<sslh> as
206command-line arguments. Refer to the OPTIONS section for a
207detailed explanation of the variables used by B<sslh>.
208
209=back
210
211=head1 SEE ALSO
212
213Last version available from
214L<http://www.rutschle.net/tech/sslh>, and can be tracked
215from L<http://freecode.com/projects/sslh>.
216
217=head1 AUTHOR
218
219Written by Yves Rutschle
220

Built with git-ssb-web