Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/quantum5/do-dns-manager

A DNS record manager using DigitalOcean as backend, useful for assigning DNS records in a DHCP hook.
https://github.com/quantum5/do-dns-manager

Last synced: about 16 hours ago
JSON representation

A DNS record manager using DigitalOcean as backend, useful for assigning DNS records in a DHCP hook.

Awesome Lists containing this project

README

        

``do-dns-manager`` |pypi|
=========================

A DNS record manager using DigitalOcean as backend, with its own authentication.
Best suited when you just need something that changes the DNS, but you don't want it
to have access to other APIs, for example, APIs that can cost you money.

I find this particularly useful for assigning DNS records in a DHCP lease hook.
An example hook is included as ``dnsmasq-hook`` for ``dnsmasq`` users.

Installation
------------

::

pip install do-dns-manager

Configuration
-------------

Create `htpasswd.txt` somewhere containing lines of username and password pairs
separated by ``:``, for example:

::

spam:password
ham:hunter2

We will call this file ``$HTPASSWD``.

Run the DNS manager as follows:

::

DIGITAL_OCEAN_API_KEY='(api key)' do-dns-manager --domain=example.com --keyfile=$HTPASSWD --port=8888 --address=127.0.0.1

Change ``(api key)``, ``example.com``, ``$HTPASSWD``, ``8888`` and ``127.0.0.1``
to fit your situation.

We will use ``curl`` examples:

::

# Add A record for spam.example.com
curl -u 'spam:password' http://127.0.0.1:8888 -d @- <