.local network domain | how to use it correctly/safely

I made a follow-up of a topic who brought up the .local domain problematic. I saved it as a wiki and hope that we can create a useful howto to show up how to use it correctly and safely.

Continuing the discussion from SSH winbind Active Directory logon:

I do use this .local domain for my local network too. So I wondering, if we could bring together facts and Information who helps to understand how to use it correctly.

Recapitulation:

What is Avahi?

Avahi is a system which facilitates service discovery on a local network via the mDNS/DNS-SD protocol suite. This enables you to plug your laptop or computer into a network and instantly be able to view other people who you can chat with, find printers to print to or find files being shared. Compatible technology is found in Apple MacOS X (branded “Bonjour” and sometimes “Zeroconf”).

Avahi is primarily targetted at Linux systems and ships by default in most distributions. It is not ported to Windows at this stage, but will run on many other BSD-like systems. The primary API is D-Bus and is required for usage of most of Avahi, however services can be published using an XML service definition placed in /etc/avahi/services.

See also the nss-mdns project, which allows hostname lookup of *.local hostnames via mDNS in all system programs using nsswitch

Definition at Wikipedia

Wiki to bring information together and create a howto to use .local domain correctly:

1 Like

mDNS can actually work with just systemd-resolved:
Avahi can't accessible from my mobile phone - #2 by vgaetera

2 Likes

I would just comment it a bit. If you do not have your own registered domain, there exists special reserved domain home.arpa. It is defined in RFC 8375. Keep .local domain for multicast resolution and use home.arpa. for local network hosts only.

1 Like