How can I resolve .local addresses in Windows?

12

6

I've got some Linux servers on my home network that I access via "hostname.local", however when using a Windows machine they can't seem to resolve this unless I go via IP address.

How do I make it so my windows machine can resolve hostname.local addresses? I know how to edit C:\Windows\System32\drivers\etc\hosts but surely there's got to be some automatic way to make Windows just find these machines?

Jorge Castro

Posted 2012-10-23T18:34:02.460

Reputation: 952

How do you make this work on the Linux machines? (Because you want to use the same method on the Windows machines.) Do you configure it on each machine? Or do you have a local DNS server that resolves them for you? – David Schwartz – 2012-10-23T18:42:37.590

@DavidSchwartz Ubuntu comes with avahi out of the box so they can resolve each other just fine with no configuration from me. – Jorge Castro – 2012-10-23T18:45:51.907

Answers

24

Usually .local names are resolved using mDNS – the Linux servers probably run Avahi, and for Windows there is Apple's own Bonjour.

An older version of Bonjour (v2.0) is included within Bonjour Print Services. It is also available as a Chocolatey package.

The latest version (v3.x) is not available as an independent download, but is installed as part of iTunes (and a few other applications). It is possible to use an archive manager (like 7-Zip or WinRAR) to extract Bonjour64.msi from the iTunes installer.

user1686

Posted 2012-10-23T18:34:02.460

Reputation: 283 655

2You can also extract it from the exe installer using 7zip, etc. – Kevin Horn – 2014-09-05T03:11:52.747

It seems to be available as a standalone package here: https://chocolatey.org/packages/bonjour But that's the Bonjour Print Services. So I'm guessing this allows resolution of names more than just printers as stated on the page https://support.apple.com/kb/DL999?locale=en_GB

– CMCDragonkai – 2017-02-02T06:18:57.240

I just installed Bonjour Print Services because I wanted my MacBook Air to be able to connect to my Windows PC as <name>.local and vice-versa, and it works a charm, so I can vouch for that approach. – Andrea – 2017-10-07T15:06:10.590

In the latest version of Windows 10, Bonjour conflicts with the built-in mDNS resolver (which unfortunately is only available for modern apps). You first have to disable the built-in mDNS resolver with a registry entry. – Kevin Keane – 2018-06-10T05:31:42.540

Don't even need to reboot after installing the msi! – gak – 2012-12-31T23:15:26.610

latest version now is 3.0.10 – user528025 – 2013-01-24T11:45:10.560

3I'm not going to update the answer for minor releases. You can extract the latest version from iTunes.msi by using msiexec /a iTunes.msi TARGETPATH=iTunes.out. – user1686 – 2013-01-24T12:36:32.593

5Installer is an exe now but you can extract it with WinRAR. – Snow Blind – 2013-09-14T21:33:50.177

5

As @Kevin Keane points out here (and in the comments section above), Windows 10 now clobbers mDNS port 5353 with a service that only works for modern Windows apps. So to let Bonjour back onto the port, the windows mDNS service must be quashed via the registry edit described in the link above.

In Windows 10 versions other than Home instead of the registry edit, the group policy editor can be used:

  • launch gpedit.msc
  • Navigate to Computer Configuration > Administrative Templates > Network > DNS Client
  • Enable the "Turn off Multicast Name Resolution" policy.

I didn't have to reboot.

Caveat, I already had both iTunes and Bonjour Print Services installed. Simply uninstalling Bonjour Print Services and reinstalling didn't work -- I had to go into add-remove programs, uninstall both Bonjour and Bonjour Print Services, then reinstall Bonjour Print Services, before pinging .local addresses started working again (virtualbox host-only linux guest with avahi-daemon running). I think this is because my "Bonjour Service" service was tied to Bonjour, not Bonjour Print Services, and it wasn't re-registering itself.

deargle

Posted 2012-10-23T18:34:02.460

Reputation: 51

This worked for me on my Windows 10 box. I uninstalled Bonjour and upgraded my iTunes (it was time for a regular update) and the .local domains started working. I did not have to reboot. – Michaelkay – 2019-01-09T14:08:30.623

Disabling this is no longer necessary either; current Windows 10 versions have it off by default, but if you actually enable it, they'll offer mDNS-based .local name resolution through the standard system functions without any third-party software. – user1686 – 2019-07-16T10:33:59.913

@grawity On the latest version of Window Pro for Workstations, without Apple's mDNS resolver, I don't see it working with either Enabled or Disabled for that setting. The same .local name lookup works fine from Linux. – Brian Gordon – 2019-08-13T03:08:16.413