PowerDNS Authoritative Server (Ubuntu): Unterschied zwischen den Versionen
(10 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 55: | Zeile 55: | ||
<pre> | <pre> | ||
log-dns-details=yes | |||
log-dns-queries=yes | |||
api=yes | api=yes | ||
api-key=<api key> | api-key=<api key> | ||
Zeile 69: | Zeile 71: | ||
sudo systemctl restart pdns.service | sudo systemctl restart pdns.service | ||
</pre> | </pre> | ||
==== Links ==== | |||
[https://doc.powerdns.com/md/httpapi/README/ https://doc.powerdns.com/md/httpapi/README/] | |||
== Benutzeroberfläche == | == Benutzeroberfläche == | ||
Zeile 88: | Zeile 94: | ||
[https://www.claudiokuenzler.com/blog/844/powerdns-master-slave-dns-replication-mysql-backend https://www.claudiokuenzler.com/blog/844/powerdns-master-slave-dns-replication-mysql-backend] | [https://www.claudiokuenzler.com/blog/844/powerdns-master-slave-dns-replication-mysql-backend https://www.claudiokuenzler.com/blog/844/powerdns-master-slave-dns-replication-mysql-backend] | ||
== Daten einfügen == | |||
<pre> | |||
--delete from domains; | |||
--delete from records; | |||
INSERT INTO domains (name, type) | |||
VALUES ('dynamic-dns.at', 'NATIVE'); | |||
INSERT INTO records (domain_id, name, content, type,ttl,prio) | |||
VALUES ((SELECT id FROM domains WHERE name='dynamic-dns.at'),'dynamic-dns.at','localhost admin.kirner.or.at 2020022201 10800 3600 604800 3600','SOA',86400,NULL); | |||
INSERT INTO records (domain_id, name, content, type,ttl,prio) | |||
VALUES ((SELECT id FROM domains WHERE name='dynamic-dns.at'),'dynamic-dns.at','dns1.dynamic-dns.at','NS',86400,NULL); | |||
INSERT INTO records (domain_id, name, content, type,ttl,prio) | |||
VALUES ((SELECT id FROM domains WHERE name='dynamic-dns.at'),'dynamic-dns.at','dns2.dynamic-dns.at','NS',86400,NULL); | |||
INSERT INTO records (domain_id, name, content, type,ttl,prio) | |||
VALUES ((SELECT id FROM domains WHERE name='dynamic-dns.at'),'www.dynamic-dns.at','222.122.134.13','A',120,NULL); | |||
INSERT INTO records (domain_id, name, content, type,ttl,prio) | |||
VALUES ((SELECT id FROM domains WHERE name='dynamic-dns.at'),'dns1.dynamic-dns.at','222.122.134.13','A',120,NULL); | |||
INSERT INTO records (domain_id, name, content, type,ttl,prio) | |||
VALUES ((SELECT id FROM domains WHERE name='dynamic-dns.at'),'dns2.dynamic-dns.at','222.122.134.14','A',120,NULL); | |||
--INSERT INTO records (domain_id, name, content, type,ttl,prio) | |||
--VALUES ((SELECT id FROM domains WHERE name='dynamic-dns.at'),'mail1.kirner.at','222.122.134.11','A',120,NULL); | |||
--INSERT INTO records (domain_id, name, content, type,ttl,prio) | |||
--VALUES ((SELECT id FROM domains WHERE name='dynamic-dns.at'),'mail2.kirner.at','222.122.134.12','A',120,NULL); | |||
INSERT INTO records (domain_id, name, content, type,ttl,prio) | |||
VALUES ((SELECT id FROM domains WHERE name='dynamic-dns.at'),'localhost.dynamic-dns.at','127.0.0.1','A',120,NULL); | |||
INSERT INTO records (domain_id, name, content, type,ttl,prio) | |||
VALUES ((SELECT id FROM domains WHERE name='dynamic-dns.at'),'dynamic-dns.at','mail.kirner.or.at','MX',120,25); | |||
</pre> | |||
=== Hinweise === | |||
<pre> | |||
$ORIGIN example.com. | |||
"@" ist ein Joker-Symbol für den Wert von $ORIGIN | |||
</pre> | |||
Zurück zu [[ | Zurück zu [[PowerDNS (Ubuntu)|PowerDNS]] |
Aktuelle Version vom 26. Februar 2020, 12:03 Uhr
Allgemein
Voraussetzungen
SQL-Datenbank => siehe MariaDB
Installation
Binaries
sudo apt-get -y install pdns-server pdns-backend-mysql
Links
https://doc.powerdns.com/authoritative/installation.html
Datenbank
Datenbank für PowerDNS erstellen
Service starten
sudo systemctl start pdns.service sudo systemctl status pdns.service
Links
https://doc.powerdns.com/authoritative/installation.html
https://www.linux.com/tutorials/how-install-powerdns-dns-server-ubuntu/
https://clouding.io/kb/en/how-to-install-powerdns-on-ubuntu-18-04/
https://www.debacher.de/wiki/Mein_eigenes_DynDNS
Konfiguration
In der Grundkofiguration ist nur die Eingabe der Zugangsdaten für die Datenbank notwendig. Die Konfigurationen in Verbindung mit PowerDNS-Recursor ist dort beschrieben.
Siehe dazu Datenbank für PowerDNS erstellen bzw. PowerDNS_Recursor
API für PowerDNS-Admin
/etc/powerdns/pdns.conf
sudo vi /etc/powerdns/pdns.conf
log-dns-details=yes log-dns-queries=yes api=yes api-key=<api key> api-logfile=/var/log/pdns.log
API-Key Generator
https://codepen.io/corenominal/pen/rxOmMJ
Server neustarten
sudo systemctl restart pdns.service
Links
https://doc.powerdns.com/md/httpapi/README/
Benutzeroberfläche
PowerDNS-Admin
Siehe dazu PowerDNS-Admin
Links allgemein
https://github.com/PowerDNS/pdns/wiki/WebFrontend
Mehrere Domainserver
Master / Slave
https://doc.powerdns.com/authoritative/modes-of-operation.html
https://www.claudiokuenzler.com/blog/844/powerdns-master-slave-dns-replication-mysql-backend
Daten einfügen
--delete from domains; --delete from records; INSERT INTO domains (name, type) VALUES ('dynamic-dns.at', 'NATIVE'); INSERT INTO records (domain_id, name, content, type,ttl,prio) VALUES ((SELECT id FROM domains WHERE name='dynamic-dns.at'),'dynamic-dns.at','localhost admin.kirner.or.at 2020022201 10800 3600 604800 3600','SOA',86400,NULL); INSERT INTO records (domain_id, name, content, type,ttl,prio) VALUES ((SELECT id FROM domains WHERE name='dynamic-dns.at'),'dynamic-dns.at','dns1.dynamic-dns.at','NS',86400,NULL); INSERT INTO records (domain_id, name, content, type,ttl,prio) VALUES ((SELECT id FROM domains WHERE name='dynamic-dns.at'),'dynamic-dns.at','dns2.dynamic-dns.at','NS',86400,NULL); INSERT INTO records (domain_id, name, content, type,ttl,prio) VALUES ((SELECT id FROM domains WHERE name='dynamic-dns.at'),'www.dynamic-dns.at','222.122.134.13','A',120,NULL); INSERT INTO records (domain_id, name, content, type,ttl,prio) VALUES ((SELECT id FROM domains WHERE name='dynamic-dns.at'),'dns1.dynamic-dns.at','222.122.134.13','A',120,NULL); INSERT INTO records (domain_id, name, content, type,ttl,prio) VALUES ((SELECT id FROM domains WHERE name='dynamic-dns.at'),'dns2.dynamic-dns.at','222.122.134.14','A',120,NULL); --INSERT INTO records (domain_id, name, content, type,ttl,prio) --VALUES ((SELECT id FROM domains WHERE name='dynamic-dns.at'),'mail1.kirner.at','222.122.134.11','A',120,NULL); --INSERT INTO records (domain_id, name, content, type,ttl,prio) --VALUES ((SELECT id FROM domains WHERE name='dynamic-dns.at'),'mail2.kirner.at','222.122.134.12','A',120,NULL); INSERT INTO records (domain_id, name, content, type,ttl,prio) VALUES ((SELECT id FROM domains WHERE name='dynamic-dns.at'),'localhost.dynamic-dns.at','127.0.0.1','A',120,NULL); INSERT INTO records (domain_id, name, content, type,ttl,prio) VALUES ((SELECT id FROM domains WHERE name='dynamic-dns.at'),'dynamic-dns.at','mail.kirner.or.at','MX',120,25);
Hinweise
$ORIGIN example.com. "@" ist ein Joker-Symbol für den Wert von $ORIGIN
Zurück zu PowerDNS