Skip to content

Announce multiple avahi host aliases across your local network. Supports Debian Buster and Ubuntu 18.04+

Notifications You must be signed in to change notification settings

scott-ainsworth/avahi-aliases

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

37 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

avahi-aliases

The Avahi System facilitates service discovery on local networks using the Multicast DNS/DNS-SD protocol suite.

The current implementation of Avahi (v0.8) does not yet support aliases (i.e., CNAME records). Avahi-alias, in its many variations, fills this gap.

This variation of avahi-alias provides:

  • Python 3 compatibility,
  • Avahi v0.8 compatibility,
  • Systemd compatibility, and
  • Full install and remove capability.

Prerequisites

For proper installation and execution of this variation of avahi-alias, the following are required:

  • Python 3. Python 3 is now the defacto version distributed with nearly all Linux distributions.

  • Avahi v0.8. Avahi v0.8, released Feb 18, 2020, includes Python 3 bindings. Its availability varies across Linux distributions. In particular, many long-term support releases (e.g., Ubuntu 20.04 LTS) still include Avahi v0.7. (Although in the case of Ubuntu 20.04 LTS, it appears the Avahi v0.8 packages available for Debian Bulleye can replace the v0.7 packages transparently. This has not been well tested!)

  • Systemd. The install and uninstall make targets work with Systemd. A rudimentary init system script is also include.

Installing and Removing

From the avahi-alias directory, run make install. This will install the scripts to /usr/local/bin, setup systemd services, and start the service. Installation and removal options include:

  • make install performs full installation (and reinstallation).
  • make install-binaries creates the /etc/avahi/aliases files and installes the scripts to /usr/local/bin.
  • make install-unit installs and starts the systemd service.
  • make remove performs a full removal.
  • make remove-binaries removes the scripts from /usr/local/bin.
  • make remove-unit stops and removes the systemd service.

Note: The install and remove make targets assume the current user has sudo rights and executes most steps using sudo.

Adding and removing aliases

Aliases are stored in /etc/avahi/aliases. Add and remove aliases by editing /etc/avahi/aliases directly. Althernatively, use the avahi-add-alias and avahi-remove-alias scripts. Examples:

  • sudo avahi-add-alias alias1.local adds alias1.local to /etc/avahi/aliases.
  • sudo avahi-remove-alias alias1.local removes alias1.local from /etc/avahi/aliases.

Acknowledgements

About

Announce multiple avahi host aliases across your local network. Supports Debian Buster and Ubuntu 18.04+

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 69.2%
  • Makefile 20.2%
  • Shell 10.6%