3

I am trying to implement a dynamic dns service for my computers. I have pointed h.lohray.com to my EC2 instance in the NS record of lohray.com and have installed dnsmasq on that system and have made sure to unblock the firewall port.

For now, I have statistically added an entry on my /etc/hosts file.

129.118.19.163 i7.h.lohray.com

however, i7.h.lohray.com does not resolve correctly with nslookup or dig :-( This is the only time I could have this resolved (online nslookup) - 50.19.103.190 is the IP address of the EC2 instance where dnsmasq is running. Where could I have gone wrong?

Lord Loh.
  • 1,049
  • 3
  • 15
  • 24

2 Answers2

1

Your NS record for h.lohray.com is currently as follows:

h.lohray.com.       1800    IN  NS  50.19.103.190.

Which is wrong. NS records should specify not an IP addresses, but domain names of a nameservers, like this:

h.lohray.com.       1800    IN  NS  h.lohray.com
h.lohray.com.       1800    IN  A   50.19.103.190.

or like this:

h.lohray.com.       1800    IN  NS  ns.h.lohray.com
ns.h.lohray.com.        1800    IN  A   50.19.103.190.

Your DNS server at 50.19.103.190 seems to work - it answers when I query of i7.h.lohray.com

Sandman4
  • 4,045
  • 2
  • 20
  • 27
  • Unfortunately, I still get `i7.h.lohray.com IN NS 50.19.103.190 1800s (30m)`. I am expecting a different IP for i7.h.lohray.com. 50.19.103.190 is not the ip I set for i7.h.lohray.com in the hosts file :-( – Lord Loh. Apr 08 '12 at 21:27
  • Until you will *read* my answer, I can't help. – Sandman4 Apr 08 '12 at 23:32
  • Oh! I am sorry :-(. I think I read whatever was on my mind than what was on the screen :-( My shortcoming. When I query `50.19.103.190` for `i7.h.lohray.com`, I get the right IP. I am still to figure out how to get the dnsmasq to resolve right. - Thank you. – Lord Loh. Apr 09 '12 at 16:15
  • Ughm, you still seem to read whatever it is on your mind :). DNSMASQ DOES RESOLVE RIGHT. Your DNS server at 50.19.103.190 works OK. – Sandman4 Apr 09 '12 at 16:22
  • 1
    The "bad" record resides on nsX.hostindia.net, which is probably your DNS hosting or registrar. – Sandman4 Apr 09 '12 at 16:25
  • Thanks :-) I was not only reading imaginary things, I also had some of my DNS concepts messed up! I did not have an A record for h.lohray.com - I thought it was just meant for web servers! I now have an A record for `ns1.h.lohray.com` pointing to the IP of my AWS instance running dnsmasq, and an NS record for `h.lohray.com` pointing to `ns1.h.lohray.com`. And my browser is resolving it right! – Lord Loh. Apr 09 '12 at 16:45
0

here is another tool but it is not resolving there.

http://www.digwebinterface.com/?hostnames=i7.h.lohray.com&type=&useresolver=69.65.17.101&ns=auth&nameservers=

i7.h.lohray.com@ns1.hostindia.net.:

h.lohray.com.       1800    IN  NS  50.19.103.190.

i7.h.lohray.com@ns2.hostindia.net.:

h.lohray.com.       1800    IN  NS  50.19.103.190.

i7.h.lohray.com@ns3.hostindia.net.:

h.lohray.com.       1800    IN  NS  50.19.103.190.


it resolves from my home now.

$ dig i7.h.lohray.com @50.19.103.190

; <<>> DiG 9.7.3 <<>> i7.h.lohray.com @50.19.103.190
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 17018
;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0

;; QUESTION SECTION:
;i7.h.lohray.com.               IN      A

;; ANSWER SECTION:
i7.h.lohray.com.        0       IN      A       129.118.19.163

;; Query time: 111 msec
;; SERVER: 50.19.103.190#53(50.19.103.190)
;; WHEN: Fri Apr  6 12:53:23 2012
;; MSG SIZE  rcvd: 49
Wesley
  • 32,320
  • 9
  • 80
  • 116
johnshen64
  • 5,747
  • 23
  • 17
  • I set the NS record for h.lohray.com to 50.19.103.190 – Lord Loh. Apr 06 '12 at 19:44
  • i tried web dig, and here is the result for the authoritative dns server which i have added to my answer. it seems that the dns server is indeed set up, so it has to be something within you instance or ec2. – johnshen64 Apr 06 '12 at 19:48
  • good news i have succeeded resolving it now. must be dns propagation. so it will take ttl time to propagate throughout internet (unless the dns servers that ignore ttl and cache records for longer). looks like your setup is correct. must be some sort of delay when i tested previously. sorry about that. – johnshen64 Apr 06 '12 at 19:54