PowerDNS Authoritative Server (Ubuntu): Unterschied zwischen den Versionen
(39 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 21: | Zeile 21: | ||
=== Datenbank === | === Datenbank === | ||
[[Datenbank für PowerDNS erstellen (Version 4.1.X)|Datenbank für PowerDNS erstellen]] | |||
=== Service starten === | |||
<pre> | <pre> | ||
sudo systemctl start pdns.service | |||
sudo systemctl status pdns.service | |||
</pre> | </pre> | ||
=== Links === | === Links === | ||
Zeile 61: | Zeile 42: | ||
== Konfiguration == | == 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_(Version_4.1.X)#Datenbank_anlegen|Datenbank für PowerDNS erstellen]] bzw. [[PowerDNS_Recursor_(Ubuntu)#/etc/powerdns/pdns.conf|PowerDNS_Recursor]] | |||
=== API für PowerDNS-Admin === | |||
==== /etc/powerdns/pdns.conf ==== | |||
<pre> | |||
sudo vi /etc/powerdns/pdns.conf | |||
</pre> | |||
<pre> | |||
log-dns-details=yes | |||
log-dns-queries=yes | |||
api=yes | |||
api-key=<api key> | |||
api-logfile=/var/log/pdns.log | |||
</pre> | |||
== | ==== API-Key Generator ==== | ||
[https://codepen.io/corenominal/pen/rxOmMJ https://codepen.io/corenominal/pen/rxOmMJ] | |||
==== | ==== Server neustarten ==== | ||
<pre> | |||
sudo systemctl restart pdns.service | |||
</pre> | |||
==== Links ==== | ==== Links ==== | ||
[https:// | [https://doc.powerdns.com/md/httpapi/README/ https://doc.powerdns.com/md/httpapi/README/] | ||
== Benutzeroberfläche == | |||
=== PowerDNS-Admin === | === PowerDNS-Admin === | ||
=== | Siehe dazu [[PowerDNS-Admin (Ubuntu)|PowerDNS-Admin]] | ||
=== Links allgemein === | |||
[https://github.com/ | [https://github.com/PowerDNS/pdns/wiki/WebFrontends https://github.com/PowerDNS/pdns/wiki/WebFrontend] | ||
==== | == Mehrere Domainserver == | ||
=== Master / Slave === | |||
[https://doc.powerdns.com/authoritative/modes-of-operation.html https://doc.powerdns.com/authoritative/modes-of-operation.html] | |||
[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