2

I have a Ubuntu Server 12.10 with Apache acting as web server.

I have to ping it in the way DEV01.local because DEV01 alone wouldn't resolve.

I would like to have a subdomain, like redmine.DEV01.local.

I have a modem/router that I got from my ISP and doesn't have DNS I think, it has DHCP.

In order to get DEV01.local ping working I had to install in both Ubuntu PC's the AVAHI-DAEMON.

Is it possible to add the subdomain in the server without having to add it manually to all LAN PC hosts file?

3
  • Where do your PCs look for DNS?
    – rtf
    Feb 1, 2013 at 0:00
  • @Tanner Hi, my modem/router has Google's DNS setted up. I think my network pc's use Netbios because of Avahi.
    – JorgeeFG
    Feb 1, 2013 at 0:35
  • Avahi is only for Zeroconf and mDNS, Netbios is a Windows-specific term.
    – afrazier
    Feb 1, 2013 at 0:44

2 Answers 2

3

This is doable - but not straight forward (ie it requires a good grasp of DNS, DHCP and routing - all these are complementary components - DHCP does not replace DNS)

To implement it:

  • Change the IP address on your server to a static IP address. (You should really do this even if you run DHCP as it is a server)

  • Temporarily change the IP address on your workstation to a static IP address (assuming your workstation is not a server)

  • Ensure that you have a default route out through your router.

    You might need to temporarily change the DNS settings on your machines to 8.8.8.8 (or another nameserver. 8.8.8.8 is Googles and is easy to remember)

  • Install and configure DNSMasq to handle DHCP and DNS. There are guides on the Internet. A simple one is - http://wiki.debian.org/HowTo/dnsmasq

  • You will probably need to add your desired host name into /etc/hosts on the server running DNSMasq (DNSMasq can read the /etc/hosts and add it to the DNS - you might need to tweek the settings to make it work exactly how you want it to, but an "out-the-box" install should more-or-less work)

  • Disable DHCP on your router.

  • Change your workstation back to using DHCP.

2
  • Thanks I think I'll have to try it, I'm installing now. Is there a way to auto-register the domain? I mean, do not edit DNS Server's host file but being client say "Hey, I have this subdomain too, can you register it?"
    – JorgeeFG
    Feb 1, 2013 at 1:13
  • I suspect there is, but I've never played around with it. I suspect it will involve changes to WINS and also running SAMBA (for WINS server), and doing netbios/windows sharing -> dns translations. I don't do Windows though, so maybe you need to ask that as another question !
    – davidgo
    Feb 1, 2013 at 4:45
0

To use subdomains you'll need to point DNS to a server on your local network. This means setting up a DNS server on your network. You'll want to configure a forward lookup zone for DEV01.local, a CNAME record for any subdomains, and a forwarder to 8.8.8.8 for Internet.

You must log in to answer this question.

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