嗨,我认为这是一个简单的问题,我只想转发到 LAN 网络中的某些 IP,例如我有 2 个 acl 列表:
acl "office1" {
192.168.1.15; // With internet access
};
acl "production" {
192.168.1.101; // No internet access
};
Run Code Online (Sandbox Code Playgroud)
我知道可能应该有更有效的方法来限制互联网访问,但目前这是我想尝试的。这是我尝试过的 named.conf.local
// Inlcude my acl definitions
include "/etc/bind/acls.conf";
view "no-internet" {
match-clients { production; };
include "/etc/bind/named.conf.default-zones";
zone "localdomain.com" {
type master;
file "/etc/bind/db.localdomain.com";
};
zone "1.168.192.in-addr.arpa" {
type master;
file "/etc/bind/db.192.168.1";
};
}
view "internet" {
match-clients { office1; };
include "/etc/bind/named.conf.default-zones";
forwarders {
201.56.59.14; // Made Up
201.56.59.15; // Made Up …Run Code Online (Sandbox Code Playgroud)