(警告)无法解析 IP 地址“XXX.XXX.XX.XXX”:名称或服务未知

(警告)无法解析 IP 地址“XXX.XXX.XX.XXX”:名称或服务未知

我在 127.0.0.1:3310 使用 Mariadb-10.3。网站运行正常,一切正常。但我在日志中注意到了这些连接:

200812 21:16:31 [Warning] IP address '195.54.167.225' could not be resolved: Name or service not known
200813  1:44:22 [Warning] IP address '177.156.63.4' has been resolved to the host name '177.156.63.4.dynamic.adsl.gvt.net.br', which resembles IPv4-address itself.
200813  3:03:27 [Warning] IP address '51.103.146.73' could not be resolved: Name or service not known
200813  3:24:40 [Warning] IP address '20.52.50.38' could not be resolved: Name or service not known
200813 15:01:29 [Note] Hostname 'worker-13.sfj.censys-scanner.com' does not resolve to '192.35.168.220'.
200813 15:01:29 [Note] Hostname 'worker-13.sfj.censys-scanner.com' has the following IP addresses:
200813 15:01:29 [Note]  - 192.35.168.208

200813 18:14:01 [Warning] IP address '170.130.187.30' could not be resolved: Name or service not known
200813 21:14:05 [Warning] IP address '64.227.86.82' could not be resolved: Name or service not known
200813 21:39:55 [Note] Hostname '186-210-095-134.xd-dynamic.algarnetsuper.com.br' does not resolve to '186.210.95.134'.
200813 21:39:55 [Note] Hostname '186-210-095-134.xd-dynamic.algarnetsuper.com.br' has the following IP addresses:
200813 21:39:55 [Note]  - 195.85.231.19

200813 23:11:43 [Warning] IP address '92.63.194.76' could not be resolved: Name or service not known
200814  1:17:00 [Warning] IP address '79.152.33.82' has been resolved to the host name '82.red-79-152-33.dynamicip.rima-tde.net', which resembles IPv4-address itself.
200814 13:18:19 [Warning] IP address '118.193.28.58' could not be resolved: Name or service not known
200814 18:47:42 [Note] Hostname '3c2e01.rederatural.com' does not resolve to '104.140.188.10'.
200814 18:47:42 [Note] Hostname '3c2e01.rederatural.com' has the following IP addresses:
200814 18:47:42 [Note]  - 212.32.237.101

200814 20:25:51 [Note] Hostname '683b217.rederatural.com' does not resolve to '104.140.188.6'.
200814 20:25:51 [Note] Hostname '683b217.rederatural.com' has the following IP addresses:
200814 20:25:51 [Note]  - 212.32.237.90

200814 22:43:46 [Note] Hostname 'zg-0708b-125.stretchoid.com' does not resolve to '192.241.238.224'.
200814 22:43:46 [Note] Hostname 'zg-0708b-125.stretchoid.com' has the following IP addresses:
200814 22:43:46 [Note]  - 178.210.89.119

200814 23:08:48 [Note] Hostname 'zg-0708a-49.stretchoid.com' does not resolve to '192.241.212.195'.
200814 23:08:48 [Note] Hostname 'zg-0708a-49.stretchoid.com' has the following IP addresses:
200814 23:08:48 [Note]  - 178.210.89.119

200814 23:40:20 [Warning] IP address '80.82.78.85' could not be resolved: Name or service not known
200815  2:01:33 [Warning] IP address '183.136.225.44' could not be resolved: Name or service not known

之后,mysql 服务器被禁用,我必须重新启动它。你能告诉我这是什么吗?是黑客攻击还是其他什么?

我在某处读到过它,并在 /etc/my.cnf 中添加了skip_name_resolve = 1。有帮助吗?

答案1

对于每个传入连接,MariaDB 都会尝试进行 DNS 查找。正如您在问题中所写,添加skip-name-resolve = on/etc/my.cnf阻止查找。

事实上,您甚至会收到这些连接尝试,这意味着您的数据库已暴露在互联网上。强烈建议不要允许公众访问该端口,例如限制为环回接口和/或使用防火墙仅允许列入白名单的 IP。

相关内容