2

I've just installed Bind9 and Webmin on my VPS to manage a DNS server. Domain of the nameserver is ns1.primesystems.ch.

I created a new master zone (forward) for smartvend.ch through webmin. This works just fine, ip is resolved correctly. See configuration.

$ttl 38400
smartvend.ch.   IN  SOA ns1.primesystems.ch. john.doe.domain.ch. (
        1399011114
        10800
        3600
        604800
        38400 )
smartvend.ch.   IN  NS  ns1.primesystems.ch.
smartvend.ch.   IN  A   185.16.173.71

But when I create a new master zone for primesystems.ch (TLD of nameserver, maybe problem?) through webmin, an error occurs.

Config:

$ttl 38400
primesystems.ch.    IN  SOA ns1.primesystems.ch. john.doe.domain.ch. (
        1399028931
        10800
        3600
        604800
        38400 )
primesystems.ch.    IN  NS  ns1.primesystems.ch.
primesystems.ch.    IN  A   185.16.173.71

Error message:

The following errors were found in the records file /var/lib/bind/primesystems.ch.hosts ..

zone primesystems.ch/IN: NS 'ns1.primesystems.ch' has no address records (A or AAAA)
zone primesystems.ch/IN: not loaded due to errors.

The /etc/bin/named.conf.local looks like this:

zone "smartvend.ch" {
    type master;
    file "/var/lib/bind/smartvend.ch.hosts";
    };
zone "primesystems.ch" {
    type master;
    file "/var/lib/bind/primesystems.ch.hosts";
    };

So primesystems.ch can not be resolved by dig or host command - but smartvend.ch can.

So in my point of view, there must be a problem with primesystems.ch because it's also the nameserver. What i want is to route the url primesystems.ch to a webserver. Has anyone a idea?

UPDATE: After adding 'ns1 IN A 185.16.173.70', the error disappeared. But when I run 'host primesystems.ch' no IP is returned. And 'dig primesystems.ch' returs this:

; <<>> DiG 9.8.3-P1 <<>> primesystems.ch
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 33401
;; flags: qr rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;primesystems.ch.       IN  A

;; AUTHORITY SECTION:
primesystems.ch.    424 IN  SOA ns1.primesystems.ch.         kevin\.kirn.kdsolutions.ch. 1399027394 10800 3600 604800 38400

;; Query time: 23 msec
;; SERVER: 62.2.17.61#53(62.2.17.61)
;; WHEN: Fri May  2 13:43:49 2014
;; MSG SIZE  rcvd: 96
ihkawiss
  • 986
  • 3
  • 9
  • 25
  • 2
    probably better at superuser, as opposed to here, but add an A record for ns1 and you should be ok. `ns1 IN A 185.16.173.70` since you are telling bind that ns1 is the master, yet NS1 doesn't exist in your zone, (yes it is chicken and egg for zones where your ns live, this is why glue records are created at the roots) – Doon May 02 '14 at 11:34
  • @Doon Thanks for your hint, after adding that line - the error disappeared. But when I now do 'dig primesystems.ch' or 'host primesystems.ch' it's obviously still not resolved. Any idea? – ihkawiss May 02 '14 at 11:46
  • not really, since If I look from here I get answers. `primesystems.ch. 38400 IN A 185.16.173.71 primesystems.ch. 38400 IN NS ns1.primesystems.ch. ;; Received 94 bytes from 185.16.173.70#53(ns1.primesystems.ch) in 108 ms` – Doon May 02 '14 at 11:49
  • what name server are you using to check. – Doon May 02 '14 at 11:49
  • Hey @Doon, sorry was maybe a caching issue. Now it works just fine :) Can I mark your answer somehow as the right one ? Thanks a lot, made my day. – ihkawiss May 02 '14 at 11:52
  • no worries on marking as the right one, this should probably be closed and moved to say serverfault. glad it works. – Doon May 02 '14 at 12:21

0 Answers0