Skip to content

EpicLabs23/bind9-api

Repository files navigation

bind9-api

REST API with Go to manage BIND9 DNS Server from anywhere

Postman Collection:

https://api.postman.com/collections/915142-834e437b-a7fa-44b4-98f7-b4f56fa7ad34?access_key=PMAT-01K3DZ1BG19Q9VQZQMSRMX4ZSQ

Installation

Direct from binary

sudo su
curl -sSL https://raw.githubusercontent.com/EpicLabs23/bind9-api/refs/heads/main/install.sh | bash -s 0.1.0

Debian/Ubuntu:

wget https://github.com/EpicLabs23/bind9-api/releases/download/v<version>/bind9-api_<version>_linux_amd64.deb
sudo dpkg -i bind9-api_<version>_linux_amd64.deb
sudo systemctl enable bind9-api
sudo systemctl start bind9-api

CentOS/Fedora:

wget https://github.com/EpicLabs23/bind9-api/releases/download/v<version>/bind9-api_<version>_linux_amd64.rpm
sudo rpm -i bind9-api_<version>_linux_amd64.rpm
sudo systemctl enable bind9-api
sudo systemctl start bind9-api

Manual Tarball

wget https://github.com/EpicLabs23/bind9-api/releases/download/v<version>/bind9-api_<version>_linux_amd64.tar.gz
tar -xzf bind9-api_<version>_linux_amd64.tar.gz
sudo mv bind9-api /usr/local/bin/
sudo mkdir -p /etc/bind9-api
sudo mv config.yml /etc/bind9-api/
sudo cp packaging/systemd/bind9-api.service /etc/systemd/system/
sudo systemctl enable bind9-api
sudo systemctl start bind9-api

Configure

Update the config file in /etc/bind9-api/config.yml and restart the service

You must update username and password in the config file

And use these credentials for Basic Auth

Devlopment Environment Setup

  1. Clone the repository
git clone https://github.com/EpicLabs23/bind9-api.git
  1. Change directory
cd bind9-api
  1. Run
docker compose up -d
  1. Start Dev application
go mod tidy
docker exec -it bind9-api-dev bash
cd /bind9-api
air

Release

Check if the release is ready to be published

git tag v0.1.0
goreleaser release --snapshot --clean

Publish the release

git tag v0.1.0
# Following should fire the Github "Release" workflow
git push origin v0.1.0

Manual release

goreleaser release --clean

Additional commands:

#Delete local tag
git tag -d v0.1.0

#Delete remote tag
git push --delete origin v0.1.0

About

REST APi to manage BIND9 DNS Server from anywhere

Resources

License

Stars

Watchers

Forks

Packages

No packages published