Skip to content

Instantly share code, notes, and snippets.

@hawkowl
Created June 23, 2014 12:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hawkowl/c0b39b94443584cfc94f to your computer and use it in GitHub Desktop.
Save hawkowl/c0b39b94443584cfc94f to your computer and use it in GitHub Desktop.
$ curl -X POST localhost:8020/v1/domains -d "domain=atleastfornow.net" \
-d "soa=hawkowl@atleastfornow.net"
-u user:password
{"status": "success", "data": {"soa": "hawkowl@atleastfornow.net", "default": "active", "domain": "atleastfornow.net", "axfr": [], "id": 3}}
$ curl -X POST localhost:8020/v1/domains/3/A -d "host="
-d "target=192.168.1.1"
-u user:password
{"status": "success", "data": {"host": "", "ttl": 86000, "id": 4, "target": "192.168.1.1"}}
$ curl -X POST localhost:8020/v1/domains/3/A -d "host=www"
-d "target=192.168.1.1"
-u user:password
{"status": "success", "data": {"host": "www", "ttl": 86000, "id": 5, "target": "192.168.1.1"}}
$ curl -X POST localhost:8020/v1/domains/3/A -d "host=blog"
-d "target=192.168.1.2"
-u user:password
{"status": "success", "data": {"host": "blog", "ttl": 86000, "id": 6, "target": "192.168.1.2"}}
$ dig -p 10053 @127.0.0.1 atleastfornow.net A +short
192.168.1.1
$ dig -p 10053 @127.0.0.1 www.atleastfornow.net A +short
192.168.1.1
$ dig -p 10053 @127.0.0.1 blog.atleastfornow.net A +short
192.168.1.2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment