BIND9 Return different IP address based on subnet

Christian Kette chriswaeldchen at outlook.de
Sun Dec 28 18:59:50 UTC 2014


Thank you for the helpful answer.
I changed the file /etc/bind/named.conf.local to

view "local" {
    match-clients { 127.0.0.1; };
        zone "home.lan" IN {
        type master;
        file "/etc/bind/db.home.lan";
    };
};
view "ext" {
    match-clients { 192.168.2.0/24;};
    zone "2.168.192.in-addr.arpa" {
        type master;
        file "/etc/bind/db.rev.2.168.192.in-addr.arpa";
    };
};
view "wlan0" {
    match-clients { 192.168.3.0/24;};
    zone "3.168.192.in-addr.arpa" {
        type master;
        file "/etc/bind/db.rev.3.168.192.in-addr.arpa";
    };
};
view "wlan00" {
    match-clients {192.168.4.0/24;};
    zone "4.168.192.in-addr.arpa" {
        type master;
        file "/etc/bind/db.rev.4.168.192.in-addr.arpa";
    };
};
view "wlan01" {
    match-clients {192.168.5.0/24;};
    zone "5.168.192.in-addr.arpa" {
        type master;
        file "/etc/bind/db.rev.5.168.192.in-addr.arpa";
    };
};
view "int" {
    match-clients {192.168.10.0/24;};
    zone "10.168.192.in-addr.arpa" {
        type master;
        file "/etc/bind/db.rev.10.168.192.in-addr.arpa";
    };
};


But now I get Non-existent domain error  (on the raspberry machine) for
- nslookup localhost
- nslookup DEV.home.lan

I don't understand why it can't find neither the localhost nor the
DEV.home.lan entry in /etc/bind/db.home.lan



2014-12-27 22:57 GMT+01:00 Jeremy C. Reed <jreed at isc.org>:

> On Sat, 27 Dec 2014, Christian Kette wrote:
>
> > I have some questions. Q1: Why do I get the IP address "192.168.2.100"
> for
> > "DEV.home.lan" from both the 192.168.2.0/24 and the 192.168.10.0/24
> network?
>
> The view that matches first is used.
>
> > #include "/etc/bind/named.conf.default-zones";
> ...
> > Q2: What exactly are these zones in the file for? Do I need them?
>
> You didn't include the file in the email. But I found a copy via google
> which may be the same.  You probably don't need it. (For example, the
> priming hints are builtin to named.)
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.isc.org/pipermail/bind-users/attachments/20141228/61651156/attachment.html>


More information about the bind-users mailing list