Difference between revisions of "Powerdns Docker"
Jump to navigation
Jump to search
Line 43: | Line 43: | ||
curl -v -H 'X-API-Key: foo' http://127.0.0.1:8081/api/v1/servers/localhost/zones | jq . | curl -v -H 'X-API-Key: foo' http://127.0.0.1:8081/api/v1/servers/localhost/zones | jq . | ||
curl -v -H 'X-API-Key: foo' http://127.0.0.1:8081/api/v1/servers/localhost/zones/foo.example.com | jq . | curl -v -H 'X-API-Key: foo' http://127.0.0.1:8081/api/v1/servers/localhost/zones/foo.example.com | jq . | ||
+ | ``` | ||
+ | |||
+ | clear cache | ||
+ | ``` | ||
+ | rec_control wipe-cache example.com | ||
+ | To empty all the cache | ||
+ | |||
+ | rec_control wipe-cache example.com | ||
+ | For PDNS Authoritative Server: | ||
+ | |||
+ | To delete the cache for a particular domain | ||
+ | |||
+ | pdns_control purge example.com | ||
``` | ``` |
Revision as of 01:56, 9 March 2023
https://dmachard.github.io/posts/0010-powerdns-dnsdist-docker/
https://github.com/pschiffe/docker-pdns
https://makarainen.net/PowerDNS-pdnsutil-cheat-sheet
https://doc.powerdns.com/authoritative/migration.html
https://doc.powerdns.com/authoritative/http-api/index.html
https://doc.powerdns.com/authoritative/http-api/zone.html
https://doc.powerdns.com/authoritative/manpages/pdns_server.1.html
apt-get -y install pdns-backend-pgsql pdns-backend-sqlite3 postgresql-client sqlite3
pdns.conf
webserver-port=8081 api=yes api-key=foothis launch=gsqlite3 gsqlite3-database=/tmp/db.sqlite3 local-address=0.0.0.0:5353 # security-poll-suffix= # include-dir=/etc/powerdns/pdns.d # launch=
sqlite3 /tmp/db.sqlite3 < /usr/share/pdns-backend-sqlite3/schema/schema.sqlite3.sql
pdnsutil create-zone foo.example.com pdnsutil add-record foo.example.com @ A 192.168.1.2 dig +short foo.example.com -p 5353 @127.0.0.1
curl -v -H 'X-API-Key: foo' http://127.0.0.1:8081/api/v1/servers/localhost/zones | jq . curl -v -H 'X-API-Key: foo' http://127.0.0.1:8081/api/v1/servers/localhost/zones/foo.example.com | jq .
clear cache
rec_control wipe-cache example.com To empty all the cache rec_control wipe-cache example.com For PDNS Authoritative Server: To delete the cache for a particular domain pdns_control purge example.com