0

So I will start with the fact I wasted the whole day trying to figure that out with no results...

I have a small local network behind a NAT router. It goes like this: ISP->NAT Router (contains a wireless part and ethernet ports)->My computer(wired), my laptop (wireless), my mom's computer (wireless), and my server (wired).

before I installed the Ubuntu server I had WHS1 for backups only, my DHCP was the router, DNS - set to router's IP which had the ISP's DNS servers set.

Yesterday I decided to switch to Ubuntu server. I installed the DHCP server on ubuntu, configured it completely, everything works. It's hostname is 'ubuntuserver' and the domain (I think that's what it is) is 'home'.

Then I set up the server to be a DNS server as well to cache the answers from an external DNS servers (Google's and OpenDNS).

The problem is that I just can't get to ping internal hostnames in my local network (e.g. From my computer 'ping ubuntuserver'/vice versa -> unknown host). Now I know that all what I've configured has nothing to do with it because these are external DNS server. I know there is the hosts file, but I DO NOT want to configure it in each PC, my question is - Where/How I configure a table ON THE SERVER so all the local machine will identify hostnames? it fails in Ping HOSTNAME and dig HOSTNAME... When 'ping ubuntuserver.local' it works.

Long story short - Doing 'ping ubuntuserver' doesnt work, doing 'ping ubuntuserver.local' does work. Where do I configure ON THE SERVER a table for local Address Resolution so it applies for all local machines connected to the DNS?

Edit:

Well, I deleted bind9 because I found out that it's name caching is not worth it. I figured out I don't mind using "ping hostname.local" instead of "ping hometaname" and configuring a zone file is too much trouble just for a 4 computers LAN.

1 Answer 1

1

You have to configure you LAN servers / desktops into your local DNS server. The configuration varies by DNS server and it gets a little more difficult in that you are going to want to assign static IP addresses on your LAN.

Personally on a small LAN I use dnsmasq as I find it easy to configure.

https://help.ubuntu.com/community/Dnsmasq

http://wiki.debian.org/HowTo/dnsmasq

If you are using BIND see

https://help.ubuntu.com/community/BIND9ServerHowto

If you are having a specific problem with a specific server, we need to know what you are using and you need to post configuration information.

3
  • First, thanks for replying. I already configured static IP in the DHCP, DNS works almost fine with external resolution (see this ubuntuforums.org/showthread.php?t=2127604), but I don't understand where do I configure some kind of table RONPC...10.0.0.1, RONLAPTOP...10.0.0.2 and so on. I know there is the hosts file (btw I am using bind) but I dont understand where do I configure these satic hostname so it applies for ALL local machines connected to the local DNS (ubuntuserver). !In link you posted I saw a title "Address Records", where is the config file to do it?
    – cr0kes
    Mar 20, 2013 at 18:35
  • 1
    1. The file /etc/hosts only has an effect on the local machine and only when the glibc resolver is used. 2. You say you are using BIND. In that case you will have to create so-called zone files containing the DNS information about the hosts on your LAN. Read the docs. 3. It would be simpler to use dnsmasq for this purpose since it is a combination DHCP server and DNS server and is able to resolve hostnames for which it has granted leases. Again, read the docs.
    – jdthood
    Mar 21, 2013 at 12:42
  • @jdthood too bad you didn't write that as an answer - I would pick that as it answers my question. Now I see - zone files to configure local name resolution.
    – cr0kes
    Mar 25, 2013 at 18:09

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .