Tuesday, May 05, 2009

Ubuntu 9.04 and .local domain access

I had to re-discover why my organization's .local internal domain wouldn't resolve on Ubuntu 9.04. I was unable to ping or RDP to any of the machines using their fully-qualified names (e.g. server.domain.local), although this DID work if I used the NetBIOS names (e.g. server). After researching for a bit, I rediscovered something someone helped me with a long time ago when I thought this issue was related to DNS resolution over a PPTP VPN connection (it is not in fact related to this).

The issue: the avahi daemon. As I understand it, it grabs the .local domain as its own and interferes with ping, RDP, and other communication when using the fully-qualified .local domain names. There are two fixes I know of:

  1. Disable avahi. I understand this can interfere with apps that use avahi, so...
  2. Edit the hosts line if /etc/nsswitch.conf to read:
FROM:
hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4

TO:
hosts: files dns mdns4_minimal mdns4

5 comments:

  1. didn't work for me.
    any other dieas how to get onlne with ub 9.04 on a .loacal domain?

    ReplyDelete
  2. I have the same problem, lots of untested solutions from kids

    ReplyDelete
  3. This worked great. I also tried a couple other things:

    Edit your network connection IPv4 settings - Set your DNS servers with your DC being the first one, set your search domains to your domain FQDN (yourdomain.local).

    Force Avahi to stop mDNS (I don't know if this always works) -

    sudo stop avahi-daemon
    sudo sed -e '/^start/,+1s/^/#/' /etc/init/avahi-daemon.conf

    Then edit the nsswitch.conf file.

    ReplyDelete