Difference between revisions of "Powerdns Docker"

From UVOO Tech Wiki
Jump to navigation Jump to search
 
(2 intermediate revisions by the same user not shown)
Line 12: Line 12:
  
 
https://doc.powerdns.com/authoritative/manpages/pdns_server.1.html
 
https://doc.powerdns.com/authoritative/manpages/pdns_server.1.html
 +
 +
https://doc.powerdns.com/authoritative/settings.html
 +
 +
https://www.ncartron.org/testing-powerdns-450-beta1s-zone-cache.html
  
 
```
 
```
Line 43: Line 47:
 
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
 
```
 
```

Latest revision as of 02:04, 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

https://doc.powerdns.com/authoritative/settings.html

https://www.ncartron.org/testing-powerdns-450-beta1s-zone-cache.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