My first reaction to namecon as a .bit name resolver: Great idea! I love it as much as i love bitcoin. Now i have 12 namecoins.
But nmcontrol is a litle hard to set up. I whish it where more examples and explanation on how it works.
Running on Ubunut 14.04 Workstation.
I use nmcontrol in front of my internet connection.
Startscript which places nmcontrol before the usual resolver. (namecoind already loaded)
Code: Select all
sudo sed -i 's/127.0.1.1/127.0.0.1/g' /etc/resolv.conf
sudo ./nmcontrol.py --dns.host=127.0.0.1 --dns.resolver=192.168.1.1,8.8.8.8 --daemon=0 --debug=1 start
When i only set dns.resolver to 192.168.1.1 i wouldnt work. Still uses only 8.8.8.8. I had to add another host. Bug or feature?
Since my ISP modem has two dns servers assigned i only need one: 192.168.1.1
My second question.
When i resolve a host for ping it seems like it throws an error:
command: ping kth.se (a significant timeout before ping starts to echo answers)
Debug output:
Code: Select all
Lookup: {'query': '', 'domain': 'kth.se', 'src_addr': ('127.0.0.1', 60445), 'qtype': 1, 'qclass': 1}
Fetching IP Address for: kth.se with NS Server: 192.168.1.1
* result: [{'name': 'kth.se', 'data': '130.237.28.40', 'typename': 'A', 'classstr': 'IN', 'ttl': 60, 'type': 1, 'class': 1, 'rdlength': 4}]
Lookup: {'query': '', 'domain': '40.28.237.130.in-addr.arpa', 'src_addr': ('127.0.0.1', 45826), 'qtype': 12, 'qclass': 1}
Fetching IP Address for: 40.28.237.130.in-addr.arpa with NS Server: 192.168.1.1
* result: [{'name': '40.28.237.130.in-addr.arpa', 'data': 'ns-vip-01.sys.kth.se', 'typename': 'PTR', 'classstr': 'IN', 'ttl': 500, 'type': 12, 'class': 1, 'rdlength': 22}]
Traceback (most recent call last):
File "/home/qc/namedns/nmcontrol/lib/dnsServer/__init__.py", line 98, in serve
resp_pkt = format_response(qid, question, qtype, qclass, rcode, an_resource_records, ns_resource_records, ar_resource_records)
File "/home/qc/namedns/nmcontrol/lib/dnsServer/__init__.py", line 173, in format_response
pkt += format_resource(resource, question)
File "/home/qc/namedns/nmcontrol/lib/dnsServer/__init__.py", line 192, in format_resource
r += struct.pack("!HHIH", resource['qtype'], resource['qclass'], resource['ttl'], len(resource['rdata']))
KeyError: 'rdata'
Lookup: {'query': '', 'domain': '40.28.237.130.in-addr.arpa', 'src_addr': ('127.0.0.1', 57841), 'qtype': 12, 'qclass': 1}
Fetching IP Address for: 40.28.237.130.in-addr.arpa with NS Server: 192.168.1.1
* result: [{'name': '40.28.237.130.in-addr.arpa', 'data': 'ns-vip-01.sys.kth.se', 'typename': 'PTR', 'classstr': 'IN', 'ttl': 500, 'type': 12, 'class': 1, 'rdlength': 22}]
Traceback (most recent call last):
File "/home/qc/namedns/nmcontrol/lib/dnsServer/__init__.py", line 98, in serve
resp_pkt = format_response(qid, question, qtype, qclass, rcode, an_resource_records, ns_resource_records, ar_resource_records)
File "/home/qc/namedns/nmcontrol/lib/dnsServer/__init__.py", line 173, in format_response
pkt += format_resource(resource, question)
File "/home/qc/namedns/nmcontrol/lib/dnsServer/__init__.py", line 192, in format_resource
r += struct.pack("!HHIH", resource['qtype'], resource['qclass'], resource['ttl'], len(resource['rdata']))
KeyError: 'rdata'