# .local



## pidloop (Jan 19, 2021)

Hi all. Just installed FreeBSD 12 in a VirtualBox on macOS. I used the Bridging controller and DHCP assigns an IP similar to other hosts on my 192.168.7.* network. I can connect with ssh as say, pidloop@192.168.7.121. Outbound also works fine, all good.

All my other hosts, including macOS, rpi's, linuxes, etc all provide a DNS name <hostname>.local so I can access them without knowing their IP but my FreeBSD system does not. Any way I can set this up?

Thanks.


----------



## Jaekelsson (Jan 19, 2021)

Hi,

You have to activate Avahi daemon.

in file /etc/rc.conf
put

```
avahi_daemon_enable="YES"
```

install nss_mdns
by
`pkg install nss_mdns`

in file /etc/nsswitch.conf
change

```
hosts: files dns
```
in

```
hosts: files dns mdns
```


----------



## pidloop (Jan 19, 2021)

Many thanks for the fast and helpful reply. It almost worked. I was getting errors about dbus, but after I added this to /etc/rc.conf:


```
dbus_enable="YES"
```

all works well.


----------

