hilfesuchend...
Grob gesagt besitze ich ein kleines lokales Netzwerk, dessen großer Schwachpunkt ein alter WEP-Access Point ist (der auch nicht ausgetauscht wird, ich weiß, das wäre einfacher). Folglich habe ich auf meinem Gateway einen OpenVPN-Server aufgesetzt und alle meine Clients können nur über dieses VPN ins Netz (um eben mögliche WLAN-Eindringlinge vom Internet auszusperren). Mit iptables und allem funktioniert das auch problemlos.
Um das Setup zu verfeinern, will ich allerdings bind/DNS nicht einfach nur über das VPN anbieten, sondern auch lokal im Netz - für dieses soll es allerdings nur für eine bestimmte Zone, nämlich meine lokale Domain, Abfragen beantworten. Beliebige Abfragen nach IPs außerhalb meines Netzes sollen nicht beantwortet werden (eben nur übers VPN).
Das Problem ist jedoch, dass ich den bind überhaupt nicht dazu bewegen kann, beliebige Abfragen nicht zu beantworten.
Ich habe die Zone "." aus der named.conf gelöscht, die Datei db.root mit den akt. Root-NS wegverschoben und die resolv.conf geleert. Trotzdem beantwortet der bind weiterhin brav jede Abfrage. In irgendeinem Forum habe ich gelesen, dass bind eine eincompilierte Liste mit Root-NS hat, für den absoluten Notfall.
Meine ganz simple Frage: wie deaktiviere ich das Beantworten von Abfragen außer meiner eigenen Zonen?
Die Unterteilung in VPN und das normale Netz habe ich mit "Views" bereits erledigt, nützt jedoch nichts, wenn immer alles beantwortet wird. Zuletzt noch ein Auszug aus meiner named.conf ohne die root-Zone:
Code: Alles auswählen
include "/etc/bind/named.conf.options";
include "/etc/bind/named.conf.logging";
//include "/etc/bind/rndckey";
controls {
inet 127.0.0.1 allow { localhost; } keys { "rndc-key"; };
};
view "openvpn" {
match-clients { 10.8.0.0/24; };
// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912
zone "localhost" {
type master;
file "/etc/bind/db.local";
};
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";
};
// local domains
zone "pnet" {
type master;
file "/etc/bind/db.pnet";
};
zone "1.168.192.in-addr.arpa" {
type master;
file "/etc/bind/db.192.168.1";
};
zone "0.8.10.in-addr.arpa" {
type master;
file "/etc/bind/db.10.8.0";
};
};
view "internal" {
match-clients { 192.168.1.0/24; };
// be authoritative for the localhost forward and reverse zones, and for
// broadcast zones as per RFC 1912
zone "localhost" {
type master;
file "/etc/bind/db.local";
};
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";
};
// local domains
zone "pnet" {
type master;
file "/etc/bind/db.pnet.internal";
};
zone "1.168.192.in-addr.arpa" {
type master;
file "/etc/bind/db.192.168.1";
};
};