为什么 auth.log 会警告可能存在破解尝试?

为什么 auth.log 会警告可能存在破解尝试?

我有一台通过 ssh-keys 验证从远程服务器接收备份的服务器rsync。rsync 通过 ddns URL 到达高编号的转发端口。

发送服务器位于普通家庭互联网线路上,ISP 会为其分配一个动态 IP。发送连接的 IP 大约在一周前发生了变化,从那时起,/var/log/auth.log每次启动 ssh 连接时都会包含以下消息。我已检查新 IP 地址确实属于发送服务器所在的站点。

Apr 11 08:30:15 someserver sshd[25447]: reverse mapping checking getaddrinfo for hostXXX-XXX-XXX-XXX.some.isp-name.com [XXX.XXX.XXX.XXX] failed - POSSIBLE BREAK IN ATTEMPT!

是什么导致了这个警告?我可以/应该做些什么来避免它?

答案1

在评论中代码解释得很好:

/*
 * Map it back to an IP address and check that the given
 * address actually is an address of this host.  This is
 * necessary because anyone with access to a name server can
 * define arbitrary names for an IP address. Mapping from
 * name to IP address can be trusted better (but can still be
 * fooled if the intruder has access to the name server of
 * the domain).
 */

基本上如评论中所述。如果您有基于源 IP(HostBased身份验证)的访问权限,则这是重要的线程。如果您有一些过滤之类的东西,它就不那么重要了。

如果您不喜欢这个错误,您可以随时使用,UseDNS no然后sshd_config这个消息就会消失。

相关内容