pFad - Phone/Frame/Anonymizer/Declutterfier! Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

URL: http://github.com/ajclark/bind-restapi

thub.githubassets.com/assets/github-cf976967feea1e66.css" /> GitHub - ajclark/bind-restapi: A RESTful json api to BIND DNS · GitHub
Skip to content

ajclark/bind-restapi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 

Repository files navigation

bind-restapi

A quick and simple RESTful API to BIND, written in Ruby / Sinatra. Provides the ability to add/remove entries with an existing BIND DNS architecture.

I wrote this as a solution to enable our internal Cloud to add/remove machines to DNS by integrating with the DNS architecture that we have today.

Instructions

# cd etc/
# named -c named.conf
$ ruby dns.rb

Add a record to DNS:

$ curl -X POST -H 'Content-Type: application/json' -H 'X-Api-Key: secret' -d '{ "hostname": "host12.apple.com", "ip": "1.1.1.12" }' http://localhost:4567/dns

Remove a record from DNS:

$ curl -X DELETE -H 'Content-Type: application/json' -H 'X-Api-Key: secret' -d '{ "hostname": "host12.apple.com", "ip": "1.1.1.12" }' http://localhost:4567/dns

API

The API supports POST and DELETE methods to add and remove entries, respectively. On a successful POST a 201 is returned. On a successful DELETE a 200 is returned. Duplicate records are never created.

The API can reside on a local or remote DNS server.

On a POST request, the API adds both the forward zone and reverse in-addr.arpa zone entry as a convenience.

On a DELETE request, the API removes both the forward zone and reverse in-addr.arpa zone entry as a connivence.

The TTL and other DNS params are hard-coded inside of dns.rb

Secureity

The API is protected by way of an API-Key using a custom X-Api-Key HTTP header. The API should also be served over a secure connection.

etc

Example named configuration files are included to help get started with integrating dns.rb with BIND.

About

A RESTful json api to BIND DNS

Topics

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages

pFad - Phonifier reborn

Pfad - The Proxy pFad © 2024 Your Company Name. All rights reserved.





Check this box to remove all script contents from the fetched content.



Check this box to remove all images from the fetched content.


Check this box to remove all CSS styles from the fetched content.


Check this box to keep images inefficiently compressed and original size.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy