From 8627f11c81e33321951ef44717ca29f7da44138c Mon Sep 17 00:00:00 2001 From: Damian Moore Date: Sat, 5 Apr 2014 17:04:42 +0100 Subject: [PATCH] Updated docs about subdomain NS delegation and fixed DNS server bug --- README.md | 2 ++ dynamicdns/management/commands/run_dns_server.py | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 40a47a3..ffd44ae 100644 --- a/README.md +++ b/README.md @@ -117,6 +117,8 @@ You should get a response similar to the following. Note the `ANSWER SECTION` in ;; WHEN: Wed Jan 15 23:50:01 GMT 2014 ;; MSG SIZE rcvd: 69 +You're most likely going to want to bind subdomains to your instance of the built-in DNS server using `NS` records. I found that delegating a subdomain to a different nameserver on Rackspace Cloud DNS was a bit tricky as the user interface on their control panel doesn't allow you to do it. This tutorial showed it was possible on Rackspace using their API: http://wherenow.org/delegating-a-subdomain-with-rackspace-cloud-dns/ + DNS Debugging ------------- diff --git a/dynamicdns/management/commands/run_dns_server.py b/dynamicdns/management/commands/run_dns_server.py index b877b18..d86892f 100644 --- a/dynamicdns/management/commands/run_dns_server.py +++ b/dynamicdns/management/commands/run_dns_server.py @@ -23,7 +23,7 @@ def handle(self, **options): p = DnsQuery(data) try: dns_record = DnsRecord.objects.get(domain=p.domain.rstrip('.')) - if dns_record.lan_ip and addr == dns_record.ip: + if dns_record.lan_ip and addr[0] == dns_record.ip: ip = dns_record.lan_ip else: ip = dns_record.ip