加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Linux > 正文

在rsync守护程序中禁用反向查找

发布时间:2020-12-13 16:44:39 所属栏目:Linux 来源:网络整理
导读:我遇到了一些通过rsync -daemon提供服务的rsync模块的问题 这行来自我的/var/log/rsyncd.log文件: 2013/02/08 12:15:28 [13174] name lookup failed for XXX.XXX.XXX.XXX: Name or service not known2013/02/08 12:15:28 [13174] connect from UNKNOWN (XXX
我遇到了一些通过rsync -daemon提供服务的rsync模块的问题

这行来自我的/var/log/rsyncd.log文件:

2013/02/08 12:15:28 [13174] name lookup failed for XXX.XXX.XXX.XXX: Name or service not known
2013/02/08 12:15:28 [13174] connect from UNKNOWN (XXX.XXX.XXX.XXX)

从rsyncd.conf手册页:

reverse lookup

Controls whether the daemon performs a reverse lookup on the client’s
IP address to determine its hostname,which is used for “hosts
allow”/”hosts deny” checks and the “%h” log escape. This is enabled by
default,but you may wish to disable it to save time if you know the
lookup will not return a useful result,in which case the daemon will
use the name “UNDETERMINED” instead.

If this parameter is enabled globally (even by default),rsync
performs the lookup as soon as a client connects,so disabling it for
a module will not avoid the lookup. Thus,you probably want to disable
it globally and then enable it for modules that need the information.

所以我将以下行添加到/etc/rsyncd.conf中的全局conf中

reverse lookup = no

但是,当我停止并启动守护程序时,这行会添加到日志文件中:

2013/02/08 12:47:17 [13675] Unknown Parameter encountered: "reverse lookup" 
2013/02/08 12:47:17 [13675] IGNORING unknown parameter "reverse lookup" 
2013/02/08 12:47:17 [13676] rsyncd version 3.0.7 starting,listening on port 873

这是我服务器上安装的版本:

rsync version 3.0.7 protocol version 30

解决方法

反向查找选项仅出现在 upcoming 3.1.0 release中:

NEWS for rsync 3.1.0 (UNRELEASED)

  • Added the “reverse lookup” parameter to the rsync daemon config file to allow reverse-DNS lookups to be disabled.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读