An obsequious DNS server that tells you exactly want you want to hear
1.1K
YesDNS is an obsequious DNS server that tells you exactly want you want to hear.
YesDNS responds to DNS queries with DNS messages provided to it by a REST interface. It returns only what you tell it to, and absolutely anything you tell it to, without modificaiton.
YesDNS is intended for testing and quickly standing up ephemeral environments.
YesDNS does not yet implement any sort of security. DO NOT expose YesDNS to the outside world.
Run from source
export GOPATH=/tmp/gopath
go get github.com/alangibson/yesdns
go install github.com/alangibson/yesdns/cmd/yesdns
$GOPATH/bin/yesdns &
curl -v -X PUT -d@"$GOPATH/src/github.com/alangibson/yesdns/test/data/resolvers/default-0.0.0.0-8053.json" localhost:5380/v1/resolver
curl -v -X PUT -d@"$GOPATH/src/github.com/alangibson/yesdns/test/data/A.json" localhost:5380/v1/question
dig @localhost -p 8053 some.example.com A
; <<>> DiG 9.10.3-P4-Ubuntu <<>> @localhost -p 8053 some.example.com A
; (1 server found)
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 53579
;; flags: qr aa rd; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 1
;; WARNING: recursion requested but not available
;; QUESTION SECTION:
;some.example.com. IN A
;; ANSWER SECTION:
some.example.com. 10 IN A 1.2.3.4
;; AUTHORITY SECTION:
some.example.com. 0 IN NS ns1.example.com.
;; ADDITIONAL SECTION:
some.example.com. 10 IN TXT "" "" "Text line 1 of 2" "Text line 2 of 2"
;; Query time: 0 msec
;; SERVER: 127.0.0.1#8053(127.0.0.1)
;; WHEN: Thu Jun 29 10:39:23 CEST 2017
;; MSG SIZE rcvd: 175
Wildcard resolution
curl -v -X PUT -d@"$GOPATH/src/github.com/alangibson/yesdns/test/data/A-wildcard.json" localhost:5380/v1/question
dig @localhost -p 8053 notreal.example.com. A
Run with TLS
openssl genrsa -out server.key 2048
openssl ecparam -genkey -name secp384r1 -out server.key
openssl req -new -x509 -sha256 -key server.key -out server.crt -days 3650 -subj "/C=US/ST=TX/L=Austin/O=YesDNS/CN=localhost"
yesdns -http-listen=:53443 -tls-cert-file=server.crt -tls-key-file=server.key
Run via Docker
docker run -d --name=yesdns -p 8053:8053/udp -p 8053:8053/tcp -p 5380:5380 alangibson/yesdns
./test/test.sh
Content type
Image
Digest
Size
10.6 MB
Last updated
over 9 years ago
docker pull alangibson/yesdns