#1  
Old 1st August 2008, 04:58
DrJohn DrJohn is offline
Member
 
Join Date: Aug 2007
Location: Portland, OR, USA
Posts: 66
Thanks: 8
Thanked 2 Times in 2 Posts
Default resolve local hostnames

<Hardy server, Bind9 latest, configured I think per Falko's DNS howto for Hardy>

I'm not sure how to approach this problem, as I really don't know enough about DNS and its configuration for what I want to do. I know that I don't want this server to take the authoritative nameserver role for the domain; this function is done quite well by the original registrar for the domain. The server does provide a number of websites (ISPConfig) and does it quite well. All I want to do locally with DNS is resolve internal IP address while forwarding external requests out to the ISP's DNS servers.

(Do I need BIND at all??)

The local PCs all have static address assigned in DHCP, and their hostnames and IP addresses are in the hosts file. BTW, is this necessary (having double entries in both DHCPd.conf and hosts)? Seems redundant to me.

The server sits on a static IP on the web, and is correctly pointed to by its' various external sub.domain.net names.

The problem is that when I ping (or otherwise lookup) the hostname of a computer on the local net, such as "Dell-600", I get the IP address of "Dell-600.mydomain.net", which points to an 'under construction' page at the ISP (on purpose for any non-specific web address i.e. *.mydomain.net). Thus, when I want to address any of the local computers I have to use the IP address and not the hostname.

I'm pretty sure there's a simple solution to this -- can anyone help out??

Thanks,

DrJohn
Reply With Quote
Sponsored Links
  #2  
Old 1st August 2008, 15:00
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

I think you can do this with dnsmasq: http://www.thekelleys.org.uk/dnsmasq/doc.html
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 3rd August 2008, 05:13
DrJohn DrJohn is offline
Member
 
Join Date: Aug 2007
Location: Portland, OR, USA
Posts: 66
Thanks: 8
Thanked 2 Times in 2 Posts
 
Default Works now, but windows nslookup has errors

I was able to fix the zone file errors (several) by careful inspection and reading some more on bind9, and now I get correct resolution of local hostnames to their ip addresses and the reverse works as well on the Linux machines (all of them are OK). Plus caching seems to work, dig, etc.

But in WindowsXPPro (2 machines both get the same), I get this:
Code:
C:\Documents and Settings\me>nslookup anotherPC
*** Can't find server name for address 192.168.2.254: Non-existent domain
*** Can't find server name for address 192.168.2.254: Non-existent domain
*** Default servers are not available
Server:  UnKnown
Address:  192.168.2.254

Name:    anotherPC.mydomain.local
Address:  192.168.2.12
The lookup has succeeded, but what's the initial error all about?

Here's the result of ipconfig /all for the relevant adapter:
Code:
C:\Documents and Settings\me>ipconfig /all

Windows IP Configuration

        Host Name . . . . . . . . . . . . : myPCname
        Primary Dns Suffix  . . . . . . . :
        Node Type . . . . . . . . . . . . : Unknown
        IP Routing Enabled. . . . . . . . : No
        WINS Proxy Enabled. . . . . . . . : No
        DNS Suffix Search List. . . . . . : mydomain.local
                                            mydomain.local

Ethernet adapter Local Area Connection 2:

        Connection-specific DNS Suffix  . : mydomain.local
        Description . . . . . . . . . . . : Marvell Yukon 88E8001/8003/8010 PCI
Gigabit Ethernet Controller
        Physical Address. . . . . . . . . : 00-1A-92-C8-E6-BC
        Dhcp Enabled. . . . . . . . . . . : Yes
        Autoconfiguration Enabled . . . . : Yes
        IP Address. . . . . . . . . . . . : 192.168.2.10
        Subnet Mask . . . . . . . . . . . : 255.255.255.0
        Default Gateway . . . . . . . . . : 192.168.2.254
        DHCP Server . . . . . . . . . . . : 192.168.2.254
        DNS Servers . . . . . . . . . . . : 192.168.2.254
        Lease Obtained. . . . . . . . . . : Saturday, August 02, 2008 6:23:21 PM

        Lease Expires . . . . . . . . . . : Saturday, August 02, 2008 6:33:21 PM
These are all assigned fixed IP addresses in DCHPd.conf as follows (partial listing):

Code:
option domain-name "mydomain.local";
option domain-name-servers ns.mydomain.local;
default-lease-time 600;
max-lease-time 7200;
authoritative;
log-facility local7;

subnet 192.168.2.0 netmask 255.255.255.0 {
  range 192.168.2.100 192.168.2.150;
  option domain-name-servers ns.mydomain.local;
  option domain-name "mydomain.local";
  option routers ns.mydomain.local;
  option broadcast-address 192.168.2.255;
  default-lease-time 600;
  max-lease-time 7200;
}


host anotherPC {
  hardware ethernet 00:0c:6e:f6:62:b2;
  option domain-name-servers ns.mydomain.local;
  option domain-name "mydomain.local";
  option routers ns.mydomain.local;
  option broadcast-address 192.168.2.255;
  fixed-address 192.168.2.12;
}
and here's hosts

Code:
me@ns:/etc/dhcp3$ cat /etc/hosts
127.0.0.1       localhost.mydomain.local     localhost

192.168.2.10    PC1 PC1
192.168.2.11    PS1 PS1
192.168.2.12    anotherPC anotherPC
192.168.2.13    PC3 PC3

# The following lines are desirable for IPv6 capable hosts
::1     ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
Is there something missing in the DHCP, hosts, or named set up that's causing this problem in windows nslookup but not in Linux nslookup?

Thanks,

DrJohn
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail server using Postfix, Dovecot, Mysql... Postfix virtual maps doesn't work?? tarasbuljba HOWTO-Related Questions 33 28th May 2010 15:33
Cannot resolve internal hostnames winux Server Operation 5 16th September 2009 09:30
Mail System Error - Returned Mail tristanlee85 General 16 16th March 2008 10:40
Not able to send mail from local mx to external mx mccyberix Installation/Configuration 2 27th February 2007 14:37
I cannot resolve www.example.com on the local machine braakiss Installation/Configuration 5 12th January 2007 16:58


All times are GMT +2. The time now is 22:53.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.