This episode covers basic Bacula daemon security: unique passwords per authentication pair (director-sd, director-fd, fd-sd), the danger of using default passwords, an introduction to optional TLS, plus the port mapping of 9101/9102/9103 and the firewall policy protecting all components.

In episode 11, media was up and running. Now we talk about something often ignored until an incident happens: daemon security. Bacula is a system that reads all your server files and stores them on media — if the daemons aren't secured, you've just built a leaky pipe for your most sensitive data.
Fortunately, Bacula has a simple yet strong authentication model: shared passwords per daemon pair. The problem isn't the model — it's the discipline of applying it. Episode 12 covers how to set passwords correctly, understand ports, and design a firewall policy.
Bacula uses shared-secret authentication between two components. There are three pairs that must match:
| Pair | Configured in | Meaning |
|---|---|---|
| Director ↔ SD | bacula-dir.conf (Storage) & bacula-sd.conf (Director) | SD accepts Director commands |
| Director ↔ FD | bacula-dir.conf (Client) & bacula-fd.conf (Director) | FD serves backups for the Director |
| FD ↔ SD | bacula-dir.conf (Client/FDStorage) & bacula-sd.conf | FD authenticates itself to SD when sending data |
Note the third pair: when the FD sends data to the SD, the Director introduces them, using the same password stored in the Client resource and in the SD.
Director {
Name = bacula-dir
Password = "rahasia-sd"
}Storage {
Name = FileStorage
Address = 127.0.0.1
SDPort = 9102
Password = "rahasia-sd"
Device = FileStorage
MediaType = File
}Package installations often ship example configs with passwords like password or secret. Replacing them with strong values is the mandatory first step:
openssl rand -base64 24Each daemon must have a different password. One Director password shared across all FDs means one leak = every client is open. Use at least a unique password per client (episode 14).
Warning
Bacula passwords are stored plaintext in the config files. That's why file permissions must be protected: /etc/bacula/*.conf should be 0640 root:bacula, and backups of these config files must be kept as secure as the data itself.
bacula-dir -> TCP 9101
bacula-sd -> TCP 9102
bacula-fd -> TCP 9103All ports can be changed via the DirPort, SDPort, FDPort directives. Changing default ports is one extra security layer (obscurity) — minor effect, but harmless in environments that allow it.
The principle: only open the ports truly needed, only from the right sources. An example with ufw:
sudo ufw allow from 10.0.0.0/24 to any port 9102 proto tcp
sudo ufw allow from 10.0.0.0/24 to any port 9103 proto tcpRules of thumb:
ss -tlnp | grep -E "9101|9102|9103"Important
Backup is a network of sensitive data traffic. If possible, isolate all Bacula components into a separate VLAN so FDs never interact with the user segment. We go deeper into this network segmentation principle in episode 13.
Password authentication protects who connects, but not the content of the conversation. Without TLS, backup data crosses the network as plaintext — anyone who can sniff traffic can read the backup contents. TLS encrypts all Director↔SD, Director↔FD, and FD↔SD communication.
Bacula supports native TLS on all three daemons, with either self-signed certificates or an internal CA. Full configuration and steps are the main topic of episode 13.
Director {
...
TLS Enable = yes
TLS CA Certificate File = /etc/bacula/certs/ca.pem
TLS Certificate = /etc/bacula/certs/director.pem
TLS Key = /etc/bacula/certs/director.key
}For now, remember the hierarchy: authentication first (passwords), then integrity (TLS), then surface minimization (firewall/VLAN).
grep -rn "Password" /etc/bacula/ | grep -v "#"
ss -tlnp | grep -E "9101|9102|9103"
ls -l /etc/bacula/These three checks reveal: what passwords are installed (and whether any are still default), which ports are open, and who can read the configuration. Do this after every installation change.
Key takeaways:
In the next episode, episode 13, we'll enable TLS and secure the network — certificates for the Director, SD, and FD, TLS configuration in all three files, restricting daemon access via firewall and VLAN, data encryption (Enterprise) or stunnel pipeline, and checksum integrity. This is the full security act of Bacula.