-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathpenctl.1
281 lines (266 loc) · 8.69 KB
/
penctl.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
.TH PENCTL 1 LOCAL
.SH NAME
penctl - control a running pen load balancer
.SH SYNOPSIS
.B penctl
host:port|/path/to/socket command
.SH EXAMPLE
penctl lbhost:8888 roundrobin
Turns off client tracking on the load balancer running on lbhost.
penctl /var/run/pen/tmp/ctrl status
Prints status information in html format.
.SH DESCRIPTION
.I Penctl
connects to the optional control socket on a pen load balancer.
It reads commands from the command line, performs minimal syntax
checking and sends them to pen. Replies, if any, are printed on stdout.
The program can also be used through the cgi script penctl.cgi,
which allows pen to be controlled from any web browser.
.SH OPTIONS
.TP
\fIhost:port\fR
Specifies a control port where the load balancer listens for commands.
.SH COMMANDS
.TP
\fIabort_on_error\fR
Call abort() when a fatal error is encountered. This will create a core file which allows further troubleshooting. Disabled by default.
.TP
\fIno abort_on_error\fR
Exit normally on fatal error with an error code which indicates failure.
.TP
\fIacl N permit|deny sourceip4 [mask]\fR
Adds an entry to access list N, where N is a number from 0 to 9. The source and mask addresses are in the usual dotted quad notation. If mask is omitted, it defaults to 255.255.255.255.
.TP
\fIacl N permit|deny sourceip6[/length]\fR
If the source address contains the character ':', the address is interpreted as
IPv6. Unlike IPv4 access entries, a length is used to indicate the mask. If
length is omitted, it defaults to 128.
.TP
\fIacl N permit|deny country NN\fR
If the source address is the special word "country", a two-letter country
code can be used to restrict access to the load balancer. For this to work,
pen must be built with geoip support.
.TP
\fIno acl N\fR
Deletes all entries from access list N. The resulting access list
permits all traffic.
.TP
\fIascii\fR
Communication dumps in ascii format (cf option -a).
.TP
\fIno ascii\fR
Communication dumps in hex format.
.TP
\fIblacklist\fR
Return current blacklist time in seconds.
.TP
\fIblacklist T\fR
Set the blacklist time in seconds.
.TP
\fIblock\fR
Do not make sockets nonblocking. This is obsolete as of 0.26.0 and does nothing.
.TP
\fIno block\fR
Make sockets nonblocking.
.TP
\fIclient_acl N\fR
Check connecting clients against access list N (default 0).
.TP
\fIclients_max [N]\fR
With argument, increase the maximum number of known clients. Returns max number of clients.
.TP
\fIclose N\fR
Close connection N
.TP
\fIconnection N\fR
Display some basic information about connection N.
.TP
\fIconn_max [N]\fR
With argument, increase the max number of simultaneous connections. Returns max number.
.TP
\fIcontrol\fR
Return address and port where pen listens for control connections.
.TP
\fIcontrol_acl N\fR
Check accesses to the control port against access list N (default 0).
.TP
\fIdebug\fR
Return current debug level.
.TP
\fIdebug N\fR
Set debug level to N.
.TP
\fIdelayed_forward\fR
Always wait for the next round of the main loop before forwarding data. Normally pen tries to do that immediately. This is obsolete as of 0.26.0 and does nothing.
.TP
\fIno delayed_forward\fR
Try to forward data immediately, to avoid the overhead of copying it to a temporary buffer and waiting for the next main loop round.
.TP
\fIdsr_if IF\fR
Use IF as the interface for Direct Server Return.
.TP
\fIdummy\fR
Act as a dummy web server with very limited functionality but high performance. Only useful for testing. Disabled by default.
.TP
\fIno dummy\fR
Do not act as a dummy web server.
.TP
\fIepoll\fR
Use epoll for event management (Linux).
This is the default on Linux.
.TP
\fIexit\fR
Exit. Only available if pen was started with the -X option.
.TP
\fIhash\fR
Use a hash on the client IP address for initial server selection.
.TP
\fIno hash\fR
Do not use a hash.
.TP
\fIhttp\fR
Add X-Forwarded-For headers to http requests.
.TP
\fIno http\fR
Do not add X-Forwarded-For headers.
.TP
\fIidle_timeout N\fR
Close connections that have been inactive for N seconds. Default 0 = never close.
.TP
\fIidlers [N]\fR
Create N reliable idle connections to the backend servers. Without argument, display the current/requested number of reliable idlers.
.TP
\fIinclude FILE\fR
Read commands from file.
.TP
\fIkqueue\fR
Use kqueue for event management (FreeBSD, NetBSD, OpenBSD).
This is the default on the systems that have it.
.TP
\fIlisten\fR
Return local address and port pen listens to for incoming client connections.
.TP
\fIlisten [address:]:port
Close the listening socket and reopen using specified address (optional) and port.
.TP
\fIlog\fR
Show where pen is logging, if anywhere.
.TP
\fIlog FILE\fR
Log to FILE.
.TP
\fImode\fR
Write a summary of the current mode of operation. The listed modes are block, delayed_forward, hash, roundrobin, stubborn.
.TP
\fIno log\fR
Turn off logging.
.TP
\fIpending_max N\fR
Max allowed number of pending nonblocking connections. Default 100, minimum 1.
.TP
\fIpid\fR
Return the process id of the running daemon.
.TP
\fIpoll\fR
Use poll for event management.
.TP
\fIprio\fR
Use the priority based algorithm.
.TP
\fIno prio\fR
Do not use the priority based algorithm.
.TP
\fIrecent [N]\fR
Shows which clients have connected in the last N seconds (default 300).
.TP
\fIroundrobin\fR
Use round-robin server selection without client tracking
.TP
\fIno roundrobin\fR
.TP
\fIselect\fR
Use select for event management.
.TP
\fIserver N [ acl A | address A | port P | max M | hard H | blacklist T | weight W | prio P ]\fR
Change acl, address, port, weight, priority and/or max connections for server N, or blacklist it for T seconds.
.TP
\fIservers\fR
List address, port, weight, priority and max number of simultaneous connections for each remote server.
.TP
\fIsocket N\fR
Show to which connection socket N belongs.
.TP
\fIsource IP\fR
Set the local address to IP for upstream connections, i.e. where Pen connects to backend servers.
.TP
\fIssl_ciphers CIPHERS\fR
Choose list of available SSL ciphers, specified in the format described in https://www.openssl.org/docs/apps/ciphers.html.
.TP
\fIssl_client_renegotiation_interval S\fR
Allowing the client to request renegotiation is a potential denial of service vector. This command specifies the minimum number of seconds the client has to wait between requests for renegotiation requests. Default 3600 = effectively disabled.
.TP
\fIssl_ocsp_response FILENAME\fR
Specifies the location of a file containing a pre-fetched OCSP response. The file must be refreshed regularly by a cron job or similar and the ssl_ocsp_response command repeated to make Pen re-read the file..
.TP
\fIssl_option OPTION\fR
Manipulate SSL options. The available options are no_sslv2, no_sslv3, no_tlsv1, no_tlsv1.1, no_tlsv1.2, cipher_server_preference. Use the command multiple times to specify multiple options.
.TP
\fIssl_sni_path PATH\fR
This command enables the Server Name Indication TLS extension by specifying a directory where domain.key, domain.crt and domain.ca files can be found.
.TP
\fIstatus\fR
Print status information in html format.
.TP
\fIstubborn\fR
If the initial server selection is unavailable, close the client connection without trying another
.TP
\fIno stubborn\fR
.TP
\fItarpit_acl [N]\fR
Used in DSR mode. If N is an existing access list, Pen will reply to ARP requests for IP addresses that match the access list, and reply with SYN+ACK to TCP SYN requests to these addresses. The result is that someone trying to scan a network will be slowed down by a large number of false positives.
.TP
\fItcp_fastclose up|down|both|off\fR
Close both sockets to upstream and downstream if one of them closes theirs. Default = off.
.TP
\fItcp_nodelay\fR
Set TCP_NODELAY on sockets, effectively turning off the Nagle algorithm.
.TP
\fIno tcp_nodelay\fR
Do not set TCP_NODELAY on sockets. This is the default.
.TP
\fItimeout\fR
Return current connect timeout in seconds.
.TP
\fItimeout N\fR
Set connect timeout to N seconds.
.TP
\fItracking N\fR
Set tracking time, i.e. how long clients will be remembered. The default 0 will never expire clients based on time.
.TP
\fItransparent\fR
On compatible platforms, use the client's address as source address in the connection to the backend server.
.TP
\fIno transparent\fR
Use Pen's address as source address in the connection to the backend server.
.TP
\fIweb_stats\fR
Return file name of html status reports, if any.
.TP
\fIweb_stats FILE\fR
Set the name of html status reports.
.TP
\fIno web_stats\fR
Do not generate html status reports.
.TP
\fIweight\fR
Use weight for server selection.
.TP
\fIno weight\fR
Do not use weight for server selection.
.TP
\fIwrite [FILE]\fR
Write the current configuration into a file which can be used to start pen. If FILE is omitted, the configuration is written into pen's original configuration file.
.SH SEE ALSO
pen(1)
.SH AUTHOR
Copyright (C) 2002-2015 Ulric Eriksson, <ulric@siag.nu>.