Bug 437569

Summary: Misconfigurations in named.conf configuration template
Product: [Fedora] Fedora Reporter: Adrian Offerman <aad>
Component: bindAssignee: Adam Tkac <atkac>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 7CC: ovasik
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-04-02 12:45:17 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
named.conf configuration template
none
improved sample none

Description Adrian Offerman 2008-03-14 22:10:13 UTC
Description of problem:
Misconfigurations in named.conf configuration template

Version-Release number of selected component (if applicable):
Seen with version 9.5.0 on Fedora 7 and 9.3.3 on CentOS 5.1 (so is probably in
other RH Linux versions as well).

How reproducible:

Steps to Reproduce:
1. create a named configuration based on the template named.conf in
/usr/share/doc/bind-9.x.x/sample/etc/named.conf
2. do a query from an outside IP address, e.g. dig @nameserver host.domain

Actual results:
query refused

Expected results:
answer

Additional info:
I think the "match-clients" and "match-destinations" were misunderstood when
creating this template. These are matched against the source and destination
address, respectively, of the query.

They now read:
view "localhost_resolver" {
  match-clients { localhost; };
  match-destinations { localhost; };
  ...
  }
view "internal" {
  match-clients { localnets; };
  match-destinations { localnets; };
  ...
  }
view "external" {
  match-clients { !localnets; !localhost; };
  match-destinations { !localnets; !localhost; };
  ...
  }

Causing a refusal from an external client since there will never be a match.

I think these statements should read (works for me to get this solved):
view "localhost_resolver" {
  match-clients { localhost; };
  match-destinations { localhost; };
  ...
  }
view "internal" {
  match-clients { localnets; };
  match-destinations { localhost; };
  ...
  }
view "external" {
  match-clients { !localnets; !localhost; any; };
  match-destinations { localhost; };
  ...
  }

Comment 1 Adrian Offerman 2008-03-14 22:10:13 UTC
Created attachment 298093 [details]
named.conf configuration template

Comment 2 Adam Tkac 2008-03-19 12:55:43 UTC
You're right, sample is not good. I'm going to attach improved one.

Comment 3 Adam Tkac 2008-03-19 13:04:49 UTC
Created attachment 298501 [details]
improved sample

Improved sample removed some unneded statements (query-port options and
match-destinations) and adds RFC 1912 zones to internal view. "external" view
can match any (look on
http://www.isc.org/sw/bind/arm93/Bv9ARM.ch06.html#view_statement_grammar)

Comment 4 Adam Tkac 2008-04-02 12:45:17 UTC
Improved template is commited into rawhide, will be avaliable in next build
(9.5.0-30.b2.fc9). I'm not going to release this as F7/F8/RHEL update.