[Pdns-users] [Ext] Re: [Ext] Re: Trying to find a simple "how to" - pdnsutil secure-zone version

Edward Lewis edward.lewis at icann.org
Wed Apr 10 12:52:50 UTC 2019


On 4/9/19, 14:17, "Brian Candler" <b.candler at pobox.com> wrote:

>You first need to create a database (e.g. "create database pdns;") and then select it ("use pdns;")



I added these steps.  To try to figure out what next, here is some detail on where I am.  (I am using HTML mail so I can color code what’s going on.  Red I typed to terminal, green is the output, black is commentary.)



Goal: Replicate the steps on https://doc.powerdns.com/authoritative/guides/basic-database.html, going towards using pdnsutil's secure-zone to turn on DNSSEC signing.



I loaded MariaDB on Ubuntu ...(I’m not savvy enough to know the difference between sqlite, mysql and Maria, if that’s the weakness, let me know) ... to the point where this happens:



# mysql -u root

Welcome to the MariaDB monitor.  Commands end with ; or \g.

Your MariaDB connection id is 49

Server version: 10.0.38-MariaDB-0ubuntu0.16.04.1 Ubuntu 16.04



Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.



Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.



MariaDB [(none)]>



Note - there's no password.  When I did the 'apt install' line a few days ago, it never stopped for a password.  This will come up later.



In /etc/powerdns, I have pdns.conf and have these lines:


config-dir=/etc/powerdns
include-dir=/etc/powerdns/pdns.d
local-port=8053
prevent-self-notification=yes
security-poll-suffix=
setgid=pdns
setuid=pdns
version-string=full
write-pid=yes
bind-check-interval=300
local-address=127.0.0.1
master=yes
setgid=pdns
setuid=pdns
launch=gmysql
gmysql-host=127.0.0.1
gmysql-user=root
gmysql-dbname=pdns

#gmysql-password=mysecretpassword



I use service pdns start and stop to run PowerDNS.  One note – the password is commented out as there’s no password for the MariaDB as it is installed.  (I wouldn’t stand for this in a real environment.)



In MariaDB (continuing above) I added the create and use lines and then cut and pasted the configuration from the web page mentioned above:


MariaDB [(none)]> create database pdns;
Query OK, 1 row affected (0.00 sec)

MariaDB [(none)]> use pdns;
Database changed
MariaDB [pdns]> CREATE TABLE domains (
    ->   id                    INT AUTO_INCREMENT,
    ->   name                  VARCHAR(255) NOT NULL,
    ->   master                VARCHAR(128) DEFAULT NULL,
    ->   last_check            INT DEFAULT NULL,

...
MariaDB [pdns]> CREATE UNIQUE INDEX namealgoindex ON tsigkeys(name, algorithm);
Query OK, 0 rows affected (0.00 sec)
Records: 0  Duplicates: 0  Warnings: 0



I then go on to fill in some data, more copy-and-paste from the website:


MariaDB [pdns]> INSERT INTO domains (name, type) values ('example.com', 'NATIVE');
Query OK, 1 row affected (0.00 sec)

...(skipping over what’s in the webpage example)...

MariaDB [pdns]> INSERT INTO records (domain_id, name, content, type,ttl,prio)
    -> VALUES (1,'example.com','mail.example.com','MX',120,25);
Query OK, 1 row affected (0.00 sec)



I then ‘service pdns start’ and look in syslogs:


tail -f /var/log/syslog  | grep "pdns"

...
Apr 10 12:27:56 $host pdns[10489]: Guardian is launching an instance
Apr 10 12:27:56 $host pdns[10489]: Reading random entropy from '/dev/urandom'
Apr 10 12:27:56 $host pdns[10489]: Loading '/usr/lib/x86_64-linux-gnu/pdns/libgmysqlbackend.so'
Apr 10 12:27:56 $host pdns[10489]: Unable to load module '/usr/lib/x86_64-linux-gnu/pdns/libgmysqlbackend.so': /usr/lib/x86_64-linux-gnu/pdns/libgmysqlbackend.so: cannot open shared object file: No such file or directory
Apr 10 12:27:56 $host pdns[10489]: DNSBackend unable to load module in gmysql
Apr 10 12:27:57 $host pdns[10485]: Our pdns instance exited with code 1, respawning

My question is ... I’m following the instructions on the page (and with help from the list), yet I can’t replicate the page’s results.  What do I need to ‘learn’ here?


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.powerdns.com/pipermail/pdns-users/attachments/20190410/88dee213/attachment-0001.html>


More information about the Pdns-users mailing list