Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

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 webserver (with static IP, and I want to have my machines on my local network to be able to access it without modifying /etc/hosts (or equivalent for Windows/OSX). My router has

Primary DNS server
Secondary DNS server (Google's public DNS).

Nginx is set up to server websites externally as


Internally, I want


to point to the server.

My webserver has BIND9 installed, but I'm unsure of the settings. I've been through various contradicting tutorials, and so most of my settings have been clobbered. I've stripped out the lines which I'm confused about.

The tutorials I looked at are and . They mostly differ on what should be put in /etc/bind/zones/db.example.local and /etc/bind/zones/db.192, so I've left the conflicting lines out below. Can someone suggest what the correct lines are to give my above behaviour (namely *.example.local pointing to


auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static




# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)


options {
    directory "/var/cache/bind";

    forwarders {;;

    dnssec-validation auto;

    auth-nxdomain no;    # conform to RFC1035
    listen-on-v6 { any; };


zone "example.local" {
    type master;
    file "/etc/bind/zones/db.example.local";

zone "" {
    type master;
    file "/etc/bind/zones/db.192";


$TTL    604800
@   IN  SOA avalon.example.local.   webadmin.example.local. (
                  5     ; Serial, increment each edit
             604800     ; Refresh
              86400     ; Retry
            2419200     ; Expire
             604800 )   ; Negative Cache TTL


$TTL    604800
@   IN  SOA avalon.example.local.   webadmin.example.local. (
                  4     ; Serial, increment each edit
             604800     ; Refresh
              86400     ; Retry
            2419200     ; Expire
             604800 )   ; Negative Cache TTL

What do I need to add to the above files so that on a laptop on the internal network, I can type in webapp.example.local, and be served by my webserver?


I made several changes to the above files on the webserver.

/etc/network/interfaces (end of file)

    dns-search example.local

/etc/bind/zones/db.example.local (end of file)

@   IN  NS  avalon.example.local.
@   IN  A
avalon  IN  A
webapp  IN  A

/etc/bind/zones/db.192 (end of file)

    IN  NS  avalon.example.local.
73  IN  PTR avalon.example.local.

As a side note, my spare Win7 machine was able to connect directly to webapp.example.local, but for a Ubuntu 13.10 machine, I had to make the following changes as well (not on the webserver, but on a separate machine):



hosts:          files mdns4_minimal [NOTFOUND=return] dns mdns4


hosts:          files dns






The issue remains that its not wildcard DNS, and so I have to add entries to /etc/bind/zones/db.example.local for webapp1, webapp2, ...

share|improve this question

migrated from Oct 24 '13 at 18:14

This question came from our site for system and network administrators.

Zeophlite, please don't take thie the wrong way, but you've been a member for a while. Have you, all that time, managed to miss the line in bold in that says that SF is not for "Anything in a home or development environment"? – MadHatter Oct 24 '13 at 7:49
To be honest, I've never looked there, thank you for pointing it out. My previous questions have all been for professional work. Is there a StackExchange site that is more suitable for this question? If so, I'll move it there. – Zeophlite Oct 24 '13 at 7:53
@Zeophlite you could ask on SuperUser. However, if you edit out the referenced to "home networks" it's a well written, formatted question it might be OK and can stay here. – tombull89 Oct 24 '13 at 7:55
I'll leave it here for now then – Zeophlite Oct 24 '13 at 7:58
Fair enough - I do agree with tombull89 about it being a well-written question. Have you tried putting the single line IN A webapp (with a leading TAB) in /etc/bind/zones/db.example.local? I understand you want wildcard DNS, reverse-resolution, and so on, but try getting a single forward host to work first, to simplify the problem. – MadHatter Oct 24 '13 at 8:05

You must log in to answer this question.

Browse other questions tagged .