PowerDNS Authoritative Server (Ubuntu): Unterschied zwischen den Versionen
Zeile 98: | Zeile 98: | ||
--delete from records; | --delete from records; | ||
INSERT INTO domains (name, type) | INSERT INTO domains (name, type) | ||
VALUES ('dynamic-dns.at', 'NATIVE'); | |||
INSERT INTO records (domain_id, name, content, type,ttl,prio) | 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 admin.kirner.or.at 2020022201','SOA',86400,NULL); | VALUES ((SELECT id FROM domains WHERE name='dynamic-dns.at'),'dynamic-dns.at','dns1.dynamic-dns.at admin.kirner.or.at 2020022201','SOA',86400,NULL); |
Version vom 22. Februar 2020, 12:18 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
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','dns1.dynamic-dns.at admin.kirner.or.at 2020022201','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);
Zurück zu PowerDNS