根据http://www.zytrax.com/books/dns/ch7/queries.html#forwarders可以在地址后指定端口。
但是当我尝试将其设置为
forwarders {
127.0.0.1 2053;
}
named-checkconf 返回
/etc/bind/named.conf.options:12: missing ';' before '2053'
/etc/bind/named.conf.options:12: expected IP address near '2053'
我的完整named.conf.options文件:
options {
directory "/var/cache/bind";
dnssec-validation no;
auth-nxdomain no;
recursion yes;
allow-recursion { any; };
allow-query { any; };
allow-query-cache { any; };
listen-on { any; };
listen-on-v6 { any; };
forwarders {
127.0.0.1 2053;
};
};
答案1
您需要使用port
关键字。
货运代理 { 127.0.0.1 端口2053; };