On Tue, Mar 06, 2012 at 01:09:34PM -0700, Keith Christian wrote: > Attempting to set up a small dns server purely for testing > purposes, using a non-existent domain name. > > I have run into problems with my very simple setup, have tried > changing multiple tokens in the config files, no success, but have > found a few items: > > - The zone file loads, and BIND starts, if the $ORIGIN line is > commented out of the zone file. Apparently, $ORIGIN is not > required, but why would its presence cause an error?
Because as the error told you, you were trying to use out-of-zone data in your zone. > - "dig" lookups do not succeed even when $ORIGIN is commented > out, with named running. > > There is an error somewhere in the config files, but I cannot > locate it, or I'm doing something fundamentally wrong. Yes, fundamentally wrong. > NS and SOA records exist, contrary to bind's output messages. > START OF PASTED DATA [snip a lot of it] > 12 Output from dig when looking up a nameserver on the fictitious > domain: > 13 > ================================================================================ > 14 dig @localhost keith1q2w.com ns > 15 > 16 ; <<>> DiG 9.5.2-P3 <<>> @localhost keith1q2w.com ns > 17 ; (2 servers found) > 18 ;; global options: printcmd > 19 ;; Got answer: > 20 ;; ->>HEADER<<- opcode: QUERY, status: NXDOMAIN, id: 38557 > 37 Error messages from BIND when $ORIGIN is un-commented in the > zone file: > 38 > ================================================================================ > 39 Stopping named: [ > OK ] > 40 Starting named: > 41 Error in named configuration: > 42 zone localhost/IN: loaded serial 0 > 43 zone 0.0.127.in-addr.arpa/IN: loaded serial 0 > 44 zone/zone001:5: ignoring out-of-zone data (keith1q2w.com) > 45 zone/zone001:21: ignoring out-of-zone data > (nameserver01.keith1q2w.com) > 46 zone/zone001:22: ignoring out-of-zone data (mail.keith1q2w.com) > 47 zone/zone001:23: ignoring out-of-zone data (mail2.keith1q2w.com) > 48 zone/zone001:24: ignoring out-of-zone data (mail3.keith1q2w.com) > 49 zone zone001/IN: has 0 SOA records > 50 zone zone001/IN: has no NS records > 51 zone zone001/IN: not loaded due to errors. > 52 _default/zone001/IN: bad zone snip > 60 Contents of /etc/named.conf: > 61 > ================================================================================ > 107 zone "." IN { > 108 type hint; > 109 file "named.ca"; > 110 }; > 111 > 112 zone "localhost" IN { > 113 type master; > 114 file "localhost.zone"; > 115 allow-update { none; }; > 116 }; > 117 > 118 zone "0.0.127.in-addr.arpa" IN { > 119 type master; > 120 file "named.local"; > 121 allow-update { none; }; > 122 }; Those three are working as expected. You use the name of the zone for your "zone" statement. > 124 zone "zone001" IN { The argument for "zone" is the NAME OF YOUR ZONE. It is not an arbitrary string as you are using. If you want to serve a zone called "keith1q2w.com", use THAT as the name of the zone. -- http://rob0.nodns4.us/ -- system administration and consulting Offlist GMX mail is seen only if "/dev/rob0" is in the Subject: _______________________________________________ Please visit https://lists.isc.org/mailman/listinfo/bind-users to unsubscribe from this list bind-users mailing list bind-users@lists.isc.org https://lists.isc.org/mailman/listinfo/bind-users