DHCP and DNS on different machines, can't make it work

Issues related to configuring your network
usr456
Posts: 9
Joined: 2021/12/18 21:43:52

DHCP and DNS on different machines, can't make it work

Post by usr456 » 2021/12/18 23:20:37

edit: ugh guys, i give up i don't understand Linux enough to do this :/ thanks again.
edit2: Ok, i figured it out. Issue was: i couldn't ping from my servers the desktop clients via DHCP. I just tried to run before i could walk *facepalm*... Basically i just read what i could possibly read about how DyDNS works with DHCP, the basics anyway. Let's see if it actually updates my files.

*removed the codes as it was just utter horsesh*t, lol, too embarassed to leave it, sry...*
Last edited by usr456 on 2021/12/22 20:40:44, edited 3 times in total.

Whoever
Posts: 1361
Joined: 2013/09/06 03:12:10

Re: DHCP and DNS on different machines, can't make it work

Post by Whoever » 2021/12/19 04:45:54

A couple of notes:

bind doesn't update the db file until something triggers it -- it uses a journal file. Simply adding a host won't cause it to update the "db" file. Run the following command on the server that runs bind:

Code: Select all

dig @localhost testing.local axfr
Check your logs. search for "dhcpd" on the dhcp server in /var/log/messages and "named" on the in the same file name on the bind server.

I believe that this is wrong, but I don't think it should affect forward name addition and resolution:

Code: Select all

@	IN	NS	DNS.
You need to fully qualify "DNS".

I don't know what the "zone" statements are doing in your dhcpd.conf. Your subnet command needs to have something like:

Code: Select all

ddns-domainname "testing.local";

usr456
Posts: 9
Joined: 2021/12/18 21:43:52

Re: DHCP and DNS on different machines, can't make it work

Post by usr456 » 2021/12/19 09:53:43

Hi!
Yes i'm aware of that, it updates fine when i install DNS and DHCP on the same Ubuntu machine just by pinging everything...
Anyway, when i do " dig @localhost testing.local asfr ", i get this:

Code: Select all

; <<>> DiG 9.9.5-3ubuntu0.19-Ubuntu <<>> @localhost testing.local axfr
; (1 server found)
;; global options: +cmd
testing.local.		604800	IN	SOA	DNS.testing.local. root.testing.local. 24032026 120 86400 2419200 86400
testing.local.		604800	IN	NS	DNS.testing.local.
DHCP.testing.local.	604800	IN	A	172.16.16.252
DNS.testing.local.		604800	IN	A	172.16.16.251
ftp.testing.local.		604800	IN	A	172.16.16.253
intra.testing.local.	604800	IN	A	172.16.16.253
Routeur.testing.local.	604800	IN	A	172.16.16.254
webftp.testing.local.	604800	IN	A	172.16.16.253
testing.local.		604800	IN	SOA	DNS.testing.local. root.testing.local. 24032026 120 86400 2419200 86400
;; Query time: 0 msec
;; SERVER: 127.0.0.1#53(127.0.0.1)
;; WHEN: Sun Dec 19 10:00:30 CET 2021
;; XFR size: 9 records (messages 1, bytes 249)
Here are the logs for "dhcpd":

Code: Select all

Dec 18 22:41:32 dhcp dhcpd: Internet Systems Consortium DHCP Server 4.2.5
Dec 18 23:13:15 dhcp dhcpd: Internet Systems Consortium DHCP Server 4.2.5
Dec 18 23:13:15 dhcp dhcpd: Copyright 2004-2013 Internet Systems Consortium.
Dec 18 23:13:15 dhcp dhcpd: All rights reserved.
Dec 18 23:13:15 dhcp dhcpd: For info, please visit https://www.isc.org/software/dhcp/
Dec 18 23:13:15 dhcp dhcpd: Warning: subnet 172.16.16.0/24 overlaps subnet 172.16.16.0/24
Dec 18 23:13:15 dhcp dhcpd: Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file
Dec 18 23:13:15 dhcp dhcpd: Internet Systems Consortium DHCP Server 4.2.5
Dec 18 23:13:15 dhcp dhcpd: Copyright 2004-2013 Internet Systems Consortium.
Dec 18 23:13:15 dhcp dhcpd: All rights reserved.
Dec 18 23:13:15 dhcp dhcpd: For info, please visit https://www.isc.org/software/dhcp/
Dec 18 23:13:15 dhcp dhcpd: Wrote 8 leases to leases file.
Dec 18 23:13:15 dhcp dhcpd: Listening on LPF/ens33/00:0c:29:7c:2e:8e/172.16.16.0/24
Dec 18 23:13:15 dhcp dhcpd: Sending on   LPF/ens33/00:0c:29:7c:2e:8e/172.16.16.0/24
Dec 18 23:13:15 dhcp dhcpd: Sending on   Socket/fallback/fallback-net
Dec 18 23:47:27 dhcp dhcpd: DHCPREQUEST for 192.168.1.105 from 00:0c:29:62:32:2e via ens33: wrong network.
Dec 18 23:47:27 dhcp dhcpd: DHCPNAK on 192.168.1.105 to 00:0c:29:62:32:2e via ens33
Dec 18 23:47:27 dhcp dhcpd: DHCPDISCOVER from 00:0c:29:62:32:2e (CLmint) via ens33
Dec 18 23:47:28 dhcp dhcpd: DHCPOFFER on 172.16.16.30 to 00:0c:29:62:32:2e (CLmint) via ens33
Dec 18 23:47:28 dhcp dhcpd: DHCPREQUEST for 172.16.16.30 (172.16.16.252) from 00:0c:29:62:32:2e (CLmint) via ens33
Dec 18 23:47:28 dhcp dhcpd: DHCPACK on 172.16.16.30 to 00:0c:29:62:32:2e (CLmint) via ens33
Dec 18 23:47:28 dhcp dhcpd: Unable to add forward map from CLmint.testing.local to 172.16.16.30: tsig indicates error
Dec 18 23:47:34 dhcp dhcpd: DHCPREQUEST for 172.16.16.30 from 00:0c:29:62:32:2e (CLmint) via ens33
Dec 18 23:47:34 dhcp dhcpd: DHCPACK on 172.16.16.30 to 00:0c:29:62:32:2e (CLmint) via ens33
Dec 18 23:47:34 dhcp dhcpd: Unable to add forward map from CLmint.testing.local to 172.16.16.30: tsig indicates error
Dec 18 23:51:45 dhcp dhcpd: DHCPREQUEST for 172.16.16.30 from 00:0c:29:62:32:2e (CLmint) via ens33
Dec 18 23:51:45 dhcp dhcpd: DHCPACK on 172.16.16.30 to 00:0c:29:62:32:2e (CLmint) via ens33
Dec 18 23:51:45 dhcp dhcpd: Unable to add forward map from CLmint.testing.local to 172.16.16.30: tsig indicates error
Dec 19 09:41:24 dhcp nm-dispatcher: find-scripts: Cannot execute '/etc/NetworkManager/dispatcher.d/12-dhcpd': not executable by owner.
Dec 19 09:41:24 dhcp nm-dispatcher: find-scripts: Cannot execute '/etc/NetworkManager/dispatcher.d/12-dhcpd': not executable by owner.
Dec 19 09:41:25 dhcp nm-dispatcher: find-scripts: Cannot execute '/etc/NetworkManager/dispatcher.d/12-dhcpd': not executable by owner.
Dec 19 09:41:25 dhcp nm-dispatcher: find-scripts: Cannot execute '/etc/NetworkManager/dispatcher.d/12-dhcpd': not executable by owner.
Dec 19 09:41:26 dhcp dhcpd: Internet Systems Consortium DHCP Server 4.2.5
Dec 19 09:41:26 dhcp dhcpd: Copyright 2004-2013 Internet Systems Consortium.
Dec 19 09:41:26 dhcp dhcpd: All rights reserved.
Dec 19 09:41:26 dhcp dhcpd: For info, please visit https://www.isc.org/software/dhcp/
Dec 19 09:41:26 dhcp dhcpd: Warning: subnet 172.16.16.0/24 overlaps subnet 172.16.16.0/24
Dec 19 09:41:26 dhcp dhcpd: Not searching LDAP since ldap-server, ldap-port and ldap-base-dn were not specified in the config file
Dec 19 09:41:26 dhcp dhcpd: Internet Systems Consortium DHCP Server 4.2.5
Dec 19 09:41:26 dhcp dhcpd: Copyright 2004-2013 Internet Systems Consortium.
Dec 19 09:41:26 dhcp dhcpd: All rights reserved.
Dec 19 09:41:26 dhcp dhcpd: For info, please visit https://www.isc.org/software/dhcp/
Dec 19 09:41:26 dhcp dhcpd: Wrote 8 leases to leases file.
Dec 19 09:41:26 dhcp dhcpd: Listening on LPF/ens33/00:0c:29:7c:2e:8e/172.16.16.0/24
Dec 19 09:41:26 dhcp dhcpd: Sending on   LPF/ens33/00:0c:29:7c:2e:8e/172.16.16.0/24
Dec 19 09:41:26 dhcp dhcpd: Sending on   Socket/fallback/fallback-net
Dec 19 09:41:45 dhcp dhcpd: DHCPREQUEST for 172.16.16.30 from 00:0c:29:62:32:2e (CLmint) via ens33
Dec 19 09:41:45 dhcp dhcpd: DHCPACK on 172.16.16.30 to 00:0c:29:62:32:2e (CLmint) via ens33
Dec 19 09:41:45 dhcp dhcpd: Unable to add forward map from CLmint.testing.local to 172.16.16.30: tsig indicates error
It's the same since December 13th...

and last 200 lines for "named":

Code: Select all

Dec 19 10:59:30 dns named[2019]: error (network unreachable) resolving 'net/DNSKEY/IN': 2001:500:d937::30#53
Dec 19 10:59:30 dns named[2019]: error (network unreachable) resolving 'net/DNSKEY/IN': 2001:501:b1f9::30#53
Dec 19 10:59:30 dns named[2019]: error (network unreachable) resolving 'net/DNSKEY/IN': 2001:502:7094::30#53
Dec 19 10:59:30 dns named[2019]: error (network unreachable) resolving 'net/DNSKEY/IN': 2001:503:eea3::30#53
Dec 19 10:59:30 dns named[2019]: error (network unreachable) resolving 'net/DNSKEY/IN': 2001:503:d2d::30#53
Dec 19 10:59:30 dns named[2019]: error (network unreachable) resolving 'tm2.edgedns-tm.info/A/IN': 2620:1ec:bda::4#53
Dec 19 10:59:30 dns named[2019]: error (network unreachable) resolving 'ns2-36.azure-dns.net/A/IN': 2620:1ec:8ec::1#53
Dec 19 10:59:30 dns named[2019]: error (network unreachable) resolving 'ns2-36.azure-dns.net/AAAA/IN': 2620:1ec:8ec::1#53
Dec 19 10:59:30 dns named[2019]: error (network unreachable) resolving 'tm2.edgedns-tm.info/A/IN': 2620:1ec:8ec::4#53
Dec 19 10:59:30 dns named[2019]: error (network unreachable) resolving 'ns2-36.azure-dns.net/A/IN': 2620:1ec:8ec::2#53
Dec 19 10:59:30 dns named[2019]: error (network unreachable) resolving 'ns2-36.azure-dns.net/AAAA/IN': 2620:1ec:8ec::2#53
Dec 19 10:59:30 dns named[2019]: error (network unreachable) resolving 'tm2.edgedns-tm.info/A/IN': 2620:1ec:bda:10::24#53
Dec 19 10:59:30 dns named[2019]: error (network unreachable) resolving 'ns2-36.azure-dns.net/A/IN': 2620:1ec:8ec::4#53
Dec 19 10:59:30 dns named[2019]: error (network unreachable) resolving 'ns2-36.azure-dns.net/AAAA/IN': 2620:1ec:8ec::4#53
Dec 19 11:03:59 dns named[2019]: error (network unreachable) resolving 'e15275.g.akamaiedge.net/A/IN': 2001:503:39c1::30#53
Dec 19 11:07:12 dns kernel: [    3.698740] audit: type=1400 audit(1639908432.524:8): apparmor="STATUS" operation="profile_load" profile="unconfined" name="/usr/sbin/named" pid=1011 comm="apparmor_parser"
Dec 19 11:07:12 dns named[1115]: starting BIND 9.9.5-3ubuntu0.19-Ubuntu -u bind
Dec 19 11:07:12 dns named[1115]: built with '--prefix=/usr' '--mandir=/usr/share/man' '--infodir=/usr/share/info' '--sysconfdir=/etc/bind' '--localstatedir=/var' '--enable-threads' '--enable-largefile' '--with-libtool' '--enable-shared' '--enable-static' '--with-openssl=/usr' '--with-gssapi=/usr' '--with-gnu-ld' '--with-geoip=/usr' '--with-atf=no' '--enable-ipv6' '--enable-rrl' '--enable-filter-aaaa' 'CFLAGS=-fno-strict-aliasing -DDIG_SIGCHASE -O2'
Dec 19 11:07:12 dns named[1115]: ----------------------------------------------------
Dec 19 11:07:12 dns named[1115]: BIND 9 is maintained by Internet Systems Consortium,
Dec 19 11:07:12 dns named[1115]: Inc. (ISC), a non-profit 501(c)(3) public-benefit 
Dec 19 11:07:12 dns named[1115]: corporation.  Support and training for BIND 9 are 
Dec 19 11:07:12 dns named[1115]: available at https://www.isc.org/support
Dec 19 11:07:12 dns named[1115]: ----------------------------------------------------
Dec 19 11:07:12 dns named[1115]: adjusted limit on open files from 4096 to 1048576
Dec 19 11:07:12 dns named[1115]: found 2 CPUs, using 2 worker threads
Dec 19 11:07:12 dns named[1115]: using 2 UDP listeners per interface
Dec 19 11:07:12 dns named[1115]: using up to 4096 sockets
Dec 19 11:07:12 dns named[1115]: loading configuration from '/etc/bind/named.conf'
Dec 19 11:07:12 dns named[1115]: reading built-in trusted keys from file '/etc/bind/bind.keys'
Dec 19 11:07:12 dns named[1115]: using default UDP/IPv4 port range: [1024, 65535]
Dec 19 11:07:12 dns named[1115]: using default UDP/IPv6 port range: [1024, 65535]
Dec 19 11:07:12 dns named[1115]: listening on IPv6 interfaces, port 53
Dec 19 11:07:12 dns named[1115]: listening on IPv4 interface lo, 127.0.0.1#53
Dec 19 11:07:12 dns named[1115]: listening on IPv4 interface eth0, 172.16.16.251#53
Dec 19 11:07:12 dns named[1115]: generating session key for dynamic DNS
Dec 19 11:07:12 dns named[1115]: sizing zone task pool based on 7 zones
Dec 19 11:07:12 dns named[1115]: using built-in root key for view _default
Dec 19 11:07:12 dns named[1115]: set up managed keys zone for view _default, file 'managed-keys.bind'
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 10.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 16.172.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 17.172.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 18.172.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 19.172.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 20.172.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 21.172.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 22.172.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 23.172.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 24.172.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 25.172.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 26.172.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 27.172.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 28.172.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 29.172.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 30.172.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 31.172.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 168.192.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 64.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 65.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 66.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 67.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 68.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 69.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 70.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 71.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 72.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 73.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 74.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 75.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 76.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 77.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 78.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 79.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 80.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 81.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 82.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 83.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 84.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 85.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 86.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 87.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 88.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 89.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 90.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 91.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 92.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 93.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 94.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 95.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 96.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 97.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 98.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 99.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 100.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 101.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 102.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 103.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 104.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 105.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 106.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 107.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 108.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 109.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 110.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 111.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 112.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 113.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 114.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 115.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 116.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 117.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 118.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 119.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 120.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 121.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 122.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 123.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 124.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 125.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 126.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 127.100.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 254.169.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 2.0.192.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 100.51.198.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 113.0.203.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 255.255.255.255.IN-ADDR.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 1.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.0.IP6.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: D.F.IP6.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 8.E.F.IP6.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 9.E.F.IP6.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: A.E.F.IP6.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: B.E.F.IP6.ARPA
Dec 19 11:07:12 dns named[1115]: automatic empty zone: 8.B.D.0.1.0.0.2.IP6.ARPA
Dec 19 11:07:12 dns named[1115]: command channel listening on 127.0.0.1#953
Dec 19 11:07:12 dns named[1115]: command channel listening on ::1#953
Dec 19 11:07:12 dns named[1115]: managed-keys-zone: loaded serial 4
Dec 19 11:07:12 dns named[1115]: zone 0.in-addr.arpa/IN: loaded serial 1
Dec 19 11:07:12 dns named[1115]: zone 127.in-addr.arpa/IN: loaded serial 1
Dec 19 11:07:12 dns named[1115]: zone 255.in-addr.arpa/IN: loaded serial 1
Dec 19 11:07:12 dns named[1115]: zone localhost/IN: loaded serial 2
Dec 19 11:07:12 dns named[1115]: zone 16.16.172.in-addr.arpa/IN: loaded serial 24032021
Dec 19 11:07:12 dns named[1115]: zone testing.local/IN: loaded serial 24032026
Dec 19 11:07:12 dns named[1115]: all zones loaded
Dec 19 11:07:12 dns named[1115]: running
Dec 19 11:08:06 dns named[1115]: client 127.0.0.1#49194 (testing.local): transfer of 'testing.local/IN': AXFR started
Dec 19 11:08:06 dns named[1115]: client 127.0.0.1#49194 (testing.local): transfer of 'testing.local/IN': AXFR ended
Dec 19 11:08:25 dns named[1115]: error (network unreachable) resolving 'connectivity-check.ubuntu.com/A/IN': 2001:503:c27::2:30#53
Dec 19 11:08:25 dns named[1115]: error (network unreachable) resolving './NS/IN': 2001:503:c27::2:30#53
Dec 19 11:08:25 dns named[1115]: error (network unreachable) resolving 'connectivity-check.ubuntu.com/A/IN': 2001:dc3::35#53
Dec 19 11:08:25 dns named[1115]: error (network unreachable) resolving './NS/IN': 2001:dc3::35#53
Dec 19 11:08:25 dns named[1115]: error (network unreachable) resolving 'connectivity-check.ubuntu.com/A/IN': 2001:7fe::53#53
Dec 19 11:08:25 dns named[1115]: error (network unreachable) resolving './NS/IN': 2001:7fe::53#53
Dec 19 11:08:25 dns named[1115]: error (network unreachable) resolving 'connectivity-check.ubuntu.com/A/IN': 2001:500:1::803f:235#53
Dec 19 11:08:25 dns named[1115]: error (network unreachable) resolving './NS/IN': 2001:500:1::803f:235#53
Dec 19 11:08:25 dns named[1115]: error (network unreachable) resolving 'ubuntu.com/DS/IN': 2001:503:d2d::30#53
Dec 19 11:08:56 dns named[1115]: error (network unreachable) resolving 'nav.smartscreen.microsoft.com/A/IN': 2603:1061::cd#53
Dec 19 11:08:56 dns named[1115]: error (network unreachable) resolving 'ns2-205.azure-dns.net/A/IN': 2001:503:a83e::2:30#53
Dec 19 11:08:56 dns named[1115]: error (network unreachable) resolving 'ns2-205.azure-dns.net/A/IN': 2001:503:83eb::30#53
Dec 19 11:08:56 dns named[1115]: error (network unreachable) resolving 'ns2-205.azure-dns.net/A/IN': 2001:503:231d::2:30#53
Dec 19 11:08:56 dns named[1115]: error (network unreachable) resolving 'ns2-205.azure-dns.net/A/IN': 2001:502:8cc::30#53
Dec 19 11:08:56 dns named[1115]: error (network unreachable) resolving 'ns2-205.azure-dns.net/A/IN': 2001:501:b1f9::30#53
Dec 19 11:08:56 dns named[1115]: error (network unreachable) resolving 'ns3-205.azure-dns.org/AAAA/IN': 2001:500:e::1#53
Dec 19 11:08:56 dns named[1115]: error (network unreachable) resolving 'ns3-205.azure-dns.org/A/IN': 2001:500:e::1#53
Dec 19 11:08:56 dns named[1115]: error (network unreachable) resolving 'ns3-205.azure-dns.org/AAAA/IN': 2001:500:40::1#53
Dec 19 11:08:56 dns named[1115]: error (network unreachable) resolving 'ns3-205.azure-dns.org/A/IN': 2001:500:40::1#53
Dec 19 11:08:56 dns named[1115]: error (network unreachable) resolving 'wd-prod-ss.trafficmanager.net/A/IN': 2001:502:1ca1::30#53
Dec 19 11:08:57 dns named[1115]: error (network unreachable) resolving 'ns2-09.azure-dns.net/A/IN': 2620:1ec:8ec::4#53
Dec 19 11:08:57 dns named[1115]: error (network unreachable) resolving 'ns2-34.azure-dns.net/A/IN': 2620:1ec:8ec::3#53
Dec 19 11:08:57 dns named[1115]: error (network unreachable) resolving 'ns2-34.azure-dns.net/AAAA/IN': 2620:1ec:8ec::3#53
Dec 19 11:08:57 dns named[1115]: error (network unreachable) resolving 'ns2-09.azure-dns.net/AAAA/IN': 2620:1ec:8ec::4#53
Dec 19 11:08:57 dns named[1115]: error (network unreachable) resolving 'ns2-09.azure-dns.net/A/IN': 2620:1ec:8ec::3#53
Dec 19 11:08:57 dns named[1115]: error (network unreachable) resolving 'ns2-09.azure-dns.net/AAAA/IN': 2620:1ec:8ec::3#53
Dec 19 11:08:57 dns named[1115]: error (network unreachable) resolving 'trafficmanager.net/DS/IN': 2001:7fd::1#53
Dec 19 11:08:57 dns named[1115]: error (network unreachable) resolving 'trafficmanager.net/DS/IN': 2001:503:d414::30#53
Dec 19 11:08:57 dns named[1115]: error (network unreachable) resolving 'ns4-205.azure-dns.info/AAAA/IN': 2620:1ec:bda::3#53
Dec 19 11:08:57 dns named[1115]: error (network unreachable) resolving 'ns4-205.azure-dns.info/AAAA/IN': 2620:1ec:bda::2#53
Dec 19 11:08:57 dns named[1115]: error (network unreachable) resolving 'ns4-205.azure-dns.info/AAAA/IN': 2620:1ec:bda::1#53
Dec 19 11:08:57 dns named[1115]: error (network unreachable) resolving 'ns4-205.azure-dns.info/AAAA/IN': 2620:1ec:bda::4#53
Dec 19 11:08:57 dns named[1115]: error (network unreachable) resolving 'ns1-201.azure-dns.com/A/IN': 2001:500:d937::30#53
Dec 19 11:08:57 dns named[1115]: error (network unreachable) resolving 'ns1-201.azure-dns.com/AAAA/IN': 2001:500:d937::30#53
Dec 19 11:08:57 dns named[1115]: error (network unreachable) resolving 'tm2.edgedns-tm.info/A/IN': 2a01:111:4000::4#53
Dec 19 11:08:57 dns named[1115]: error (network unreachable) resolving 'ns1-04.azure-dns.com/A/IN': 2001:503:eea3::30#53
Dec 19 11:08:57 dns named[1115]: error (network unreachable) resolving 'ns1-04.azure-dns.com/AAAA/IN': 2001:503:eea3::30#53
Dec 19 11:08:57 dns named[1115]: error (network unreachable) resolving 'ns1-36.azure-dns.com/A/IN': 2001:503:39c1::30#53
Dec 19 11:08:57 dns named[1115]: error (network unreachable) resolving 'ns1-36.azure-dns.com/AAAA/IN': 2001:503:39c1::30#53
Dec 19 11:08:57 dns named[1115]: error (network unreachable) resolving 'ns1-201.azure-dns.com/A/IN': 2001:503:eea3::30#53
Dec 19 11:08:57 dns named[1115]: error (network unreachable) resolving 'ns1-201.azure-dns.com/AAAA/IN': 2001:503:eea3::30#53
Dec 19 11:08:57 dns named[1115]: error (network unreachable) resolving 'ns1-04.azure-dns.com/A/IN': 2001:503:39c1::30#53
Dec 19 11:08:57 dns named[1115]: error (network unreachable) resolving 'ns1-04.azure-dns.com/AAAA/IN': 2001:503:39c1::30#53
Dec 19 11:08:57 dns named[1115]: error (network unreachable) resolving 'ns1-201.azure-dns.com/A/IN': 2001:503:39c1::30#53
Dec 19 11:08:57 dns named[1115]: error (network unreachable) resolving 'ns1-201.azure-dns.com/AAAA/IN': 2001:503:39c1::30#53
Dec 19 11:08:57 dns named[1115]: error (network unreachable) resolving 'ns1-201.azure-dns.com/A/IN': 2603:1061::2#53
Dec 19 11:08:57 dns named[1115]: error (network unreachable) resolving 'ns1-201.azure-dns.com/AAAA/IN': 2603:1061::2#53
Dec 19 11:08:57 dns named[1115]: error (network unreachable) resolving 'ns1-201.azure-dns.com/A/IN': 2603:1061::4#53
Dec 19 11:08:57 dns named[1115]: error (network unreachable) resolving 'ns1-201.azure-dns.com/AAAA/IN': 2603:1061::4#53
Dec 19 11:08:57 dns named[1115]: error (network unreachable) resolving 'wd-prod-ss-eu-north-2-fe.northeurope.cloudapp.azure.com/A/IN': 2620:1ec:8ec::c9#53
Dec 19 11:08:57 dns named[1115]: error (network unreachable) resolving 'azure.com/DS/IN': 2001:500:3::42#53
Dec 19 11:08:57 dns named[1115]: error (network unreachable) resolving 'azure.com/DS/IN': 2001:500:856e::30#53
Dec 19 11:08:57 dns named[1115]: error (network unreachable) resolving 'azure.com/DS/IN': 2001:502:7094::30#53

I didn't put the FQDN because the checkzone returns me a "has no address records (A or AAAA)". So, i've seen someone do it this way in some forum, so i gave it a try...
But when i check like this:

Code: Select all

named-checkzone 16.16.172.in-addr.arpa rev.testing.local
It doesn't return any error, fqdn or not... I don't get it, lol.

and lastly, i've added these lines in dhcpd.conf

Code: Select all

# This is a very basic subnet declaration.
...
option domain-name-servers 172.16.16.251;
option domain-name "dns.testing.local.";
ddns-domainname "dns.testing.local.";
ddns-rev-domainname "in-addr.arpa.";
But no luck

As for the zone statements, i don't know what to tell you, my trainer told me to do it this way... They're still there though, should i remove them ?

edit: forgot the trailing dots... Shouldn't I also include this line ?

Code: Select all

include "/etc/bind/rndc.key"
But how to do it ? It's on a different server...I'm out of my depth...

User avatar
TrevorH
Site Admin
Posts: 33216
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: DHCP and DNS on different machines, can't make it work

Post by TrevorH » 2021/12/19 13:41:46

Have you checked to make sure that using nsupdate by itself works?
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Whoever
Posts: 1361
Joined: 2013/09/06 03:12:10

Re: DHCP and DNS on different machines, can't make it work

Post by Whoever » 2021/12/19 16:36:09

Code: Select all

Dec 18 23:47:28 dhcp dhcpd: Unable to add forward map from CLmint.testing.local to 172.16.16.30: tsig indicates error
This implies the rndc.key isn't the same on both machines, or, perhaps, the time is not correct on both machines.

As Trevor suggested, see if you can use nsupdate to update the DNS zone. First do this on the bind server, then, if this works, on the dhcp server.

usr456
Posts: 9
Joined: 2021/12/18 21:43:52

Re: DHCP and DNS on different machines, can't make it work

Post by usr456 » 2021/12/19 16:46:36

TrevorH wrote:
2021/12/19 13:41:46
Have you checked to make sure that using nsupdate by itself works?
Well no, because...i didn't even know what that command was before you mentionned it. Or how it works...

usr456
Posts: 9
Joined: 2021/12/18 21:43:52

Re: DHCP and DNS on different machines, can't make it work

Post by usr456 » 2021/12/19 16:50:03

Whoever wrote:
2021/12/19 16:36:09

Code: Select all

Dec 18 23:47:28 dhcp dhcpd: Unable to add forward map from CLmint.testing.local to 172.16.16.30: tsig indicates error
This implies the rndc.key isn't the same on both machines, or, perhaps, the time is not correct on both machines.

As Trevor suggested, see if you can use nsupdate to update the DNS zone. First do this on the bind server, then, if this works, on the dhcp server.
Ok, first i'm going to look up this command and how to use it. Thanks!

usr456
Posts: 9
Joined: 2021/12/18 21:43:52

Re: DHCP and DNS on different machines, can't make it work

Post by usr456 » 2021/12/19 18:44:15

Ugh guys, i give up i don't understand Linux enough to do this :/ thanks again!

You can delete the thread ;_; i'm done.

usr456
Posts: 9
Joined: 2021/12/18 21:43:52

Re: DHCP and DNS on different machines, can't make it work

Post by usr456 » 2021/12/20 18:09:17

OMG, i think i did it! YES!
I've just been configuring named.conf all wrong... Like, not configuring at ALL, lol!

I just put the named.conf.local back to default. I generated a new rndc.key and this time, properly put it in named.conf and carefully reconfigured dhcpd.conf.
I hadn't even put the "controls" statement to allow my DHCP server to edit the records...

Well i don't want to count my chickens yet, but if i can ping from any of my servers to the clients by their hostnames and vice-versa (i coudn't, which was my main issue to begin with), doesn't it mean i'm on the right track ?


I don't really understand the difference between named.conf and named.conf.local though...

User avatar
TrevorH
Site Admin
Posts: 33216
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: DHCP and DNS on different machines, can't make it work

Post by TrevorH » 2021/12/20 19:23:24

I'd suspect that named.conf has an 'include' line for the .local one. It's so you can keep the distro supplied config separate from your modifications. Check using e.g. host somename.your.domain and if it is working properly then you will get an answer and if it is not then you will not.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

Post Reply