[Samba] samba-tool PTR with /16 network

Rowland penny rpenny at samba.org
Wed Aug 7 08:52:15 UTC 2019


On 07/08/2019 09:27, L.P.H. van Belle via samba wrote:
> Hai,
>
> Ok, i did a few things on my DC and see the how/what here.
>
> First, the zone.
> samba-tool dns zonecreate rtd-dc1 19.172.in-addr.arpa
> That worked fine, in windows DNS tool that shows correct.
>
> Now i added an PTR with this line.
> samba-tool dns add dc1 19.172.in-addr.arpa 55.0 PTR testhost.internal.domain.tld
>
> This resulted in a subfolder "0" the 19.172.in-addr.arpa zone.
> Where the ip resulted in 172.19.0.0.55 Trying to delete this from this zone, that did not work, but wait.
> After a few minutes, i was wondery why/what the ... ..
> I was stunned by it, i refreshed the zone. And hee.. What happend.. Now it looks correct.
> The "extra" 0 folder in the arpa zone is gone
> And the ip what i wanted is in. 172.19.0.55 with the corrected hosts assigned to it.
>
> So i added also in the other range..
> samba-tool dns add dc1 19.172.in-addr.arpa 55.1 PTR testhost2.internal.domain.tld
>
> And that resulted nicely in the correct ip 172.19.1.55
>
> So per example
> samba-tool dns zonecreate rtd-dc1 0.19.172.in-addr.arpa	for a /24 zone
> samba-tool dns zonecreate rtd-dc1 19.172.in-addr.arpa		for a /16 zone
> samba-tool dns zonecreate rtd-dc1 172.in-addr.arpa		for a /8 zone
>
> Adding the ptr records.
>                     (*1)     (*2) 	             (*3)     (*4)
> samba-tool dns add dc1.fqdn 1.19.172.in-addr.arpa 55 PTR testhost2.internal.domain.tld  (/24 )
> samba-tool dns add dc1.fqdn 19.172.in-addr.arpa 55.1 PTR testhost2.internal.domain.tld  (/16 )
> samba-tool dns add dc1.fqdn 172.in-addr.arpa 55.1.19 PTR testhost2.internal.domain.tld  (/8 )
> 1) the hostname or fully qualified hostname.  Adviced is to use the FQDN hostname.
> 2) the reverse zone.
> 3) the reverse ip.  Here you write the ip from right to left. 172.19.1.55 in reverse zone is 55.1.19.172
> 4) the hostname where the ip is pointing to.
>
> @Rowland, maybe we should add an example as shown here on the wiki.
>
Yes, but not with '172.19' ;-)

I get the same results, but there is a problem, the OPs ipaddress is for 
an internet domain:

host -t PTR 172.9.0.11
11.0.9.172.in-addr.arpa domain name pointer 
172-9-0-11.lightspeed.snantx.sbcglobal.net.
  I do hope that the OPs 'domain.lan' is 'snantx.sbcglobal.net' or he is 
using someone else's IP range, but then again, I hope it isn't, because 
if it is, his DC is internet resolvable.

Rowland





More information about the samba mailing list