• This forum has a zero tolerance policy regarding spam. If you register here to publish advertising, your user account will be deleted without further questions.

PowerDNS mittels axfr

Werner S

Member
Hallo,

Ich stelle gerade meine PowerDNS Server von MySQL Replikation auf axfr um und stoße dabei auf das Problem das die Daten nicht auf den Slave übertragen werden. Beide mit MySQL Backend

Master Server:
rs36.domain.de <<<< gleichzetig auch der Hostname, Subdomain wurde auf IP geleitet
IP 185.239.xxx.xxx

Slave:
ns.domain.de <<<< gleichzetig auch der Hostname, Subdomain wurde auf IP geleitet
IP 134.255.xxx.xxx

########## Master pdns.conf ##########
allow-axfr-ips=134.255.xxx.xxx <<<<<< IP des Slave
allow-recursion=0.0.0.0/0
config-dir=/etc/powerdns
daemon=yes
disable-syslog=no
include-dir=/etc/powerdns/pdns.d
launch=
local-port=53
log-dns-details=yes
log-dns-queries=yes
loglevel=9
master=yes
setgid=pdns
setuid=pdns
slave=no

########## Slave pdns.conf ##########

allow-recursion=0.0.0.0/0
config-dir=/etc/powerdns
daemon=yes
disable-axfr=yes
disable-tcp=no
include-dir=/etc/powerdns/pdns.d
launch=
local-port=53
log-dns-queries=yes
loglevel=9
master=no
security-poll-suffix=
setgid=pdns
setuid=pdns
slave=yes

########## Master Log #######
Feb 5 15:45:25 rs36 systemd[1]: Starting PowerDNS Authoritative Server...
Feb 5 15:45:25 rs36 pdns_server[12084]: Feb 05 15:45:25 Reading random entropy from '/dev/urandom'
Feb 5 15:45:25 rs36 pdns_server[12084]: Feb 05 15:45:25 Loading '/usr/lib/x86_64-linux-gnu/pdns/libgmysqlbackend.so'
Feb 5 15:45:25 rs36 pdns_server[12084]: Feb 05 15:45:25 [gmysqlbackend] This is the gmysql backend version 4.0.3 reporting
Feb 5 15:45:25 rs36 pdns_server[12084]: Feb 05 15:45:25 This is a standalone pdns
Feb 5 15:45:25 rs36 pdns_server[12084]: Feb 05 15:45:25 Listening on controlsocket in '/var/run/pdns.controlsocket'
Feb 5 15:45:25 rs36 pdns_server[12084]: Feb 05 15:45:25 UDP server bound to 0.0.0.0:53
Feb 5 15:45:25 rs36 pdns_server[12084]: Feb 05 15:45:25 UDPv6 server bound to [::]:53
Feb 5 15:45:25 rs36 pdns_server[12084]: Feb 05 15:45:25 TCP server bound to 0.0.0.0:53
Feb 5 15:45:25 rs36 pdns_server[12084]: Feb 05 15:45:25 TCPv6 server bound to [::]:53
Feb 5 15:45:25 rs36 pdns_server[12084]: Feb 05 15:45:25 PowerDNS Authoritative Server 4.0.3 (C) 2001-2016 PowerDNS.COM BV
Feb 5 15:45:25 rs36 pdns_server[12084]: Feb 05 15:45:25 Using 64-bits mode. Built using gcc 6.3.0 20170516.
Feb 5 15:45:25 rs36 pdns_server[12084]: Feb 05 15:45:25 PowerDNS comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it according to the terms of the GPL version 2.
Feb 5 15:45:25 rs36 pdns_server[12084]: Feb 05 15:45:25 Set effective group id to 119
Feb 5 15:45:25 rs36 pdns_server[12084]: Feb 05 15:45:25 Set effective user id to 113
Feb 5 15:45:25 rs36 pdns_server[12084]: Feb 05 15:45:25 Doing stub resolving, using resolvers: 8.8.8.8, 8.8.8.4
Feb 5 15:45:25 rs36 pdns_server[12084]: Feb 05 15:45:25 Question got answered by 8.8.8.8
Feb 5 15:45:25 rs36 pdns_server[12084]: Feb 05 15:45:25 Could not retrieve security status update for '4.0.3-1+deb9u2.Debian' on 'auth-4.0.3-1_deb9u2.Debian.security-status.secpoll.powerdns.com.', RCODE = Non-Existent domain
Feb 5 15:45:25 rs36 pdns_server[12084]: Feb 05 15:45:25 Creating backend connection for TCP
Feb 5 15:45:25 rs36 pdns_server[12084]: Feb 05 15:45:25 gmysql Connection successful. Connected to database 'pdns' on 'localhost'.
Feb 5 15:45:25 rs36 systemd[1]: Started PowerDNS Authoritative Server.
Feb 5 15:45:25 rs36 pdns_server[12084]: Feb 05 15:45:25 About to create 3 backend threads for UDP
Feb 5 15:45:25 rs36 pdns_server[12084]: Feb 05 15:45:25 Master/slave communicator launching
Feb 5 15:45:25 rs36 pdns_server[12084]: Feb 05 15:45:25 gmysql Connection successful. Connected to database 'pdns' on 'localhost'.
Feb 5 15:45:25 rs36 pdns_server[12084]: Feb 05 15:45:25 gmysql Connection successful. Connected to database 'pdns' on 'localhost'.
Feb 5 15:45:25 rs36 pdns_server[12084]: Feb 05 15:45:25 No master domains need notifications
Feb 5 15:45:25 rs36 pdns_server[12084]: Feb 05 15:45:25 gmysql Connection successful. Connected to database 'pdns' on 'localhost'.
Feb 5 15:45:25 rs36 pdns_server[12084]: Feb 05 15:45:25 gmysql Connection successful. Connected to database 'pdns' on 'localhost'.
Feb 5 15:45:25 rs36 pdns_server[12084]: Feb 05 15:45:25 Done launching threads, ready to distribute questions

########## Slave Log #######
Feb 5 15:45:29 ns systemd[1]: Starting PowerDNS Authoritative Server...
Feb 5 15:45:30 ns pdns_server[26716]: Feb 05 15:45:30 Reading random entropy from '/dev/urandom'
Feb 5 15:45:30 ns pdns_server[26716]: Feb 05 15:45:30 Loading '/usr/lib/x86_64-linux-gnu/pdns/libgmysqlbackend.so'
Feb 5 15:45:30 ns pdns_server[26716]: Feb 05 15:45:30 [gmysqlbackend] This is the gmysql backend version 4.0.3 reporting
Feb 5 15:45:30 ns pdns_server[26716]: Feb 05 15:45:30 This is a standalone pdns
Feb 5 15:45:30 ns pdns_server[26716]: Feb 05 15:45:30 Listening on controlsocket in '/var/run/pdns.controlsocket'
Feb 5 15:45:30 ns pdns_server[26716]: Feb 05 15:45:30 UDP server bound to 0.0.0.0:53
Feb 5 15:45:30 ns pdns_server[26716]: Feb 05 15:45:30 UDPv6 server bound to [::]:53
Feb 5 15:45:30 ns pdns_server[26716]: Feb 05 15:45:30 TCP server bound to 0.0.0.0:53
Feb 5 15:45:30 ns pdns_server[26716]: Feb 05 15:45:30 TCPv6 server bound to [::]:53
Feb 5 15:45:30 ns pdns_server[26716]: Feb 05 15:45:30 PowerDNS Authoritative Server 4.0.3 (C) 2001-2016 PowerDNS.COM BV
Feb 5 15:45:30 ns pdns_server[26716]: Feb 05 15:45:30 Using 64-bits mode. Built using gcc 6.3.0 20170516.
Feb 5 15:45:30 ns pdns_server[26716]: Feb 05 15:45:30 PowerDNS comes with ABSOLUTELY NO WARRANTY. This is free software, and you are welcome to redistribute it according to the terms of the GPL version 2.
Feb 5 15:45:30 ns pdns_server[26716]: Feb 05 15:45:30 Set effective group id to 112
Feb 5 15:45:30 ns pdns_server[26716]: Feb 05 15:45:30 Set effective user id to 108
Feb 5 15:45:30 ns pdns_server[26716]: Feb 05 15:45:30 Creating backend connection for TCP
Feb 5 15:45:30 ns pdns_server[26716]: Feb 05 15:45:30 Master/slave communicator launching
Feb 5 15:45:30 ns pdns_server[26716]: Feb 05 15:45:30 gmysql Connection successful. Connected to database 'pdns' on 'localhost'.
Feb 5 15:45:30 ns systemd[1]: Started PowerDNS Authoritative Server.
Feb 5 15:45:30 ns pdns_server[26716]: Feb 05 15:45:30 gmysql Connection successful. Connected to database 'pdns' on 'localhost'.
Feb 5 15:45:30 ns pdns_server[26716]: Feb 05 15:45:30 No new unfresh slave domains, 0 queued for AXFR already, 0 in progress
Feb 5 15:45:30 ns pdns_server[26716]: Feb 05 15:45:30 About to create 3 backend threads for UDP
Feb 5 15:45:30 ns pdns_server[26716]: Feb 05 15:45:30 gmysql Connection successful. Connected to database 'pdns' on 'localhost'.
Feb 5 15:45:30 ns pdns_server[26716]: Feb 05 15:45:30 gmysql Connection successful. Connected to database 'pdns' on 'localhost'.
Feb 5 15:45:30 ns pdns_server[26716]: Feb 05 15:45:30 gmysql Connection successful. Connected to database 'pdns' on 'localhost'.
Feb 5 15:45:30 ns pdns_server[26716]: Feb 05 15:45:30 Done launching threads, ready to distribute questions

Auf dem Master habe ich bereits eine Domain und Records eingetragen.
Auf dem Slave Server habe ich in der supermaster Tabelle die IP des Master und den Hostname des Master eingetragen.
Diverse Artikel haben mir zwar etwas geholfen so das ich einige Fehler bereits beheben konnte, nur eben das mit dem Sync nicht.

Gerne würde ich die volle IP und Domain posten, habe aber gemerkt das dadurch der Spam extrem hoch wird. Gerne via PN auf Nachfrage
 
Last edited by a moderator:
Kannst du die Zone vom Master via "dig" herunterladen?

Code:
dig AXFR domain.tld @master-ip
 
Nein.

dig AXFR domain.de @master-ip
;; communications error to masterip#53: end of file

Laut Logs ist der Server gestartet. Er kann also keine Verbindung zur IP:port herstellen.

nmap localhost

root@rs36:~# nmap localhost

Starting Nmap 7.40 ( https://nmap.org ) at 2018-02-07 12:20 CET
Nmap scan report for localhost (127.0.0.1)
Host is up (0.000016s latency).
Other addresses for localhost (not scanned): ::1
rDNS record for 127.0.0.1: localhost.localdomain
Not shown: 990 closed ports
PORT STATE SERVICE
22/tcp open ssh
25/tcp open smtp
80/tcp open http
110/tcp open pop3
143/tcp open imap
443/tcp open https
465/tcp open smtps
993/tcp open imaps
995/tcp open pop3s
3306/tcp open mysql

Nmap done: 1 IP address (1 host up) scanned in 1.70 seconds

nmap IP
Sagt mir das der DNS läuft
 
Last edited by a moderator:
Der DNS Server läuft eben nicht, laut Ausgabe ist da nichts mit Port 53.
 
Last edited by a moderator:
Mittlerweile läuft der PDNS, aber das gleiche Problem besteht noch

nmap localhost auf dem master und slave sagen er läuft

Auf dem Slave führe ich

dig AXFR domain.de @master-ip

aus und bekomme auch die Records angezeigt.

Auf dem Master führe ich

dig AXFR domain.de @slave-ip

und bekomme keine Meldung zurück. Die Confs oben sind unverändert.

Derzeit habe ich eine MySQL Replikation laufen Master Slave Slave bis ich es mit dem AXFR gelöst habe
 
Last edited by a moderator:
Hallo,

ich habe das Thema noch nicht ganz abschlossen und hoffe man kann mir noch helfen. Ich bin jetzt nach diesem Howto gegangen https://www.digitalocean.com/commun...on-on-a-slave-powerdns-server-on-ubuntu-14-04 allerdings ohne poweradmin Interface

Sowohl auf dem Master als auch auf dem Slave kann ich

dig AXFR domain.de @master-ip

ausführen und bekomme die Records angezeigt.

dig AXFR domain.de @slave-ip

bring kein Ergebnis, es wurde auch vom Master nichts am Slave eingetragen.

System ist Debian 9. In den Logs findet sich nur das er gestartet wurde aber keine Errors.
 
Last edited by a moderator:
Grüß euch,

Wochenende, jetzt kann ich mich dem DNS mal wieder widmen, auch wenn die DNS Server für mich selber nur zum Testen sind und nicht wirklich Produktiv zum Einsatz kommen. Man will sich ja schließlich etwas Weiterbilden.

Ich habe es jetzt auf Frisch installierten CentOS 7 Servern mit MySQL Backend versucht.

Das Problem in der Vergangenheit war, ich habe wohl übersehen das ich nach einer DNS Änderung im SOAR Record und in der Tabelle domains den serial_key noch anpassen muss 2018081009. Für jede Änderung um 1 erhöhen.
 
Last edited by a moderator:
Back
Top