fcambus / rrda

REST API allowing to perform DNS queries over HTTP
https://www.statdns.com
BSD 2-Clause "Simplified" License
223 stars 56 forks source link

Allow DNS domain on API request #8

Closed soullivaneuh closed 8 years ago

soullivaneuh commented 8 years ago

I have a rrda local server and a dnsmasq local server, composed with Docker.

If I try the following URL: http://rrda/dnsmasq:53/google.fr/A

I get a DNS server could not be reached error.

But, from the rrda machine, if I try the following command:

drill google.fr @dnsmasq

It works.

So I suppose your API does not support dns nameserver.

Could be possible to have this one? I can't pass IPs with Docker.

soullivaneuh commented 8 years ago

This could help IMO: http://tip.golang.org/pkg/net/#LookupIP

soullivaneuh commented 8 years ago

Any news?

fcambus commented 8 years ago

Try:

curl http://127.0.0.1:8080/google-public-dns-a.google.com:53/google.com/a

You will see it works as intended.

soullivaneuh commented 8 years ago

I'm sorry but this should not be closed.

Yes indeed, this works for external public servers.

But I can ensure you this is not working with dnsmasq.

dnsmasq is a host defined on /etc/hosts linux file of the docker image. This host is working, but not with your app.

Maybe this have issue with "non standard" hosts (e.g. no tld at the end)?

soullivaneuh commented 8 years ago

More information:

/go # cat /etc/hosts 
172.17.0.8  dnsmasq ccbbc15c11cd
172.17.0.8  dnsmasq_1 ccbbc15c11cd

Two checks:

So there is an issue, maybe not with external NS but with locally define domain names.