Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I've been fighting with this for the last few days. A few of my entries have external and internal IP's. My internal network is 10.0.0.0/8.

When I nslookup pc1.clase.net internally it responds with a 10.0.0.0 address but if I nslookup pc1.clase.net externally it still gives me a 10.0.0.0 address.

I'm on Debian Wheezy.

named.conf

include "/etc/bind/named.conf.options";
view "internal" {
  match-clients { 10.0.0.0/8;};
  zone "clase.net"{
    type master;
    file "/etc/bind/internals/db.forward.net";
    allow-transfer { 10.0.0.11/8; }
  };
};
include "/etc/bind/named.conf.default-zones";

zone "10.in-addr.arpa" {
  type master;
  file "/etc/bind/internals/db.reverse.net";
  allow-transfer { 10.0.0.11/8;
  };
};
};

view "external" {
  match-clients { any; };
  zone "clase.net" {
    type master;
    file "/etc/bind/externals/db.forward.net";
    allow-transfer { 10.0.0.11/18;
    };
  };
};

internal/db.foward.net

$TTL    604800
@       IN      SOA     ns.clase.net. root.clase.net. (
                     2 ; Serial
                         604800 ; Refresh
                          86400 ; Retry
                        2419200 ; Expire
                         604800); Negative Cache TTL
;
@   IN  NS  ns.clase.net.
ns  IN  A   10.0.0.10
pc1 IN  A   10.0.0.12

external/db.forward.net

$TTL    604800
@       IN      SOA     ns.clase.net. root.clase.net. (
                     2 ; Serial
                         604800 ; Refresh
                          86400 ; Retry
                        2419200 ; Expire
                         604800); Negative Cache TTL
;
@   IN  NS  ns
    IN  A   150.210.0.1
ns  IN  A   150.210.0.1
pc1 IN  A   150.210.0.22
share|improve this question

2 Answers 2

Not sure if this is your issue but in looking at your config file it looks like you have some typos in it.

Example

This block looks like it has too many closing braces (};).

zone "10.in-addr.arpa" {
  type master;
  file "/etc/bind/internals/db.reverse.net";
  allow-transfer { 10.0.0.11/8;
  };
};
};

Should be this, no?

zone "10.in-addr.arpa" {
  type master;
  file "/etc/bind/internals/db.reverse.net";
  allow-transfer { 10.0.0.11/8; }
};

Cleaned up version of your named.conf file.

include "/etc/bind/named.conf.options";
view "internal" {
  match-clients { 10.0.0.10/24;};
  zone "clase.net" {
    type master;
    file "/etc/bind/internals/db.forward.net";
    allow-transfer { 10.0.0.11/8; };
  };
};

include "/etc/bind/named.conf.default-zones";

zone "10.in-addr.arpa" {
  type master;
  file "/etc/bind/internals/db.reverse.net";
  allow-transfer { 10.0.0.11/8; };
};

view "external" {
  match-clients { any; };
  zone "clase.net" {
    type master;
    file "/etc/bind/externals/db.forward.net";
    allow-transfer { 10.0.0.11/18; };
  };
};

wrong client network?

These lines look incorrect to me:

view "internal" {
  match-clients { 10.0.0.0/8;};
  zone "clase.net"{
    type master;
    file "/etc/bind/internals/db.forward.net";
    allow-transfer { 10.0.0.11/8; }
  };
};

Should be this, no?

view "internal" {
  match-clients { 10.0.0.0/8;};
  zone "clase.net"{
    type master;
    file "/etc/bind/internals/db.forward.net";
    allow-transfer { 10.0.0.0/8; }
  };
};

References

share|improve this answer
    
Thanks for answering, Afraid that removing the named.conf.default-zones from the internal view gives me a fatal error:Default-zones when using view statements, all zones must be in views And ive noticed a silly error of mine. the clients for internal view is 10.0.0.0/8 –  ultorian Oct 21 '13 at 1:03
    
@ultorian - that was gonna be my next question, the IP's were 10.0.0.11/8 which I thought was wrong. Did that resolve the issue then? –  slm Oct 21 '13 at 1:23
    
nope no luck, it was a typo in the code inserted here, not the real code :( I'm actually starting to doubt my "external" network.. –  ultorian Oct 21 '13 at 1:30
    
@ultorian - can you walk me through how the external hosts are querying the DNS server? –  slm Oct 21 '13 at 1:34
    
@ultorian - also you might want to compare your setup to this one, see if you've missed anything? howtoforge.com/two_in_one_dns_bind9_views –  slm Oct 21 '13 at 1:37

Finally found out how to do it.

Requires the TSIG keys to differentiate the 2 zones.

Example

share|improve this answer
1  
please provide a (full) example in the answer, rather than linking to remote sites (that will happily change URLs,... and no one will be any the wiser). also, if this solves your problem, please accept the answer (even if it's your own) –  umläute Mar 3 at 9:04

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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