Thursday, January 5, 2017

Configuring all the computers at home to recognize each other.

I would like all the computers at home to be known by their names, under domain "oasis". Historical reasons, fwiw.

The router I have doesn't support local dns, but there is avahi, which I can install on all the computers at home (Mac mini, two linuxes, Raspi and potentially a slew of ESP8266 and the like).

Unfortunately, avahi normally likes to use the .local suffix for its domain.

Here's what it took to get all machines recognized and searchable under .oasis domain.

In /etc/avahi/avahi-daemon.conf:

[server]
domain-name=oasis

[wide-area]
enable-wide-area=no

[publish]
publish-domain=yes

Then, restart avahi by sudo /etc/init.d/avahi-daemon restart.
After this done on all the computers, I can see them all in avahi-resolve --name <host>.oasis. But ping doesn't work yet. For it to work, need to enable nss integration to work with mdns and to accept the .oasis domain. There are two changes:

In /etc/mdns.allow:

.oasis

In /etc/nsswitch.conf:

hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4

The important change seems to be the "mdns4" at the end.

Now I can access all the machines on the local network by their names. ping, ssh, browser, all works.

No comments:

Post a Comment