警告:/etc/hosts.allow,行xx:主机名/名称不匹配

我在/etc/hosts.allow/etc/hosts.allow了自己的域名

 ALL: localhost, .domain.tld 

加上我所有的IP地址。

我在/etc/hosts.deny也有大约4k行。

一切正常,但我不明白我不时得到的警告,因为不是所有的连接返回不匹配:

 Feb 4 09:01:13 my sshd[24068]: warning: /etc/hosts.allow, line 14: host name/name mismatch: UNKNOWN-110-75-188-34.aliyun.com != my.domain.tld 

更新:

我的IP映射到domain.tld,domain.tld映射到我的IP。

* .aliyun.com是一些BruteForcing机器,攻击我的服务器。

sshd只是给你一个警告,说明被拒绝的连接没有在hosts.allow或hosts.deny中列出,这是详细日志logging行为的一部分,允许你排除可能需要匹配的连接并且不匹配(通常是由于configuration不正确的DNS条目,尤其是RDNS条目)。

不过,留意警告并不是一个坏主意,虽然这是相当无害的。