I have a working caching DNS-server using bind.
This setup is being used for years to respond to queries of our clients.
I want to give a certain IP or set of IP's another answer than the one that is given by the Authorative server. I have studied and experimented some with using different 'views'.
I was able to give that test IP a different one, but at the same time the others were not able to resolve that zone again.
I will use the zone 'smtp.mytoplevel.com' as example.
This is my config:
Code:
# grep -vE '^(\/\/|$)' named.conf
include "/etc/bind/named.conf.options";
zone "." {
type hint;
file "/etc/bind/db.root";
};
zone "local" {
type master;
file "/etc/bind/db.local";
};
zone "localhost" {
type master;
file "/etc/bind/db.localhost";
};
zone "127.in-addr.arpa" {
type master;
file "/etc/bind/db.127";
};
zone "0.in-addr.arpa" {
type master;
file "/etc/bind/db.0";
};
zone "255.in-addr.arpa" {
type master;
file "/etc/bind/db.255";
};
include "/etc/bind/named.conf.local";
Normally named.conf.local is empty, but I have this (not working) config.
Code:
view "badboy" {
match-clients { 80.120.10.111/32; };
zone "smtp.mytoplevel.com" {
type master;
file "/etc/bind/db.smtp.mytoplevel.com.fixed";
};
}; // end view
zone "smtp.mytoplevel.com" {
type master;
file "/etc/bind/db.smtp.mytoplevel.com";
};
Somehow it's not working as expected. I also thought I would be allowed to leave out the default zone declaration, but then I had errors in my log.
Could someone who knows what I want to do and knows how he can do it help me?