I made an API for bind9!
Recently I have been looking for an api for a bind server. I found an existing project, https://github.com/dmyerscough/BIND-RESTful, which is quite nice but didn’t have some of the functionality I needed. I looked at updating the existing project, but instead decided to write a new API from scratch, inspired by that project.
So what I have written is:
- FastAPI-based framework
- input validation, provided by FastAPI
- Ability to create, replace, get, and delete DNS records
- Ability to get JSON dump of whole DNS zonefile
- auto-created documentation from API framework
The project lives here: https://gitlab.com/jaytuck/bind-rest-api
Participation is welcome!
3 replies on “A bind9 Rest API tool – bind-rest-api”
Thanks for your work. Can you explain how the username and password work? What do I need to configure on BIND’s end?
Hi Ashwin, there are two flows that need authentication:
http -> API (this needs an API key, which you put in the apikeys.pass file)
API -> bind9 (this needs a bind TSIG key)
To generate a TSIG key see the bind9 docs: https://bind9.readthedocs.io/en/v9_16_9/advanced.html#tsig
I hope this provides some pointers, I’ll try to update the docs on Gitlab to reflect this.
Ok, I have updated the Readme.md on Gitlab.