Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Redirecting ".local" subdomain to unicast DNS

I regularly access Windows domains that have been set up to use a domain under the .local top level name. This conflicts with Bonjour/Zeroconf which reserves .local for it's own use. A number of platforms support Bonjour out of the box (including Mac OS, iPhone, and Ubuntu) and there's numerous name resolution issues when this confict occurs.

I have a manual (per workstation) workaround in place for Mac OS by creating an /etc/resolver/ntdomain.local as per resolver(5) which works well. Unfortunately this requires manual changes on every workstation and does not work on the iPhone.

What I'm looking for is a way to redirect requests for *.ntdomain.local coming in via mDNS to a specific unicast DNS server. I don't mind writing some code if required. I can deploy on either preferably Debian or alternatively Windows 2003. It looks like Avahi may be the library I'm looking for.

Can this be done without registering every address in the subdomain or is it possible to register a single NS record of ntdomain.local that points to the Windows DNS server?

like image 464
Jason Weathered Avatar asked Sep 02 '08 18:09

Jason Weathered


People also ask

Is .local a valid domain?

local is a special-use domain name reserved by the Internet Engineering Task Force (IETF) so that it may not be installed as a top-level domain in the Domain Name System (DNS) of the Internet. As such it is similar to the other special domain names, such as . localhost.

What is .local domain?

A local domain is a domain that belongs to your company. For example, if you work for a company called Acme Coffee Shop and you have registered AcmeCoffeeShop.com with InterNic, you need to specify acmecoffeeshop.com as a local domain.

What is mDNS UDP in?

The mDNS protocol is meant to resolve host names to IP addresses within small networks that do not include a local name server. The mDNS service can be contacted using UDP queries over port 5353. The mDNS protocol is published as RFC6762 and implemented by the Apple Bonjour and avahi-daemon services.


1 Answers

You can "merge" the unicast and multicast .local namespaces (with unicast taking precedence) as explained on Avahi and Unicast .local. Apple has instructions for doing the same on Mac OS X.

Another option is to add domain-name=.localnet to /etc/avahi/avahi-daemon.conf to have it use .localnet instead of .local for the multicast DNS namespace.

like image 52
Ted Percival Avatar answered Oct 02 '22 06:10

Ted Percival