这打印什么?
\n\n$ sudo netstat -ntlp | grep \':953\\>\'\n
Run Code Online (Sandbox Code Playgroud)\n\n它应该打印如下内容:
\n\ntcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN 1234/named\n
Run Code Online (Sandbox Code Playgroud)\n\n或者如果您启用了 IPv6:
\n\ntcp 0 0 127.0.0.1:953 0.0.0.0:* LISTEN 1234/named\ntcp 0 0 ::1:953 :::* LISTEN 1234/named\n
Run Code Online (Sandbox Code Playgroud)\n\n由于它仅使用环回地址,因此该端口只能由登录到服务器本身的用户访问,而不能从网络上的其他位置访问。
\n\nrndc 用于管理名称服务器,例如“rndc reload”是告诉 BIND 您更改了区域文件并且应该重新加载它们的首选方式。
\n\n在我的 Debian 服务器上(不确定 CentOS),/etc/init.d/bind9 也需要它来启动和停止服务。我认为 CentOS 将该文件称为 /etc/init.d/named。如果不先检查该脚本如何工作,我不会禁用它或阻止它。
\n\n您可以运行的命令的完整列表位于BIND 9 管理员参考手册 - 管理工具中。
\n\n至于为什么使用TCP端口,可以运行“man rndc”查看详情:
\n\n rndc communicates with the name server over a TCP connection, sending\n commands authenticated with digital signatures. In the current versions\n of rndc and named, the only supported authentication algorithm is\n HMAC-MD5, which uses a shared secret on each end of the connection.\n This provides TSIG-style authentication for the command request and the\n name server\xe2\x80\x99s response. All commands sent over the channel must be\n signed by a key_id known to the server.\n\n rndc reads a configuration file to determine how to contact the name\n server and decide what algorithm and key it should use.\n
Run Code Online (Sandbox Code Playgroud)\n\n因此,如果您想保护它,请查看密钥和密钥文件的详细信息。例如,/etc/bind/rndc.key(或/etc/named/rndc.key)应具有受限权限。
\n 归档时间: |
|
查看次数: |
18847 次 |
最近记录: |