The Atlas Nameserver service provides a simple programmable DNS service. Atlas uses the same core library that CoreDNS uses (miekg/dns).
NAME:
atlas - simple dns service
USAGE:
atlas [global options] command [command options] [arguments...]
VERSION:
0.1.0 (c568ab98) linux/amd64
AUTHOR:
@ehazlett
COMMANDS:
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--debug, -D enable debug logging
--bind value, -b value bind address for the DNS service (default: "udp://0.0.0.0:53")
--datastore value, -d value uri for datastore backend (default: "localdb:///etc/atlas/atlas.db")
--address value, -a value grpc address (default: "tcp://127.0.0.1:9000")
--upstream-dns value upstream dns server (default: "9.9.9.9:53")
--cache-ttl value builtin cache ttl (default: disabled) (default: 0s)
--help, -h show help
--version, -v print the version
Atlas has a GRPC api that enables remote management of the internal DNS store.
NAME:
actl create - create nameserver record
USAGE:
actl create [command options] [arguments...]
OPTIONS:
--name value, -n value record name
--record value, -r value record to add (format: <TYPE>:<VALUE>)
To add a new A
record:
$> actl create -n foo.local r A:127.0.0.1
added 1 record
This will create a new A
record for foo.local
that resolves to 127.0.0.1
. You
can use dig
to query Atlas:
$> dig @127.0.0.1 foo.local
; <<>> DiG 9.11.5-P1-1ubuntu2.5-Ubuntu <<>> @localhost foo.local
; (1 server found)
;; global options: +cmd
;; Got answer:
;; WARNING: .local is reserved for Multicast DNS
;; You are currently testing what happens when an mDNS query is leaked to DNS
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 2425
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 0, ADDITIONAL: 0
;; QUESTION SECTION:
;foo.local. IN A
;; ANSWER SECTION:
foo.local. 10 IN A 127.0.0.1
;; Query time: 5 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sat Aug 17 01:06:36 EDT 2019
;; MSG SIZE rcvd: 52
You can list all records in the Atlas store:
$> actl list
NAME TYPE VALUE OPTIONS
foo.local A 127.0.0.1
You can delete records from Atlas as well:
$> actl remove foo.local
removed foo.local