02.12.2015 Views

Network UPS Tools User Manual

Network UPS Tools User Manual

Network UPS Tools User Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>Network</strong> <strong>UPS</strong> <strong>Tools</strong> <strong>User</strong> <strong>Manual</strong> 44 / 84<br />

upsd (required): certificate database and self certificate<br />

Edit the upsd.conf to tell where find the certificate database:<br />

CERTPATH /usr/local/ups/etc/cert_db<br />

Also tell which is the certificate to send to clients to authenticate itself and the password to decrypt private key associated to<br />

certificate:<br />

CERTIDENT ’certificate name’ ’database password’<br />

Note<br />

Generally, the certificate name is the server domain name, but is not a hard rule. The certificate can be named as useful.<br />

upsd (optional): client authentication<br />

Note<br />

This functionality is disabled by default. To activate it, recompile NUT with WITH_CLIENT_CERTIFICATE_VALIDATION<br />

defined:<br />

make CFLAGS="-DWITH_CLIENT_CERTIFICATE_VALIDATION"<br />

<strong>UPS</strong>D can accept three levels of client authentication. Just specify it with the directive CERTREQUEST with the corresponding<br />

value in the upsd.conf file:<br />

• NO: no client authentication.<br />

• REQUEST: a certificate is request to the client but it is not strictly validated. If the client does not send any certificate, the<br />

connection is closed.<br />

• REQUIRE: a certificate is requested to the client and if it is not valid (no validation chain) the connection is closed.<br />

Like CA certificates, you can add many trusted client and CA certificates in server’s certificate databases.<br />

upsmon (required): upsd authentication<br />

In order for upsmon to securely connect to upsd, it must authenticate it. You must associate an upsd host name to security rules<br />

in upsmon.conf with the directive CERTHOST.<br />

CERTHOST associates a hostname to a certificate name. It also determines whether a SSL connection is mandatory, and if the<br />

server certificate must be validated.<br />

CERTHOST ’hostname’ ’certificate name’ ’certverify’ ’forcessl’<br />

If the flag forcessl is set to 1, and upsd answers that it can not connect with SSL, the connection closes. If the flag certv<br />

erify is set to 1 and the connection is done in SSL, upsd’s certificate is verified and its name must be the specified certificate<br />

name.<br />

To prevent security leaks, you should set all certverify and forcessl flags to 1 (force SSL connection and validate all<br />

certificates for all peers).<br />

You can specify CERTVERIFY and FORCESSL directive (to 1 or 0) to define a default security rule to apply to all host not<br />

specified with a dedicated CERTHOST directive.<br />

If a host is not specified in a CERTHOST directive, its expected certificate name is its hostname.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!