11

avahi-daemon continues to bind to eth0 ports 5353 and 53791. Is there any way to tell avahi-daemon to only bind to localhost and not eth0 ?

/etc/avahi/avahi-daemon.conf

use-ipv4=yes
use-ipv6=no
allow-interfaces=lo
deny-interfaces=eth0

netstat -nap

udp   0   0 0.0.0.0:53791   0.0.0.0:*   3145/avahi-daemon:
udp   0   0 0.0.0.0:5353    0.0.0.0:*   3145/avahi-daemon:

3 Answers3

9

avahi-daemon implements Zeroconf network configuration protocol. It is useless unless it operates on network interface. You can select on which network interface you want it to run using "allow-interfaces" and "deny-interfaces" directives, but if you do not want to run in on any real network interface (as you seem), then you should not be running it at all, so simply shut it down (for example by putting exit 0 in /etc/default/avahi-daemon) or even better remove the package completely if you do not plan to using it in the future.

It does not make any sense to run it only at lo interface.

Matija Nalis
  • 2,512
2

according to https://wiki.debian.org/ZeroConf here's an official way to stop and disable avahi-daemon completely:

systemctl stop avahi-daemon.socket
systemctl stop avahi-daemon.service
systemctl disable avahi-daemon

make it bind to lo does not make any sense as pointed out by others in the comments.

0

For older versions of centos you could try this :https://www.thegeekdiary.com/how-to-disable-avahi-daemon-service-in-centos-rhel/

Turn off the service by using the following:

# service avahi-dnsconfd stop
# service avahi-daemon stop

You can make this configuration persistent across reboots by performing the following:

# chkconfig avahi-daemon off
# chkconfig avahi-dnsconfd off
sotmlac
  • 101