bind9 enum hack

Stefan Certic stefan at
Wed Jun 22 19:54:54 UTC 2011


I am facing the following puzzle:

zone "" {
type forward;
forwarders { port 5200;};

zone "e164enum" {
type master;
file "/etc/bind/enum.conf";

while enum.conf has something like:

*. NAPTR 10 100 "u" "E2U+pstn:tel" "!^(.*)$!tel:
\\1\;spn=22003\;mcc=220\;mnc=03!" .
*. TXT "result:ok/mcc:220/mnc:03/imsi:local/msc:local"
(this is the problematic extract, there are much more lines).

What i am trying to achieve, is:

- Match everything that begins with and forward query to 
remote server.
- But if there is no forward zone defined, respond from enum.conf

The idea behind this is to keep all data of more then 50000 zones inside one 
file, but also use forwarders where needed.

if i do: dig NAPTR :

Bind always match query from e164enum zone, and never ask forwarder althrough is defined.

Any hints how to make bind match zones from left to right?

Thanks & Regards,

Stefan Certic

48 Charlotte Street
London, W1T 2NS
United Kingdom
GSMA Associate Member

Switchboard +44 (0) 870 231 7777 
Fax + 44 (0) 870 231 7775

Email  : stefan at
MSN ID : stefan at

This email contains information provided by Routo Telecommunications
Ltd, which may be privileged or confidential. It is meant only for the
individual(s) or entity named above. If you are not the intended
recipient, note that disclosing, copying, distributing or using this
information is prohibited. If you have received this email in error,
please let me know immediately on the email address above.

Routo Telecommunications Ltd may not be held responsible for the
content of this email as it may reflect the personal view of the
sender and not that of the company.

Internet communications cannot be guaranteed to be timely, secure,
error or virus-free. The sender does not accept liability for any
errors or omissions.

We monitor our email system and may record your emails.

Routo Telecommunications Ltd Registration Number 04546322 has its
principal place of business at 48 Charlotte Street, London, W1T 2NS,
United Kingdom.

More information about the bind-users mailing list