GithubHelp home page GithubHelp logo

dnsd's Issues

Handles the new +edns option in dig command

It appears that newer versson of BIND's dig command now defaults to using option +edns by default which currently dnsd doesn't understand and cause dnsd to send incorrect dns query and returned unexpected answer to the dig command.

% dig @127.0.0.1 google.com A +noall +answer
;; Warning: Message parser reports malformed message packet.
google.com.             299     IN      A       216.58.196.14
google.com.             299     IN      AAAA    2404:6800:4001:806::200e
google.com.             599     IN      MX      40 alt3.aspmx.l.google.com.
google.com.             599     IN      MX      30 alt2.aspmx.l.google.com.
google.com.             21599   IN      NS      ns1.google.com.
google.com.             599     IN      MX      10 aspmx.l.google.com.
google.com.             599     IN      MX      50 alt4.aspmx.l.google.com.
google.com.             599     IN      MX      20 alt1.aspmx.l.google.com.
google.com.             21599   IN      NS      ns3.google.com.
google.com.             21599   IN      NS      ns2.google.com.
% dig @8.8.8.8 google.com A +noall +answer
google.com.             299     IN      A       172.217.31.78

With +noedns option specified, everything behaves as expected again.

% dig @127.0.0.1 google.com A +noedns +noall +answer
google.com.             136     IN      A       216.58.199.206

More info on this change:

https://deepthought.isc.org/article/AA-01059/0/Why-does-dig-report-one-more-record-in-the-additional-section-of-a-query-response-than-I-am-seeing.html

https://engineering.salesforce.com/why-is-edns-important-for-content-delivery-85f5690744ba

Work with nslookup but not dig

First, thanks a lots for your project! It's work but i face some problem:

nslookup -port=5553 twitter.com 127.0.0.1

Server:     127.0.0.1
Address:    127.0.0.1#5553

Non-authoritative answer:
Name:   twitter.com
Address: 104.244.42.129
Name:   twitter.com
Address: 104.244.42.193

dig @127.0.0.1 -p 5553 twitter.com

;; Warning: Message parser reports malformed message packet.

; <<>> DiG 9.10.3-P4 <<>> @127.0.0.1 -p 5553 twitter.com
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 4363
;; flags: qr rd ad; QUERY: 1, ANSWER: 17, AUTHORITY: 0, ADDITIONAL: 1
;; WARNING: recursion requested but not available
;; WARNING: Message has 303 extra bytes at end

;; OPT PSEUDOSECTION:
; EDNS: version: 0, flags:; udp: 4096
;; QUESTION SECTION:
;twitter.com.           IN  A

;; ANSWER SECTION:
twitter.com.        599 IN  MX  20 alt1.aspmx.l.google.com.
twitter.com.        599 IN  MX  10 aspmx.l.google.com.
twitter.com.        599 IN  MX  20 alt2.aspmx.l.google.com.
twitter.com.        599 IN  MX  30 ASPMX3.GOOGLEMAIL.com.
twitter.com.        599 IN  MX  30 ASPMX2.GOOGLEMAIL.com.

;; Query time: 492 msec
;; SERVER: 127.0.0.1#5553(127.0.0.1)
;; WHEN: Sat Oct 29 02:10:00 CST 2016
;; MSG SIZE  rcvd: 541

I am from China, so https://dns.google.com was blocked for sure. I use https_proxy, i can confirm this proxy is work by run curl with proxy:

curl -s --proxy 127.0.0.1:7575 https://dns.google.com/resolve?name=twitter.com | jq -r '.Answer[] | "(.data)"'

104.244.42.129
104.244.42.1

I don't know why dnsd can't work with dig, any suggest?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.