i have 3 virtual machines running on debian 8 on a private network. Let's name them A, B and C.
=> C is a virtual machine with 2 network cards (we name them a and b) each network card having a different IP adress. There is BIND9 installed on the C server.
=> A server has his DNS set on the IP of the a network card
=> B server has his DNS set on the IP of the b network card
How can i adapt the DNS server response depending on the asked network card, and what is the best way to do that ?
Thank you in advance !
EDIT :
# named.example01.conf
acl trusted { 192.168.7.0/24; localhost; };
acl guest { 192.168.8.0/24; };
view trusted {
match-clients { trusted; };
allow-recursion { any; };
zone "myzone.example" {
type master;
file "db.myzone.example";
};
zone "7.168.192.in-addr.arpa" {
type master;
file "db.192.168.7";
};
};
view guest {
match-clients { guest; };
allow-recursion { any; };
};
Use view
with match-destinations
statement.