转发器绑定设置端口

Mag*_*ech 3 bind port named-conf

根据http://www.zytrax.com/books/dns/ch7/queries.html#forwarders,可以在地址后指定端口。

但是当我尝试将其设置为

forwarders {
    127.0.0.1 2053;
}
Run Code Online (Sandbox Code Playgroud)

命名的 checkconf 返回

/etc/bind/named.conf.options:12: missing ';' before '2053'
/etc/bind/named.conf.options:12: expected IP address near '2053'
Run Code Online (Sandbox Code Playgroud)

我的完整的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;
    };
};
Run Code Online (Sandbox Code Playgroud)

小智 8

您需要使用port关键字。

货运代理{
            127.0.0.1 端口2053;
    };