LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Server (https://www.linuxquestions.org/questions/linux-server-73/)
-   -   DNS Configuration (BIND) (https://www.linuxquestions.org/questions/linux-server-73/dns-configuration-bind-940689/)

druisgod 04-19-2012 12:54 PM

DNS Configuration (BIND)
 
So I have my DNS server up and running and currently my users can connect to any machine listed by hostname as long as they use the fqdn.

Is there a way to set it up so I can just have them connect by using "host1" instead of "host1.example.com"?

I know I can edit all of the host files and do it, but I'm just getting into DNS and digging into it.

Thx!

MensaWater 04-19-2012 01:15 PM

Yes - In the clients modify /etc/resolv.conf to have both the server name to query AND the domains to search:

Code:

search example.com
nameserver x.x.x.x
nameserver x.x.x.x

That tells it to append example.com to any "short name" searched for and check on the first nameserver (ip) specified and if not found there on the second name server (ip) specified.
You could add other domains to the search line separated by space:

Code:

search example.com mydom.com
It would first search short name in example.com and if found provide that - if not it would then search for it in mydom.com.

druisgod 04-19-2012 01:37 PM

Augh! I just figured it out. I already had resolv.conf setup on the server with the search path. My clients are Windows machines - and so your comment made me wonder about how they resolve networks, and that made me think dhcp. I didn't have the option domain-name "example.com"; in my dhcpd.conf. Now the machines can ping by just the host, appending the DN. Thanks for the hint!!


~Druisgod


All times are GMT -5. The time now is 01:12 PM.