Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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?

share|improve this question
Where do your PCs look for DNS? – Tanner Faulkner Feb 1 '13 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 '13 at 0:35
Avahi is only for Zeroconf and mDNS, Netbios is a Windows-specific term. – afrazier Feb 1 '13 at 0:44
up vote 1 down vote accepted

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 (or another nameserver. 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 -

  • 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.

share|improve this answer
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 '13 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 '13 at 4:45

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 for Internet.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.