scripts-misc/powerdns/README.md
2023-03-31 10:42:21 +02:00

1.1 KiB

powerdns-scripts

A collection of powerdns scripts for managing my setup

The scripts execute the pdnsutil commands via SSH on the target servers.

configuration

Configuration of the ssh targets happens via environment variables:

PDNS_PRIMARY_SSH

PDNS_PRIMARY_SSH=root@primary.domain.com

PDNS_SECONDARIES_SSH

PDNS_SECONDARIES_SSH=root@secondary1.domain.com;root@secondary2.domain.com

PDNS_APIKEY

PDNS_APIKEY=qqqqq-qqqqq-qqqqq-qqqqq

currently needed for deleting records, thats only possible via API apparently

PDNS_API_PORT

PDNS_API_PORT=8081

different http port for API requests, defaults to 8081

PDNS_API_SCHEME

PDNS_API_SCHEME=http

either `http` or `https` (if https, api must have trusted certificate)

Commands

dns-a-delete

usage: dns-a-add sub.domain.com 1.2.3.4

dns-a-delete

usage: dns-a-delete sub.domain.com 1.2.3.4

dns-cname-add

usage: dns-cname-add sub.domain.com other-sub.domain.com

dns-cname-delete

usage: dns-cname-delete sub.domain.com other-sub.domain.com