Reputation: 1
I'm trying to run multiple instances of the avahi-daemon on a single ubuntu server. My set up is currently an ubuntu server VM running on VMWare, with 3x Network Adapters each on a different VLAN.
My main goal here is to have avahi running as a sort of "mDNS gateway" for devices across different VLANs, and also specifically to use avahis service publishing to proxy publish services for other network devices. The main problem I have with default avahi is that I need to be able to define which interfaces my services get pushed out of. not to just publish all services out of all interfaces that are enabled.
For example, airplay1.service airplay2.service and airplay3.service all exist in my avahi service folder, I only want airplay1 to be published out of ens33, airplay2 to be published out of ens33 and ens34, and airplay3 to be published out of ens35.
I'm thinking the only way I can achieve this is by running multiple instances of the avahi-daemon, one for each interface, and define which services go where by copying services files into the /etc/avahi/services folder for each instance of the daemon (e.g. having airplay2.service inside the service folder for the avahi-daemon for ens33 and ens34).
I'd then build my own front end for ease of management.
However if anyone has any better idea for how I can achieve this, I'm all ears.
I think Dockers may be applicable here but from the reading I've done I'm not sure I can give each of my dockers direct access to only a single network interface and have full access to this interface with full network access.
I see that the -f option allows you to designate a .conf file for avahi to run with, so I've created multiple avahi-daemon.conf files with different allowed-interface settings. However I'm hit with the error that avahi-daemon is already running on a PID. I see no option to define a separate PID file/fully isolate multiple instances of avahi-daemon.
Upvotes: 0
Views: 221