0

I have setup a domain and nameservers as per below, but when I dig the domain, it is not working.

The setup is as follows: I want a domain named iheartlotto.com, and the nameservers to be ns1.iheartlotto.com and ns2.iheartlotto.com.

iheartlotto.com is meant to be on 148.251.181.168 ns1.iheartlotto.com to be on 148.251.197.217 ns2.iheartlotto.com to be on 148.251.197.218

When I dig ns1.iheartlotto.com, it works fine and I get as part of the output:

;; ANSWER SECTION:
ns1.iheartlotto.com.    86400   IN  A   148.251.197.217

The above is correct.

BUT, when I dig iheartlotto.com returns the below. Note that IN A is blank.

; <<>> DiG 9.8.4-rpz2+rl005.12-P1 <<>> iheartlotto.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 20497
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 0, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;iheartlotto.com.       IN  A

;; AUTHORITY SECTION:
iheartlotto.com.    10800   IN  SOA iheartlotto.com. hostmaster.iheartlotto.com. 2014101004 10800 3600 604800 10800

;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Fri Oct 10 21:26:53 2014
;; MSG SIZE  rcvd: 80

The actual files I have are:

181.251.148.in-addr.arpa

$TTL    86400

@       IN      SOA     iheartlotto.com. hostmaster.iheartlotto.com. (
                        2014101000      ; Serial
                        10800   ; Refresh
                        3600    ; Retry
                        604800  ; Expire
                        10800 ) ; Minimum

                 IN NS   iheartlotto.com.
168              IN PTR  iheartlotto.com.

197.251.148.in-addr.arpa

$TTL    86400

@       IN      SOA     iheartlotto.com. hostmaster.iheartlotto.com. (
                        2014101002      ; Serial
                        10800   ; Refresh
                        3600    ; Retry
                        604800  ; Expire
                        10800 ) ; Minimum

                 IN NS   iheartlotto.com.
217              IN PTR  ns1.iheartlotto.com.
218              IN PTR  ns2.iheartlotto.com.

iheartlotto.com.db

$TTL    86400

@       IN      SOA     iheartlotto.com. hostmaster.iheartlotto.com. (
                        2014101004       ; Serial
                        10800   ; Refresh
                        3600    ; Retry
                        604800  ; Expire
                        10800 ) ; Minimum

iheartlotto.com.            IN NS   ns1.iheartlotto.com.
iheartlotto.com.            IN NS   ns2.iheartlotto.com.

ns1.iheartlotto.com.        IN A    148.251.197.217
ns2.iheartlotto.com.        IN A    148.251.197.218

iheartlotto.com             IN A 148.251.181.168

named.conf.local

include "/etc/bind/zones.rfc1918";

zone "181.251.148.in-addr.arpa" {
        type master;
        file "/etc/bind/181.251.148.in-addr.arpa";
};
zone "197.251.148.in-addr.arpa" {
        type master;
        file "/etc/bind/197.251.148.in-addr.arpa";
};
zone "iheartlotto.com" {
        type master;
        file "/etc/bind/iheartlotto.com.db";
};

How can I have dig iheartlotto.com return an A record (along with all the other correct info), like it does for dig ns1.iheartlotto.com?

1

You don't have a PERIOD after iheartlotto.com in your forward zone:

 iheartlotto.com.            IN A 148.251.181.168

Your Answer

By clicking "Post Your Answer", you agree to our terms of service, privacy policy and cookie policy

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