i was wondering if it is possible to use letsencrypt certificates for the tls encryption of bareos as i already did with proftp.
I tried to adopt the usage of the letsenrypt certificates from proftp but this is not working.
Bareos is not able to load the keys
Error: tls_gnutls.c:205 Error loading key from ...
As this failure message doesnt say much to me i need to get a hint what this error code actually means.
saschadd
I get an error message
Error: tls_gnutls.c:205 Error loading key from ...
when i try to load the letsencrypt files directly from
/etc/letsencrypt/live/mydomain.com/...
Meanwhile i was able to resolve this failure message by
1 copying over the letsencrypt files from /etc/letsencrypt/live/mydomain.com/...
to /etc/bareos/ssl
2 cat /etc/letsencrypt/live/mydomain.com/fullchain.pem /etc/letsencrypt/live/mydomain.com/privkey.pem > stunnel.pem
3 making a CA certificate file with the Identrust root certificate https://www.identrust.com/certificates/trustid/root-download-x3.html
and then using
TLS CA Certificate File = /etc/bareos/ssl/ca.pem
# This is a server certificate, used for incoming
# console connections.
TLS Certificate = /etc/bareos/ssl/stunnel.pem
TLS Key = /etc/bareos/ssl/privkey.pem
After doing this bareos-dir starts without a failure message.
So it might be possible to use letsencrypt.
How could i test if it is working and the connection is encrypted?
But the following error remains
Error: tls_gnutls.c:220 Failed to load DH file /etc/bareos/ssl/dh2048.pem
when adding the line
TLS DH File = /etc/bareos/ssl/dh2048.pem
and i dont know why.
But i want to use Transport Encryption as described in Chapter 29 and not Data Encryption.
to be more clear, there are some infos missing how to get these
DAEMON_USER=bareos
DAEMON_GROUP=bareos
DIRECTOR_DAEMON_USER=${DAEMON_USER}
STORAGE_DAEMON_USER=${DAEMON_USER}
FILE_DAEMON_USER=root
STORAGE_DAEMON_GROUP=${DAEMON_GROUP}
WORKING_DIR=/var/lib/bareos
variables working in configure.
I now i can do
./configure \
....
to let the package configure but i dont know where to enter these variables.
Do i have to copy the whole text to a file and run it?
sorry for these beginners questions. ;)
It seems to work, but bareos-dir is only able to load the certificates when the are copied over to /etc/bareos/ssl and chowned to bareos:bareos.
But bareos-fd, bareos-sd and bconsole start with the files in /etc/letsencrypt/live/mydomain/...
Why is bareos-dir not able to load the files from there but the other services are?