# DNS Server with LAN Entries



## csnate (Jul 16, 2013)

Hello,

I am trying to configure named to add the name of my router to the DNS entries. I've added at the bottom of my named.conf:


```
zone "local" {
    type master;
    file "master/local";
};
```

And I've created the master/local file that has the following:


```
vulcan IN A 10.0.0.1
vulcan.daytonxa.org IN A 10.0.0.1
```

Whenever I attempt to look up the host, it never works on machines on the local network. Any help is appreciated.


----------



## junovitch@ (Jul 17, 2013)

csnate said:
			
		

> Whenever I attempt to look up the host, it never works on machines on the local network. Any help is appreciated.



Does it work on the local box?  Can you do `dig @localhost vulcan` or `dig @localhost vulcan.daytonxa.org`?


----------



## Chris_H (Jul 17, 2013)

Greetings,

 What are the entries in your rc.conf(5) file? The ones of interest look similar to:

```
ifconfig_re0="inet 123.456.789.878 netmask 255.255.255.248"
defaultrouter="123.456.789.876"
```
It would also be helpful to know what references you have in resolv.conf(5), what's in your hosts(5) file, as well. Did you enable named(8)?

```
named_enable="YES"
named_flags="-n 3 -u bind"
```

Bottom line, more info is required to help you through. 

P.S. Did you start the named service?

--chris


----------



## throAU (Jul 17, 2013)

csnate said:
			
		

> Hello,
> 
> I am trying to configure named to add the name of my router to the DNS entries. I've added at the bottom of my named.conf:
> 
> ...



The above creates a DNS zone "local". Not for "daytonxa.org". So you *may* be able to look up "vulcan.daytonxa.org.local".

Post the full contents of your zone file (at least the A records that don't work, and the SOA)?

edit:
I'd usually do something like this:

In named.conf

```
zone "daytonxa.org" {
        type master;
        file "/etc/namedb/master/daytonxa.org";
};
```

In your zone file /etc/namedb/master/daytonxa.org


```
$TTL 2d                 ; Zone default TTL 2 days
$ORIGIN daytonxa.org.        
@               IN      SOA     ns1     hostmaster.daytonxa.org. (
                                2012052509              ; serial number
                                30m                     ; Refresh
                                3m                      ; Update retry
                                7d                      ; Expiry
                                3h      )               ; Minimum

                IN      NS      ns1
                IN      NS      yourbackupNS.some.org.
                IN      MX      10      mx.daytonxa.org.

                IN      A       a.b.c.d    ; A record daytonxa.org
ns1             IN      A       a.b.c.d
mx              IN      A       a.b.c.d
```

Bear in mind that any lookups you do for your domain will only use the results in this file, if you configure your machine for DNS.

If all you want is a single resolution for the name of your router on your local machine, use the /etc/hosts file.


----------

