I have Bareos 17.2.4-9 installed on Debian Jessie. It was built from the source using the --with-openssl
switch.
It works perfectly WITHOUT TLS enabled, however when I try to configure it to use TLS, I get ...
# bconsole
Connecting to Director Server-Name:9101
Authorization problem with Director at "Server-Name:9101"
Most likely the passwords do not agree.
If you are using TLS, there may have been a certificate validation error during the TLS handshake.
Please see http://doc.bareos.org/master/html/bareos-manual-main-reference.html#AuthorizationErrors for help.
I suspect it's because of a validation problem between the SELF-SIGNED certificate and the server name. The server domain name is NOT set.
I created the certificate as follows ...
# hostname
Server-Name
# domainname
(none)
# openssl req -new -x509 -nodes -out Server-Name.pem -keyout Server-Name.pem -days 3650
# chmod 600 Server-Name.pem
Generating a 2048 bit RSA private key
..+++
............................+++
writing new private key to 'Server-Name.pem'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [AU]:DE
State or Province Name (full name) [Some-State]:NI
Locality Name (eg, city) []:Leer
Organization Name (eg, company) [Internet Widgits Pty Ltd]:GNM
Organizational Unit Name (eg, section) []:
Common Name (e.g. server FQDN or YOUR name) []:Server-Name
Email Address []:First.Last@redacted.de
The config files are...
/etc/bareos/bareos-dir.d/director/bareos-dir.conf
Director { # define myself
Name = bareos-dir
QueryFile = "/usr/lib/bareos/scripts/query.sql"
Maximum Concurrent Jobs = 10
Password = "secret" # Console password
Messages = Daemon
Auditing = yes
DirAddress = Server-Name
TLS Enable = yes
TLS Require = yes
TLS CA Certificate File = /etc/bareos/TLS/Bareos-Server-Name.pem
TLS Certificate = /etc/bareos/TLS/Bareos-Server-Name.pem
TLS Key = /etc/bareos/TLS/Bareos-Server-Name.pem
# TLS Verify Peer = yes
TLS Allowed CN = Server-Name
}
/etc/bareos/bconsole.conf
Director {
Name = bareos-dir
# address = localhost
address = Server-Name
Password = "secret"
Description = "Bareos Console credentials for local Director"
}