-2

I have some problem. I have a domain controller on windows server 2003 with dns server. IP that dns is: 192.168.110.5. For example, i have some computers with names: guard-01.piduna.pp.ua. "piduna.pp.ua" – my domain. I have a gateway to internet on CentOS 6.7. In my configuration, i have: two interfaces (lan and wan), FORWARDING and NAT. That is my resolv.conf:

cat /etc/resolv.conf
nameserver 195.69.138.130
nameserver 195.69.138.141
search piduna.pp.ua

I can't resolve local domain names, because i have only nameservers of my ISP. When, i add nameserver 192.168.110.5 (dns of windows server), i can ping local ip-adresses and resolve it. But i don't want, that in my gateway (CentOS) stand first nameserver, DNS from Windows Server. I make on my CentOS caching DNS (forwarding and caching nameserver of my ISP). My config:

acl "lan" {
           192.168.0.0/16;
           172.16.170.0/24;
           127.0.0.1;
};

options {
           directory "/var/cache/bind";
           forward first;              

           forwarders {                
                      195.69.138.130;      // first dns of provider
                      195.69.138.141;      // second dns of provider
           };

          listen-on { lan; };        
          allow-query { lan; };      
          allow-recursion { lan; };  
          allow-transfer { none; }; 
          version "unknown";        
          auth-nxdomain no;    
          listen-on-v6 { none; };   
          };

zone "." {
          type hint;
          file "db.root";
};

zone "localhost" {
          type master;
          file "localhost";
};

zone "127.in-addr.arpa" {
          type master;
          file "127.in-addr.arpa";
};

zone "0.in-addr.arpa" {
          type master;
          file "0.in-addr.arpa";
};

zone "255.in-addr.arpa" {
          type master;
          file "255.in-addr.arpa";
};

Ok, when i add in resolv.conf, 127.0.0.1 – my caching server work fine. But, how to add my domain zone in that config ? I want check ping from my gateway (CentOS) to local domain names. For example, i can ping 192.168.110.25, but i cant ping guard-01.piduna.pp.ua. How to do that ? How to resolve local domain names on my gateway (CentOS). Google said, that i need add slave zone, but i not find how to do that. Please help and thanks for your attention.

2 Answers2

1

It's called 'split' views

view "internal" {
   match-clients { lan; }; // your local network
   recursion yes;

   zone "." in {
      type hint;
      file "db.root";
   };

   zone "piduna.pp.ua" {
      type master;
      file "internal/piduna.pp.ua";
   };
};
ALex_hha
  • 7,025
  • 1
  • 23
  • 39
0

Just have to add a zone "mydomain" {} to the file if i understand well the question. Then create a file named like 'file' directive which contains the zone. Also think of the reverse zone (like 1.168.192.in-addr.arpa)

webofmars
  • 180
  • 7