DNS MX and NS entry working. but A entry failing. Using bind
Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
DNS MX and NS entry working. but A entry failing. Using bind
Hello,
I would be helpful if someone can take a look and suggest. I have almost spent 5 days with no luck.
I have set up a DNS server. When querying using dig for MX and NS records are correct. But its getting time out for A records
I am using linux bind for DNS server.
I have registered mydomain.in and transfered the Name servers to ns1.mydomain.in (abc.yy.zz.abc)
I have created the following zone file
=================================================
$TTL 900
$ORIGIN mydomain.in.
@ 900 IN SOA ns1.mydomain.in. name.mydomain.in. (
2009120318 ; Serial ID in reverse date format
28800 ; Refresh interval for slave servers
7200 ; Retry interval for slave servers
864000 ; Expire limit for cached info on slave servers
3600 ; Minimum Cache TTL in zone records
);
@OP
It looks like your name server is not reachable from the internet:
Quote:
dig +trace mydomain.in
; <<>> DiG 9.6.1-P2 <<>> +trace mydomain.in
;; global options: +cmd
. 440632 IN NS a.root-servers.net.
. 440632 IN NS g.root-servers.net.
. 440632 IN NS k.root-servers.net.
. 440632 IN NS i.root-servers.net.
. 440632 IN NS l.root-servers.net.
. 440632 IN NS c.root-servers.net.
. 440632 IN NS e.root-servers.net.
. 440632 IN NS j.root-servers.net.
. 440632 IN NS b.root-servers.net.
. 440632 IN NS f.root-servers.net.
. 440632 IN NS d.root-servers.net.
. 440632 IN NS h.root-servers.net.
. 440632 IN NS m.root-servers.net.
;; Received 288 bytes from 127.0.0.1#53(127.0.0.1) in 0 ms
in. 172800 IN NS B2.IN.AFILIAS-NST.ORG.
in. 172800 IN NS D0.CCTLD.AFILIAS-NST.ORG.
in. 172800 IN NS B1.IN.AFILIAS-NST.in.
in. 172800 IN NS A1.IN.AFILIAS-NST.in.
in. 172800 IN NS C0.CCTLD.AFILIAS-NST.INFO.
in. 172800 IN NS A0.CCTLD.AFILIAS-NST.INFO.
in. 172800 IN NS A2.IN.AFILIAS-NST.INFO.
in. 172800 IN NS B0.CCTLD.AFILIAS-NST.ORG.
;; Received 499 bytes from 192.36.148.17#53(i.root-servers.net) in 228 ms
mydomain.in. 86400 IN NS ns1.mydomain.in.
mydomain.in. 86400 IN NS ns2.mydomain.in.
mydomain.in. 86400 IN NS ns3.mydomain.in.
;; Received 133 bytes from abc.xyz.62.1#53(D0.CCTLD.AFILIAS-NST.ORG) in 96 ms
;; connection timed out; no servers could be reached
Also I get SERVFAIL digging for MS and NS records. So it looks like a firewall issue to me
@vishesh
This is a valid entry. It gives the domain and IP address (same as @ A def.ghi.44.28).
@lomax0990
IN is not necessary as it's the default value for class of a record
Last edited by bathory; 03-24-2010 at 01:30 PM.
Reason: removed saurab's personal info.
Somehow for some of us, we get a response from a nameserver at AFILIAS-NST.ORG, that does not forward further, while opendns (and I guess gmail since you can get email from them) are using your dns.
Maybe you have to wait until your changes get propagated.
Regards
Last edited by GrapefruiTgirl; 03-24-2010 at 01:08 PM.
Reason: more of saurab's personal info removed.
;; ANSWER SECTION:
abc.66.def.67.in-addr.arpa. 86276 IN PTR bleep.bloop.opendns.com.
It looks like you've changed something and opendns instead of a SERVFAIL message sends back the IP of a server that you get redirected when you use their service.
Use the following (just change the serial) and see if it works:
Code:
$TTL 900
$ORIGIN mydomain.in.
@ IN SOA ns1.mydomain.in. me.mydomain.in. (
2009120318 ; Serial ID in reverse date format
28800 ; Refresh interval for slave servers
7200 ; Retry interval for slave servers
864000 ; Expire limit for cached info on slave servers
3600 ; Minimum Cache TTL in zone records
);
NS ns1.mydomain.in.
NS ns2.mydomain.in.
NS ns3.mydomain.in.
MX 10 mail
@ IN A 122.166.xx.yy
mail IN A 122.166.xx.yy
mail2 IN A 122.166.xx.yy
mail3 IN A 122.166.xx.yy
ns1 IN A 122.166.xx.yy
ns2 IN A 122.166.xx.yy
ns3 IN A 122.166.xx.yy
www IN CNAME mydomain.in.
Last edited by bathory; 03-24-2010 at 01:31 PM.
Reason: removed saurab's personal info.
========
I have "mydomain.in" mentioned only in named.conf and mydomain.in.zone. There is nowhere else mydomain.in mentioned in any file of bind setup. Could that be the reason I am missing anything? but since its able to resolve mail.mydomain.in and not domain looks very very strange to me. Or some kind of bug in bind?
in named.conf
Quote:
zone "mydomain.in" IN {
type master;
notify no;
allow-query { any; };
file "mydomain.in.zone";
};
You have messed things somehow I cannot understand. From my side now, everything works, except mx!!!
Code:
dig mydomain.in
; <<>> DiG 9.6.1-P2 <<>> mydomain.in
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 46626
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 7, ADDITIONAL: 13
;; QUESTION SECTION:
;mydomain.in. IN A
;; ANSWER SECTION:
mydomain.in. 8575 IN A abc.xyz.44.28
;; AUTHORITY SECTION:
mydomain.in. 34338 IN NS ns4.mydomain.com.
mydomain.in. 34338 IN NS ns2.mydomain.in.
mydomain.in. 34338 IN NS ns2.mydomain.com.
mydomain.in. 34338 IN NS ns3.mydomain.in.
mydomain.in. 34338 IN NS ns1.mydomain.in.
mydomain.in. 34338 IN NS ns3.mydomain.com.
mydomain.in. 34338 IN NS ns1.mydomain.com.
;; ADDITIONAL SECTION:
ns1.mydomain.in. 14130 IN A ip.ip.44.28
ns1.mydomain.com. 166945 IN A 67.15.ip.ip
ns1.mydomain.com. 166945 IN A 67.15.ip.ip
ns1.mydomain.com. 166945 IN A 67.15.ip.ip
ns2.mydomain.com. 166945 IN A 74.54.ip.ip
ns2.mydomain.com. 166945 IN A 74.54.ip.ip
ns2.mydomain.com. 166945 IN A 74.54.ip.ip
ns3.mydomain.com. 166945 IN A 67.15.ip.ip
ns3.mydomain.com. 166945 IN A 67.15.ip.ip
ns3.mydomain.com. 166945 IN A 67.15.ip.ip
ns4.mydomain.com. 166945 IN A 74.52.ip.ip
ns4.mydomain.com. 166945 IN A 74.52.ip.ip
ns4.mydomain.com. 166945 IN A 74.52.ip.ip
;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Fri Dec 4 13:01:05 2009
;; MSG SIZE rcvd: 402
As you see in the SOA record above, it looks like the authoritative dns is ns1.mydomainsearch.com and not ns1.mydomain.in!!!. In fact:
Code:
dig soa mydomain.in
; <<>> DiG 9.6.1-P2 <<>> soa mydomain.in
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 31385
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 7, ADDITIONAL: 13
;; QUESTION SECTION:
;mydomain.in. IN SOA
;; ANSWER SECTION:
mydomain.in. 38029 IN SOA ns1.mydomainsearch.com. saurabblah.some-email.com. 2009120301 7200 7200 7200 7200
;; AUTHORITY SECTION:
mydomain.in. 34118 IN NS ns2.mydomain.in.
mydomain.in. 34118 IN NS ns2.mydomainsearch.com.
mydomain.in. 34118 IN NS ns3.mydomainsearch.com.
mydomain.in. 34118 IN NS ns3.mydomain.in.
mydomain.in. 34118 IN NS ns1.mydomain.in.
mydomain.in. 34118 IN NS ns1.mydomainsearch.com.
mydomain.in. 34118 IN NS ns4.mydomainsearch.com.
;; ADDITIONAL SECTION:
ns1.mydomain.in. 13910 IN A aaa.bb.44.28
ns1.mydomainsearch.com. 166725 IN A aaa.bb.253.251
ns1.mydomainsearch.com. 166725 IN A aa.bb.47.189
ns1.mydomainsearch.com. 166725 IN A aa.bb.253.220
ns2.mydomainsearch.com. 166725 IN A aa.bb.56.231
ns2.mydomainsearch.com. 166725 IN A aa.bb.56.236
ns2.mydomainsearch.com. 166725 IN A aa.bb.cc.227
ns3.mydomainsearch.com. 166725 IN A aa.bb.47.188
ns3.mydomainsearch.com. 166725 IN A aa.bb.253.219
ns3.mydomainsearch.com. 166725 IN A bb.bb.253.252
ns4.mydomainseaarch.com. 166725 IN A aa.bb.140.84
ns4.mydomainsearch.com. 166725 IN A aa.bb.140.82
ns4.mydomainsearch.com. 166725 IN A aa.bb.140.83
;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Fri Dec 4 13:04:45 2009
;; MSG SIZE rcvd: 437
How do you explain this?
Last edited by bathory; 03-24-2010 at 01:32 PM.
Reason: remove saurab's personal info
Actually for an hour i reverted to the nameservers of the domainsearchindia.com, through whom I have registered mydomain.in. So it worked and showed even A record. Purposely i deleted the MX entry there to see its actually failing for MX or not.
But now I have again changed to the nameserver I have setup on bind. Now again its not working.
So it seems that if I change to nameservers of domainsearchindia.com then everything is good. But if I change to nameserver of only ns1.mydomain.in then only MX, SOA, NS records are showing. A is just not showing.
This is strange!! Some times your server responds and other is unreachable!!!
Code:
dig mx mydomain.in @aaa.bb.44.28
; <<>> DiG 9.6.1-P2 <<>> mx mydomain.in @aaa.bb.44.28
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 30659
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 4
;; WARNING: recursion requested but not available
;; QUESTION SECTION:
;mydomain.in. IN MX
;; ANSWER SECTION:
mydomain.in. 900 IN MX 10 mail.mydomain.in.
;; AUTHORITY SECTION:
mydomain.in. 900 IN NS ns3.mydomain.in.
mydomain.in. 900 IN NS ns1.mydomain.in.
mydomain.in. 900 IN NS ns2.mydomain.in.
;; ADDITIONAL SECTION:
mail.mydomain.in. 900 IN A aaa.bb.44.28
ns1.mydomain.in. 900 IN A aaa.bb.44.28
ns2.mydomain.in. 900 IN A aaa.bb.44.28
ns3.mydomain.in. 900 IN A aaa.bb.44.28
;; Query time: 203 msec
;; SERVER: aaa.bb.44.28#53(122.166.44.28)
;; WHEN: Fri Dec 4 14:22:21 2009
;; MSG SIZE rcvd: 170
Code:
dig ns1.mydomain.in @aaa.bb.44.28
; <<>> DiG 9.6.1-P2 <<>> ns1.mydomain.in @aaa.bb.44.28
;; global options: +cmd
;; connection timed out; no servers could be reached
Remove the entries for ns2 and ns3 (they are useless as they point to the same IP) to see iif this is the reason, because bind tries to round-robin dns.
looks like something i have really missed in bind setup. Because if it can get my MX records correctly, then it can't be firewall or any problem outside. it has to be something related to bind. isnt it?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.