6 Replies Latest reply: Mar 5, 2013 1:36 PM by cjfong
kkircher Level 1 Level 1 (0 points)

I have found that the search domain only is finding 1 level of subdomains.  Anything more then that, and it can't find a host.

 

Example:

I have example.com in my search domain path.

 

if I try and ping

 

test it pings test.example.com and works fine.

 

if i try and ping test.this

 

it gets a host can't be found.

 

In previous version of OSX, and standard linux, pinging test.this would result in pinging test.this.example.com.

 

 

I am hoping there is a setting somehwere that can just be changed to see it act more like the prevous versions of OSX.

 

Any ideas?


Mac OS X (10.5.4)
  • 1. Re: DNS Search domains
    Scott Atchley Level 4 Level 4 (2,225 points)

    Check out http://support.apple.com/kb/HT4845

     

    which has:

     

    Using search domains with more than two labels

     

    You may configure a search domain with more than two labels such as "corp.example.com" in the Network pane of System Preferences. This search domain, and only this search domain, will be appended to simple hostnames in applications that connect to resources on the network. For example, if you type "www" into Safari's address field, it will try to connect to www.corp.example.com (only). In previous versions of Mac OS X, Safari would try to connect to www.corp.example.com, and if that did not work, it would try to connect to www.example.com.

     

    To replicate the behavior of previous Mac OS X versions in OS X Lion, you can specify more than one search domain, such as "corp.example.com" and "example.com".

  • 2. Re: DNS Search domains
    Frank Taillandier Level 1 Level 1 (0 points)
  • 3. Re: DNS Search domains
    Scott Atchley Level 4 Level 4 (2,225 points)

    Yes, I am using that as well. The Apple solution does not work for me since we have:

     

    home.bar.org

    home.foo.bar.org

     

    so setting both bar.org and foo.bar.org in the DNS search would not work. I really need 'ssh home.foo' to work and your link provided that solution.

  • 4. Re: DNS Search domains
    cjfong Level 1 Level 1 (0 points)

    Has anyone resolved this?  I am facing the same problem with osx 10.8.

  • 5. Re: DNS Search domains
    Scott Atchley Level 4 Level 4 (2,225 points)

    As it turns out, ssh can do this for you and it is more secure than using the old Apple way. If you are using ssh, simply modify (or create) your ~/.ssh/config to include:

     

    Host home*

        HostName %h.bar.org

     

    With this added, ssh home is converted to ssh home.bar.org and ssh home.foo becomes ssh home.foo.bar.org.

  • 6. Re: DNS Search domains
    cjfong Level 1 Level 1 (0 points)

    This only works for ssh right?  Is there a solution for more general domain name resolution?