On 2025-09-01 16:55, Rob Gerber wrote:
Avahi is a decentralized local hostname resolution protocol.

Here is the text of my avahi configuration notes. These are red hat / centos / rocky linux / alma linux centric. I specifically used them on Rocky Linux 9.x. I hope you can get the general idea. The most important things I think you need to know is that you will need to set up the avahi daemon on your server, and that there are avahi-specific ping and resolver tools to verify that avahi is working correctly.

Additionally, the following text is formatted like a bash script, with # signs used to add comments. It is NOT a script, and shouldn't be dropped into place as such.

notes begin:
# avahi mdns setup, for resolving names using multicast DNS, when local DNS isn't awesome.

sudo dnf install avahi avahi-tools nss-mdns

sudo systemctl enable --now avahi-daemon

nano /etc/nsswitch.conf
OR
nano /etc/authselect/user-nsswitch.conf # preferred, nsswitch will get overwritten by user-nsswitch

# find the line like:
hosts: files dns

# It should look like: # in my case, it was already correct, no need to change)
hosts: files mdns4_minimal [NOTFOUND=return] dns


Test:
ping hostname.localtld
OR
avahi-resolve-host-name hostname.localtld

# If that doesn't work out of the box, maybe try dropping the firewall.

# I had to let mdns through the firewall.
# sudo firewall-cmd --get-active-zones
# should see output like
public
  interfaces: eth0
# probably only relevant to verify what zones you have configured.

# list services to see if mdns is allowed.
sudo firewall-cmd --zone=public --list-services

# if mdns isn't listed, add its service to the list:
sudo firewall-cmd --zone=public --add-service=mdns --permanent
sudo firewall-cmd --reload

# list services to see if mdns is allowed.
sudo firewall-cmd --zone=public --list-services

Test:
ping hostname.localtld
OR
avahi-resolve-host-name hostname.localtld

I'm running avahi - needed to share printers. Avahi-daemon -s shows it is running. And my servers are also defined in /etc/hosts. Any test that requires name resolution works.

I am not running a firewall on the server. The only firewall I even ever looked at was ufw and it is not installed.

When I use 127.0.01, bconsole shows the client is reachable and working properly.

However, I am having a problem reaching my workstation, which is similarly not running a firewall. I get [DE0029] Unable to connect to Client: <client name>-fd on <client IP>:9102. ERR=Connection refused

I don't know if this is related or a separate issue. The fd is running on my workstation, and the fd name and password are the same on the server and workstation.



_______________________________________________
Bacula-users mailing list
Bacula-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/bacula-users

Reply via email to