git ssb

0+

cel / sslh



Tree: 7c35ef8528d47b97894a6495275b57dc1ae3f8c7

Files: 7c35ef8528d47b97894a6495275b57dc1ae3f8c7 / sslh.pod

7461 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<--transparent>] [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=head2 Logging
76
77As a security/authorization program, B<sslh> logs to the
78LOG_AUTH facility, with priority LOG_INFO for normal
79connections and LOG_ERR for failures.
80
81=head1 OPTIONS
82
83=over 4
84
85=item B<-F> I<filename>, B<--config> I<filename>
86
87Uses I<filename> has configuration file. If other
88command-line options are specified, they will override the
89configuration file's settings.
90
91=item B<-t> I<num>, B<--timeout> I<num>
92
93Timeout before forwarding the connection to the timeout
94protocol (which should usually be SSH). Default is 2s.
95
96=item B<--on-timeout> I<protocol name>
97
98Name of the protocol to connect to after the timeout period
99is over. Default is 'ssh'.
100
101=item B<--transparent>
102
103Makes B<sslh> behave as a transparent proxy, i.e. the
104receiving service sees the original client's IP address.
105This works on Linux only and involves B<iptables> settings.
106Refer to the README for more information.
107
108=item B<-p> I<listening address>, B<--listen> I<listening address>
109
110Interface and port on which to listen, e.g. I<foobar:443>,
111where I<foobar> is the name of an interface (typically the
112IP address on which the Internet connection ends up).
113
114This can be specified several times to bind B<sslh> to
115several addresses.
116
117=item B<--ssl> I<target address>
118
119=item B<--tls> I<target address>
120
121Interface and port on which to forward SSL connection,
122typically I<localhost:443>.
123
124Note that you can set B<sslh> to listen on I<ext_ip:443> and
125B<httpd> to listen on I<localhost:443>: this allows clients
126inside your network to just connect directly to B<httpd>.
127
128Also, B<sslh> probes for SSLv3 (or TLSv1) handshake and will
129reject connections from clients requesting SSLv2. This is
130compliant to RFC6176 which prohibits the usage of SSLv2. If
131you wish to accept SSLv2, use B<--default> instead.
132
133=item B<--ssh> I<target address>
134
135Interface and port on which to forward SSH connections,
136typically I<localhost:22>.
137
138=item B<--openvpn> I<target address>
139
140Interface and port on which to forward OpenVPN connections,
141typically I<localhost:1194>.
142
143=item B<--xmpp> I<target address>
144
145Interface and port on which to forward XMPP connections,
146typically I<localhost:5222>.
147
148=item B<--http> I<target address>
149
150Interface and port on which to forward HTTP connections,
151typically I<localhost:80>.
152
153=item B<--tinc> I<target address>
154
155Interface and port on which to forward tinc connections,
156typically I<localhost:655>.
157
158This is experimental. If you use this feature, please report
159the results (even if it works!)
160
161=item B<--anyprot> I<target address>
162
163Interface and port on which to forward if no other protocol
164has been found. Because B<sslh> tries protocols in the order
165specified on the command line, this should be specified
166last. If no default is specified, B<sslh> will forward
167unknown protocols to the first protocol specified.
168
169=item B<-v>, B<--verbose>
170
171Increase verboseness.
172
173=item B<-n>, B<--numeric>
174
175Do not attempt to resolve hostnames: logs will contain IP
176addresses. This is mostly useful if the system's DNS is slow
177and running the I<sslh-select> variant, as DNS requests will
178hang all connections.
179
180=item B<-V>
181
182Prints B<sslh> version.
183
184=item B<-u> I<username>, B<--user> I<username>
185
186Requires to run under the specified username.
187
188=item B<-P> I<pidfile>, B<--pidfile> I<pidfile>
189
190Specifies a file in which to write the PID of the main
191server.
192
193=item B<-i>, B<--inetd>
194
195Runs as an I<inetd> server. Options B<-P> (PID file), B<-p>
196(listen address), B<-u> (user) are ignored.
197
198=item B<-f>, B<--foreground>
199
200Runs in foreground. The server will not fork and will remain connected
201to the terminal. Messages normally sent to B<syslog> will also be sent
202to I<stderr>.
203
204=item B<--background>
205
206Runs in background. This overrides B<foreground> if set in
207the configuration file (or on the command line, but there is
208no point setting both on the command line unless you have a
209personality disorder).
210
211=back
212
213=head1 FILES
214
215=over 4
216
217=item F</etc/init.d/sslh>
218
219Start-up script. The standard actions B<start>, B<stop> and
220B<restart> are supported.
221
222=item F</etc/default/sslh>
223
224Server configuration. These are environment variables
225loaded by the start-up script and passed to B<sslh> as
226command-line arguments. Refer to the OPTIONS section for a
227detailed explanation of the variables used by B<sslh>.
228
229=back
230
231=head1 SEE ALSO
232
233Last version available from
234L<http://www.rutschle.net/tech/sslh>, and can be tracked
235from L<http://freecode.com/projects/sslh>.
236
237=head1 AUTHOR
238
239Written by Yves Rutschle
240

Built with git-ssb-web