ralph strebbing
2021-Jan-29 20:08 UTC
[Samba] Dynamic Updates to Bind DLZ through DHCP have repeated errors in syslog
On Fri, Jan 29, 2021 at 2:22 PM Rowland penny via samba <samba at lists.samba.org> wrote:> > Have you created the reversezone(s) in AD ? >Only if I'm manually creating the DNS Entry (e.g pbx.domain.com pointing to an IP of another static device pbx1). Aside from that, I thought that the script was creating them on the 'add' function. Ralph
ralph strebbing
2021-Jan-29 20:16 UTC
[Samba] Dynamic Updates to Bind DLZ through DHCP have repeated errors in syslog
On Fri, Jan 29, 2021 at 3:08 PM ralph strebbing <blackbirdralph at gmail.com> wrote:> > On Fri, Jan 29, 2021 at 2:22 PM Rowland penny via samba > <samba at lists.samba.org> wrote: > > > > > Have you created the reversezone(s) in AD ? > > > Only if I'm manually creating the DNS Entry (e.g pbx.domain.com > pointing to an IP of another static device pbx1). Aside from that, I > thought that the script was creating them on the 'add' function. >Wait. I think I may have found the problem. Do I need to modify the script to include each of our subnets in use? e.g we use 10.0.0.0/16, 192.168.x, .y, .z,etc. due to existing subnets from other locations we've acquired, whereas your example on the wiki is only using 192.168.0.0/24. Snippet from the script that I would need to modify for our use case: case "$numwords" in 1) # single ip rev zone '192' ZoneIP=$(echo "${IP}" | awk -F '.' '{print $1}') RZIP=$(echo "${rzoneip}" | awk -F '.' '{print $3}') IP2add=$(echo "${IP}" | awk -F '.' '{print $4"."$3"."$2}') ;; 2) # double ip rev zone '168.192' ZoneIP=$(echo "${IP}" | awk -F '.' '{print $1"."$2}') RZIP=$(echo "${rzoneip}" | awk -F '.' '{print $2"."$1}') IP2add=$(echo "${IP}" | awk -F '.' '{print $4"."$3}') ;; 3) # triple ip rev zone '0.168.192' ZoneIP=$(echo "${IP}" | awk -F '.' '{print $1"."$2"."$3}') RZIP=$(echo "${rzoneip}" | awk -F '.' '{print $3"."$2"."$1}') IP2add=$(echo "${IP}" | awk -F '.' '{print $4}') ;; *) # should never happen exit 1 ;; esac Thanks, Ralph
Rowland penny
2021-Jan-29 20:18 UTC
[Samba] Dynamic Updates to Bind DLZ through DHCP have repeated errors in syslog
On 29/01/2021 20:08, ralph strebbing wrote:> On Fri, Jan 29, 2021 at 2:22 PM Rowland penny via samba > <samba at lists.samba.org> wrote: > >> Have you created the reversezone(s) in AD ? >> > Only if I'm manually creating the DNS Entry (e.g pbx.domain.com > pointing to an IP of another static device pbx1). Aside from that, I > thought that the script was creating them on the 'add' function. > > RalphNo, the script doesn't create any reverse zones , it checks if any exist: ??????? # get existing reverse zones (if any) ??????? ReverseZones=$(samba-tool dns zonelist "${Server}" --reverse | grep 'pszZoneName' | awk '{print $NF}') ??????? if [ -z "$ReverseZones" ]; then ??????????? echo "No reverse zone found, not updating" ??????????? result3='0' ??????????? result4='0' Samba AD doesn't have any reverse zones by default, you have to create them. Rowland
Rowland penny
2021-Feb-05 16:48 UTC
[Samba] Dynamic Updates to Bind DLZ through DHCP have repeated errors in syslog
On 29/01/2021 20:18, Rowland penny via samba wrote:> On 29/01/2021 20:08, ralph strebbing wrote: >> On Fri, Jan 29, 2021 at 2:22 PM Rowland penny via samba >> <samba at lists.samba.org> wrote: >> >>> Have you created the reversezone(s) in AD ? >>>OK, after discussing this problem offlist with the OP, a few bugs were identified in the dhcp bash update script found here: https://wiki.samba.org/index.php/Configure_DHCP_to_update_DNS_records_with_BIND9 After a few updates to the script, hopefully the bugs have now been fixed, the OP has confirmed that it now works for him. The bugs were only evident if you used multiple reversezones. I have updated the script on the wikipage and would suggest that anyone using the script updates as soon as possible. Rowland