1 .lf 1 stdin 2 .TH LLOADD 8C "2025/05/22" "OpenLDAP 2.6.10" 3 .\" Copyright 2017-2024 The OpenLDAP Foundation All Rights Reserved. 4 .\" Copying restrictions apply. See COPYRIGHT/LICENSE. 5 .\" $OpenLDAP$ 6 .SH NAME 7 lloadd \- LDAP Load Balancer Daemon 8 .SH SYNOPSIS 9 .B /usr/libexec/lloadd 10 [\c 11 .BR \-4 | \-6 ] 12 [\c 13 .BI \-d \ debug-level\fR] 14 [\c 15 .BI \-f \ lloadd-config-file\fR] 16 [\c 17 .BI \-h \ URLs\fR] 18 [\c 19 .BI \-n \ service-name\fR] 20 [\c 21 .BI \-s \ syslog-level\fR] 22 [\c 23 .BI \-l \ syslog-local-user\fR] 24 [\c 25 .BI \-o \ option\fR[ = value\fR]] 26 [\c 27 .BI \-r \ directory\fR] 28 [\c 29 .BI \-u \ user\fR] 30 [\c 31 .BI \-g \ group\fR] 32 .SH DESCRIPTION 33 .LP 34 .B Lloadd 35 is the stand-alone LDAP daemon. It listens for LDAP connections on 36 any number of ports (default \fB389\fP), forwarding the LDAP operations 37 it receives over these connections to be handled by the configured 38 backends. 39 .B lloadd 40 is typically invoked at boot time, usually out of 41 .BR /etc/rc.local . 42 Upon startup, 43 .B lloadd 44 normally forks and disassociates itself from the invoking tty. 45 If configured in the config file, the 46 .B lloadd 47 process will print its process ID (see 48 .BR getpid (2)) 49 to a 50 .B .pid 51 file, as well as the command line options during invocation to an 52 .B .args 53 file (see 54 .BR lloadd.conf (5)). 55 If the 56 .B \-d 57 flag is given, even with a zero argument, 58 .B lloadd 59 will not fork and disassociate from the invoking tty. 60 .LP 61 See the "OpenLDAP Administrator's Guide" for more details on 62 .BR lloadd . 63 .SH OPTIONS 64 .TP 65 .B \-4 66 Listen on IPv4 addresses only. 67 .TP 68 .B \-6 69 Listen on IPv6 addresses only. 70 .TP 71 .BI \-d \ debug-level 72 Turn on debugging as defined by 73 .IR debug-level . 74 If this option is specified, even with a zero argument, 75 .B lloadd 76 will not fork or disassociate from the invoking terminal. Some general 77 operation and status messages are printed for any value of \fIdebug-level\fP. 78 \fIdebug-level\fP is taken as a bit string, with each bit corresponding to a 79 different kind of debugging information. See <ldap_log.h> for details. 80 Comma-separated arrays of friendly names can be specified to select 81 debugging output of the corresponding debugging information. 82 All the names recognized by the \fIloglevel\fP directive 83 described in \fBlloadd.conf\fP(5) are supported. 84 If \fIdebug-level\fP is \fB?\fP, a list of installed debug-levels is printed, 85 and lloadd exits. 86 87 Remember that if you turn on packet logging, packets containing bind passwords 88 will be output, so if you redirect the log to a logfile, that file should 89 be read-protected. 90 .TP 91 .BI \-s \ syslog-level 92 This option tells 93 .B lloadd 94 at what debug-level debugging statements should be logged to the 95 .BR syslog (8) 96 facility. 97 The value \fIsyslog-level\fP can be set to any value or combination 98 allowed by the \fB\-d\fP switch. 99 Lloadd logs all messages selected by \fIsyslog-level\fP 100 at the 101 .BR syslog (3) 102 severity debug-level \fBDEBUG\fP, 103 on the unit specified with \fB\-l\fP. 104 .TP 105 .BI \-n \ service-name 106 Specifies the service name for logging and other purposes. Defaults 107 to basename of argv[0], i.e.: "lloadd". 108 .TP 109 .BI \-l \ syslog-local-user 110 Selects the local user of the 111 .BR syslog (8) 112 facility. Value can be 113 .BR LOCAL0 , 114 through 115 .BR LOCAL7 , 116 as well as 117 .B USER 118 and 119 .BR DAEMON . 120 The default is 121 .BR LOCAL4 . 122 However, this option is only permitted on systems that support 123 local users with the 124 .BR syslog (8) 125 facility. 126 Logging to syslog(8) occurs at the "DEBUG" severity debug-level. 127 .TP 128 .BI \-f \ lloadd-config-file 129 Specifies the lloadd configuration file. The default is 130 .BR /etc/openldap/lloadd.conf . 131 .TP 132 .BI \-h \ URLlist 133 .B lloadd 134 will by default serve 135 .B ldap:/// 136 (LDAP over TCP on all interfaces on default LDAP port). That is, 137 it will bind using INADDR_ANY and port \fB389\fP. 138 The 139 .B \-h 140 option may be used to specify LDAP (and other scheme) URLs to serve. 141 For example, if lloadd is given 142 .BR "\-h \(dqldap://127.0.0.1:9009/ ldaps:/// ldapi:///\(dq" , 143 it will listen on 127.0.0.1:9009 for LDAP, 0.0.0.0:636 for LDAP over TLS, 144 and LDAP over IPC (Unix domain sockets). Host 0.0.0.0 represents 145 INADDR_ANY (any interface). 146 A space separated list of URLs is expected. The URLs should be of the LDAP, 147 PLDAP, LDAPS, PLDAPS, or LDAPI schemes, and generally without a DN or other 148 optional parameters (excepting as discussed below). Support for the latter 149 three schemes depends on selected configuration options. Hosts may be specified 150 by name or IPv4 and IPv6 address formats. Ports, if specified, must be 151 numeric. The default ldap:// port is \fB389\fP and the default ldaps:// port 152 is \fB636\fP, same for the proxy enabled variants. 153 154 The PLDAP and PLDAPS URL schemes provide support for the HAProxy proxy protocol 155 version 2, which allows a load balancer or proxy server to provide the remote 156 client IP address to slapd to be used for access control or logging. Ports 157 configured for PLDAP or PLDAPS will only accept connections that include the 158 necessary proxy protocol header. Connections to these ports should be 159 restricted at the network level to only trusted load balancers or proxies to 160 avoid spoofing of client IP addresses by third parties. 161 162 At the moment, the load balancer does not act on the recorded address in any 163 way. 164 165 For LDAP over IPC, 166 .B name 167 is the name of the socket, and no 168 .B port 169 is required, nor allowed; note that directory separators must be 170 URL-encoded, like any other characters that are special to URLs; 171 so the socket 172 173 /usr/local/var/ldapi 174 175 must be specified as 176 177 ldapi://%2Fusr%2Flocal%2Fvar%2Fldapi 178 179 The default location for the IPC socket is /var/openldap/run/ldapi 180 .TP 181 .BI \-r \ directory 182 Specifies a directory to become the root directory. lloadd will 183 change the current working directory to this directory and 184 then 185 .BR chroot (2) 186 to this directory. This is done after opening listeners but before 187 reading any configuration file or initializing any backend. When 188 used as a security mechanism, it should be used in conjunction with 189 .B \-u 190 and 191 .B \-g 192 options. 193 .TP 194 .BI \-u \ user 195 .B lloadd 196 will run lloadd with the specified user name or id, and that user's 197 supplementary group access list as set with initgroups(3). The group ID 198 is also changed to this user's gid, unless the \fB\-g\fP option is used to 199 override. Note when used with 200 .BR \-r , 201 lloadd will use the user database in the change root environment. 202 .TP 203 .BI \-g \ group 204 .B lloadd 205 will run with the specified group name or id. Note when used with 206 .BR \-r , 207 lloadd will use the group database in the change root environment. 208 .TP 209 .BI \-o \ option\fR[ = value\fR] 210 This option provides a generic means to specify options without the need to reserve 211 a separate letter for them. 212 213 It supports the following options: 214 .RS 215 .TP 216 .BR slp= { on \||\| off \||\| \fIslp-attrs\fP } 217 When SLP support is compiled into lloadd, disable it (\fBoff\fP), 218 enable it by registering at SLP DAs without specific SLP attributes (\fBon\fP), 219 or with specific SLP attributes 220 .I slp-attrs 221 that must be an SLP attribute list definition according to the SLP standard. 222 223 For example, \fB"slp=(tree=production),(server-type=OpenLDAP),(server\-version=2.4.15)"\fP 224 registers at SLP DAs with the three SLP attributes tree, server-type and server-version 225 that have the values given above. 226 This allows one to specifically query the SLP DAs for LDAP servers holding the 227 .I production 228 tree in case multiple trees are available. 229 .RE 230 231 .SH RELATION TO SLAPD(8) 232 .B Lloadd 233 can be compiled as a 234 .B slapd 235 loadable module. In that case, it can be loaded as such: 236 .LP 237 .nf 238 .ft tt 239 moduleload path/to/lloadd.la 240 backend lload 241 listen "listening URLs" 242 .ft 243 .fi 244 245 This enables 246 .B lloadd 247 to provide additional features through the host slapd process like access to 248 run-time statistics in 249 .B cn=monitor 250 and dynamic configuration from 251 .BR cn=config . 252 253 The listening sockets specified will be under direct control of 254 .B lloadd 255 and need to be different from the sockets slapd is configured to listen on. 256 Clients connecting to these are completely separate from regular LDAP clients 257 connecting to the usual 258 .B slapd 259 sockets - 260 .B lloadd 261 clients have no access to slapd databases, similarly, 262 .B slapd 263 client traffic does not propagate to the 264 .B lloadd 265 backend servers in any way. 266 267 .SH CN=MONITOR INTERFACE 268 As part of 269 .BR lloadd 's 270 .B cn=monitor 271 interface it is possible to close a client connection it manages by writing to 272 the corresponding entry, 273 .B replacing 274 the 275 .B olmConnectionState 276 attribute with the value 277 .BR closing . 278 This is subject to ACLs configured on the monitor database. The server will 279 send a 280 .B Notice of Disconnection 281 to the client, refuse any new operations and once all pending operations have 282 finished, close the connection. 283 284 For example, to close connection number 42: 285 286 .LP 287 .nf 288 .ft tt 289 dn: cn=connection 42,cn=incoming connections,cn=load balancer,cn=backends,cn=monitor 290 changetype: modify 291 replace: olmConnectionState 292 olmConnectionState: closing 293 .ft 294 .fi 295 296 .SH EXAMPLES 297 To start 298 .I lloadd 299 and have it fork and detach from the terminal and start load-balancing 300 the LDAP servers defined in the default config file, just type: 301 .LP 302 .nf 303 .ft tt 304 /usr/libexec/lloadd 305 .ft 306 .fi 307 .LP 308 To start 309 .B lloadd 310 with an alternate configuration file, and turn 311 on voluminous debugging which will be printed on standard error, type: 312 .LP 313 .nf 314 .ft tt 315 /usr/libexec/lloadd \-f /var/tmp/lloadd.conf \-d 255 316 .ft 317 .fi 318 .LP 319 To start 320 .B lloadd 321 as a module inside a slapd process listening on ldap://:1389 and ldaps://, 322 put the following in your slapd.conf (or its equivalent in cn=config): 323 .LP 324 .nf 325 .ft tt 326 moduleload lloadd.la 327 backend lload 328 listen "ldap://:1389 ldaps://" 329 .ft 330 .fi 331 .SH "SEE ALSO" 332 .BR ldap (3), 333 .BR lloadd.conf (5), 334 .BR slapd-config (5), 335 .BR slapd-monitor (5), 336 .BR slapd (8). 337 .LP 338 "OpenLDAP Administrator's Guide" (http://www.OpenLDAP.org/doc/admin/) 339 .SH BUGS 340 See http://www.openldap.org/its/ 341 .SH ACKNOWLEDGEMENTS 342 .lf 1 ./../Project 343 .\" Shared Project Acknowledgement Text 344 .B "OpenLDAP Software" 345 is developed and maintained by The OpenLDAP Project <http://www.openldap.org/>. 346 .B "OpenLDAP Software" 347 is derived from the University of Michigan LDAP 3.3 Release. 348 .lf 342 stdin 349