Most specific match on PTR records

Mark Andrews marka at isc.org
Thu Feb 21 23:49:22 UTC 2013


In message <CANYsE-zYQh7Jv4QoVM45q-w1Vz1=YBk7j=K=OoQ01UGYvw_yLw at mail.gmail.com>, Nikita Koshiko
v writes:
> Hello list,
> 
> 
> I'm trying to "cut" /24 network from the scope of /8 network, here is
> example:
> 
>         zone "11.2.10.in-addr.arpa" {
>                 type forward;
>                 forwarders { 192.168.1.23; 192.168.1.24; };
>         };
> 
>         zone "10.in-addr.arpa" {
>                 type master;
>                 file "master/int/10.in-addr.arpa";
>         };
> 
> 10.in-addr.arpa is just a file that returns NXDOMAIN for any 10.0.0.0/8 ip
> address. But I need to forward requests for 10.2.11.0/24 net to other dns
> servers and the above config not working.
> I got empty responses for 10.2.11.0/24 net.

When I see questions like this I ask "Why are you doing this the
most complicated way?"  Just add a delegation for 11.2.10.in-addr.arpa
to 10.in-addr.arpa.  If you are using global forwarders turn them
off.

	zone "10.in-addr.arpa" {
		type master;
		file "master/int/10.in-addr.arpa";
		forwarders { /* empty */ };
	};

	11.2	NS  <nameserver1>.
	11.2	NS  <nameserver2>.

> This is right: (192.168.1.8 - server with bind)
> 
> $ host -t ptr 10.1.1.1 192.168.1.8
> Using domain server:
> Name: 192.168.1.8
> Address: 192.168.1.8#53
> Aliases:
> Host 1.1.1.10.in-addr.arpa. not found: 3(NXDOMAIN)
> 
> This is wrong:
> $ host -t ptr 10.2.11.10  192.168.1.8
> Using domain server:
> Name: 192.168.1.8
> Address: 192.168.1.8#53
> Aliases:
> Host 10.11.2.10.in-addr.arpa. not found: 3(NXDOMAIN)
> 
> This is expected answer from the forwarded server  - 192.168.1.23
> $ host -t ptr 10.2.11.10  192.168.1.23
> Using domain server:
> Name: 192.168.1.23
> Address: 192.168.1.23#53
> Aliases:
> 10.11.2.10.in-addr.arpa domain name pointer hawk-agent.local.intranet.
> 
> Can someone help with this ?
> 
-- 
Mark Andrews, ISC
1 Seymour St., Dundas Valley, NSW 2117, Australia
PHONE: +61 2 9871 4742                 INTERNET: marka at isc.org



More information about the bind-users mailing list