The “name” field must be the full hostname that ends with the domain
name to be valid.
Here’s an example from a working zone:
MariaDB [powerdns]> select * from domains limit 1;
+----+------------+--------+------------+--------+-----------------+---------+-----+
| id | name | master | last_check | type | notified_serial |
account | cas |
+----+------------+--------+------------+--------+-----------------+---------+-----+
| 1 | ha.ena.net | NULL | NULL | MASTER | 2019121901 |
2169 | |
+----+------------+--------+------------+--------+-----------------+---------+-----+
1 rows in set (0.00 sec)
MariaDB [powerdns]> select * from records where domain_id = 1 limit 5;
+----+-----------+--------------------+------+-------------+-------+------+-------------+-----------+------+----------+
| id | domain_id | name | type | content | ttl |
prio | change_date | ordername | auth | disabled |
+----+-----------+--------------------+------+-------------+-------+------+-------------+-----------+------+----------+
| 2 | 1 | test.ha.ena.net | A | 1.2.3.4 | 300 |
0 | 1539287429 | NULL | 0 | 0 |
| 7 | 1 | ha.ena.net | NS | ns1.ena.net | 86400 |
0 | 1572025749 | NULL | 0 | 0 |
| 8 | 1 | ha.ena.net | NS | ns2.ena.net | 86400 |
0 | 1572025749 | NULL | 0 | 0 |
| 9 | 1 | tickets.ha.ena.net | A | 96.5.2.23 | 300 |
0 | 1539287429 | NULL | 0 | 0 |
| 10 | 1 | ldap.ha.ena.net | A | 96.4.2.38 | 300 |
0 | 1572025750 | NULL | 0 | 0 |
+----+-----------+--------------------+------+-------------+-------+------+-------------+-----------+------+----------+
5 rows in set (0.00 sec)
From: Pdns-users <[email protected]> on behalf of
Steven Christensen via Pdns-users <[email protected]>
Reply-To: Steven Christensen <[email protected]>
Date: Sunday, February 23, 2020 at 5:42 PM
To: "[email protected]" <[email protected]>
Subject: [Pdns-users] Internal DNS for .LAN Domain
This isn't working... any ideas?
Added to database fine...
-------------------------------------------------
INSERT INTO domains (name, type) values ('1.168.192.in-addr.arpa',
'MASTER');
INSERT INTO domains (name, type) values ('lan', 'MASTER');
INSERT INTO records (domain_id, name, content, type,ttl,prio)
VALUES (1,'lan','localhost admin.example.com 1 10380 3600 604800
3600','SOA',86400,NULL);
INSERT INTO records (domain_id, name, content, type,ttl,prio)
VALUES (2,'1.168.192.in-addr.arpa','localhost admin.example.com
<http://admin.example.com> 1 10380 3600 604800 3600','SOA',86400,NULL);
INSERT INTO records (domain_id, name, content, type,ttl,prio)
VALUES (1,'lan','localhost','NS',86400,NULL);
INSERT INTO records (domain_id, name, content, type,ttl,prio)
VALUES (2,'1.168.192.in-addr.arpa','localhost','NS',86400,NULL);
INSERT INTO records (domain_id, name, content, type,ttl,prio)
VALUES (1,'dns1','192.168.86.254','A',3600,NULL);
INSERT INTO records (domain_id, name, content, type,ttl,prio)
VALUES (2,'192.168.1.254','dns1','PTR',3600,NULL);
-----------------------------------------------------------------------------
[root@dns1 pdns]# nslookup
> server
Default server: 192.168.1.254
Address: 192.168.1.254#53
> 192.168.1.254
** server can't find 254.1.168.192.in-addr.arpa: NXDOMAIN
> dns1
Server: 192.168.1.254
Address: 192.168.1.254#53
** server can't find dns1: REFUSED
> dns1.lan
Server: 192.168.1.254
Address: 192.168.1.254#53
** server can't find dns1.lan: NXDOMAIN
> .lan
nslookup: '.lan' is not a legal name (empty label)
----------------------------------------------------------------------------------
/etc/hosts only has 127.0.0.1 localhost
/etc/resolv.conf only has server 192.168.1.254
----------------------------------------------------------------------------------
sort of works?
[root@dns1 pdns]# ping dns1.lan
PING dns1.lan(dns1.lan (fe80::4637:e6ff:fec4:a391%eno1)) 56 data bytes
64 bytes from dns1.lan (fe80::4637:e6ff:fec4:a391%eno1): icmp_seq=1
ttl=64 time=0.043 ms
64 bytes from dns1.lan (fe80::4637:e6ff:fec4:a391%eno1): icmp_seq=2
ttl=64 time=0.049 ms
64 bytes from dns1.lan (fe80::4637:e6ff:fec4:a391%eno1): icmp_seq=3
ttl=64 time=0.061 ms
-----------------------------------------------------------------
etc/pdns/pdns.conf
launch=gmysql
gmysql-host=localhost
gmysql-user=pdns
gmysql-password=XXXXX
gmysql-dbname=powerdns
master=yes
---------------------------------------------
firewall-cmd --add-service=dns --permanent
firewall-cmd --reload
-----------------------------------------------------------------
Anything else I can post that would help?
---------------------------------------------------------------
Thanks,
Steve