View Full Version : Install DNS server internally
consistgd
6th October 2004, 06:38 PM
I need to install and configure DNS server in a LAN just to test some software packadges. I do not want it to be tied to the internet. I need to have some domain names like host1.myoffice, host2.myoffice, host3.myoffice. Is that possible?
Anybody can advise how to do that?
Will that make troubles for the other worstations on the LAN?
sej7278
7th October 2004, 05:49 AM
Well the main DNS server used is BIND, but it's overkill (and hard to configure) for a small LAN.
Personally I used dnsmasq - it often doesn't even need configuring (it uses /etc/hosts and DHCP) and only consists of one dnsmasq.conf file and one dnsmasq binary anyway.
It's a caching nameserver, so will speed up external host lookups too if you consider using it on your internet gateway too.
http://thekelleys.org.uk/dnsmasq/doc.html
consistgd
8th October 2004, 06:24 PM
Well the main DNS server used is BIND, but it's overkill (and hard to configure) for a small LAN.
Personally I used dnsmasq - it often doesn't even need configuring (it uses /etc/hosts and DHCP) and only consists of one dnsmasq.conf file and one dnsmasq binary anyway.
It's a caching nameserver, so will speed up external host lookups too if you consider using it on your internet gateway too.
http://thekelleys.org.uk/dnsmasq/doc.html
Thanks a lot for the reply. I installed and tested it. But not everything worked well.
Here is the situation:
I do not need DHCP. I have all local IP fixed (for the test environment). But I do have DHCP running on this network with Windows 2000 server.
I installed and started dnsmasq on the Red Hat Linux 8.0, computer name redhat80. I defined real DNS servers on this computer. From this computer I can ping all computers on a LAN and on the internet by address and by name.
On other linux machines in the LAN I defined redhat80's IP address as the only DNS server. Some of the Linux machines where mentioned in redhat80's /etc/hosts file and some were not. From all these machines I was able to ping all other machines, mentioned in /etc/hosts on redhat80 by name, the dnsmasq DNS server. So for linux hosts it worked.
On Windows machines on the same LAN I defined redhat80 as DNS server as well. And I was able to ping Internet websites from these Windows (XP and 2000) machines as well as to connect them via browser. So for the Internet it worked.
BUT I was not able to connect any of the Linux machines by name, mentioned in /etc/hosts on redhat80, the DNS server with dnsmasq running.
Something is missed here. Any idea, what?
All the best.
Gregory
blammo
8th October 2004, 09:55 PM
I think this might be your problem. Here's an excerpt from the dnsmasq faq:
Q: Names on the internet are working fine, but looking up local names
from /etc/hosts or DHCP doesn't seem to work.
A: Resolver code sometime does strange things when given names without
any dots in. Win2k and WinXP may not use the DNS at all and just
try and look up the name using WINS. On unix look at "options ndots:"
in "man resolv.conf" for details on this topic. Testing lookups
using "nslookup" or "dig" will work, but then attempting to run
"ping" will get a lookup failure, appending a dot to the end of the
hostname will fix things. (ie "ping myhost" fails, but "ping
myhost." works. The solution is to make sure that all your hosts
have a domain set ("domain" in resolv.conf, the network applet in
windows, or set a domain in your DHCP server). Any domain will do,
but "localnet" is traditional. Now when you resolve "myhost" the
resolver will attempt to look up "myhost.localnet" so you need to
have dnsmasq reply to that name. The way to do that is to include
the domain in each name on /etc/hosts and/or to use the
--expand-hosts and --domain-suffix options.
sej7278
9th October 2004, 01:11 AM
was your resolv.conf setup correctly?
also, i found you should add 127.0.0.1 to the resolv.onf file to actually make dnsmasq use that file itself.
vBulletin® v3.8.7, Copyright ©2000-2013, vBulletin Solutions, Inc.