1

Recently I've started a bind9 NS host for the internal network of my school, providing a "CLEAN" NS Server. I want to forward almost all traffic to NS provided by ISP, but forward a few other domains (like a.com b.com c.com) and ALL SUB-DOMAINS (*.a.com/*.b.com/*.c.com) to Google Public DNS(8.8.8.8).

Have tried many solutions, such as:

  1. Use forwarders in options (NS by ISP), and specify zone for the other domains (NOT WORK, all query goes to NS provided by ISP)
  2. Use zone "." and the other domain, "." forwarded to NS provided by ISP, other domains forwarded to Google Public DNS (NOT WORK, only a.com/b.com/c.com are forwarded to 8.8.8.8, the others goes to NS provided by ISP)
  3. Use master zone ".", and add NS 8.8.8.8 for a.com/b.com/c.com (NOT WORK, all domain are failed to response)

How can I solve it?

Here is my named.conf:

options {
    directory "E:\Named\etc";
    listen-on port 53 { 10.147.100.16; 127.0.0.1; };
    allow-query { 10.0.0.0/8; 127.0.0.1; };
    allow-transfer {"none";};
    avoid-v4-udp-ports { range 1 32767; };
    recursion yes;
};

zone "a.com." IN {
    type forward;
    forward only;
    forwarders { 8.8.8.8; 8.8.4.4; };
};

zone "b.com." IN {
    type forward;
    forward only;
    forwarders { 8.8.8.8; 8.8.4.4; };
};

zone "c.com." IN { 
    type forward;
    forward only;
    forwarders { 8.8.8.8; 8.8.4.4; };
};

zone "." IN {
    type forward;
    forwarders { 219.141.136.10; };
};
0

Have you tried removing "." from a/b/c.com zones?

  • that means all zone goes to NS provided by ISP :( not exactly I want – Yifu Yu Mar 16 '13 at 13:00
  • ehh sorry, that means all zone goes to Google Public DNS – Yifu Yu Mar 16 '13 at 13:17
  • try this serverfault.com/questions/99101/… – Kveri Mar 16 '13 at 15:42
  • Not work :( a.com replies from Google DNS, but www.a.com/ftp.a.com .. etc replies from NS provided by ISP – Yifu Yu Mar 16 '13 at 19:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.