# Discovering avahi

One of the facts about modern computing which many people take for granted, is a LAN which can be browsed. Without such an ability, a Local Area Network only consists of IP addresses, and unless we have made special preparations otherwise, those IP addresses can also be reassigned by our router. Yet, this view of the LAN has prevailed under Linux for some time, where specific services need to be configured with text-files, and where users have made entries in the file ‘‘, such that specific host-names are associated with specific IP addresses, that are defined manually.

There exists a Linux solution to this problem, which can be installed with the package ‘‘. In short, this daemon provides in a Linux-friendly way, what the old ‘‘ used to provide under Windows. It associated packages, ‘‘, ‘‘, and ‘‘ , provide a GUI that allows the local computer to browse graphically. Additionally, the package ‘‘ allows for the host-names on the LAN to receive the suffix ‘‘, so that regular Linux programs can refer to those host-names and connect to their IP addresses transparently, without requiring manual configuration.


dirk@Phoenix:~$ping Mithral.local PING Mithral.local (192.168.2.10): 56 data bytes 64 bytes from 192.168.2.10: icmp_seq=0 ttl=128 time=0.183 ms 64 bytes from 192.168.2.10: icmp_seq=1 ttl=128 time=0.266 ms 64 bytes from 192.168.2.10: icmp_seq=2 ttl=128 time=0.275 ms 64 bytes from 192.168.2.10: icmp_seq=3 ttl=128 time=0.374 ms 64 bytes from 192.168.2.10: icmp_seq=4 ttl=128 time=0.281 ms 64 bytes from 192.168.2.10: icmp_seq=5 ttl=128 time=0.302 ms 64 bytes from 192.168.2.10: icmp_seq=6 ttl=128 time=0.465 ms 64 bytes from 192.168.2.10: icmp_seq=7 ttl=128 time=0.280 ms ^C--- Mithral.local ping statistics --- 8 packets transmitted, 8 packets received, 0% packet loss round-trip min/avg/max/stddev = 0.183/0.303/0.465/0.078 ms dirk@Phoenix:~$




Some people have noted problems getting this latter feature to work, but on my LAN, it just seems to work out-of-the-box.

It should be noted though, that if we install this to a computer which is not used to it, there can be some stability issues, and ‘‘ may not be compatible with arrangements some users have already made, to resolve their host-names. There was a specific problem I ran in to myself, after installing this on a laptop, according to which a list of available printers had become unstable, as viewed from one application.

In general, because SMB shares were invented by Microsoft, Linux tries to avoid depending on ‘‘, which is the Linux recreation of the file-browsing capability offered by SMB. If we want that under Linux, the way to obtain it is still to install the full , which will show -compatible host-names, as best they can be manufactured, and that do not end in the suffix ‘‘. Hence, ‘‘ will also not display any printers that were shared via SMB…

But, displays shared printers out-of-the-box, which were provided by the on other computers.

Further, in the directory ‘‘, there should be one file for each additional service the local is supposed to report to the network. These files can be custom-written, but there is an example in the documentation for , in the directory ‘‘, named ‘‘, which shows admins how to make local visible to the LAN, for graphical browsing. They will appear in the for SSH, if that file is just copied into ‘‘. I have been able just to click on one of the entries in this GUI, and obtain an instant SSH client-session to the advertized server, without having to type in any text.

Aside from that, this daemon can go some distance into transforming our LAN into an Intranet, since an Intranet is not only a contrast to the Extranet, but is also a LAN big enough to have its own . And, there may be more packages that extend its features, such as ‘‘ . By the time we have installed that extension however, we have made deep changes to how our Intranet works, that may not be compatible anymore at all, with how many home-users have set up their LAN. And so I, too, have avoided installing ‘‘ .

I should point out, that the indicated service “” requires that a client obtain SSH access, but nevertheless bothers some admins, just because it is being advertized on the LAN. It goes with a pure package named ‘‘ , that would allow a remote -based client to manage local disks via SSH. If it offends some users, the file ‘‘ can simply be deleted from ‘‘ . Doing so will stop from reporting this feature on the LAN, but will not change the fact, that If a hypothetical attacker has obtained SSH access, he or she has already compromised the local computer fully, with or without being part of the situation.


dirk@Phoenix:~$cd /etc/avahi/services dirk@Phoenix:/etc/avahi/services$ ls
dirk@Phoenix:/etc/avahi/services\$




Also, I suspect that in order for this feature to work, ‘‘ needs to be set up rather liberally on the host, which it is under , since the feature works by SSH, yet an SSH log-in is only a user-log-in by default.

Dirk

This site uses Akismet to reduce spam. Learn how your comment data is processed.