![(警告) IP アドレス 'XXX.XXX.XX.XXX' を解決できませんでした: 名前またはサービスが不明です](https://rvso.com/image/756247/(%E8%AD%A6%E5%91%8A)%20IP%20%E3%82%A2%E3%83%89%E3%83%AC%E3%82%B9%20'XXX.XXX.XX.XXX'%20%E3%82%92%E8%A7%A3%E6%B1%BA%E3%81%A7%E3%81%8D%E3%81%BE%E3%81%9B%E3%82%93%E3%81%A7%E3%81%97%E3%81%9F%3A%20%E5%90%8D%E5%89%8D%E3%81%BE%E3%81%9F%E3%81%AF%E3%82%B5%E3%83%BC%E3%83%93%E3%82%B9%E3%81%8C%E4%B8%8D%E6%98%8E%E3%81%A7%E3%81%99.png)
私は 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
アップが防止されます。
このような接続試行が発生しているということは、DB がインターネットに公開されていることを意味します。そのポートへのパブリック アクセスを許可しないことを強くお勧めします。たとえば、ループバック インターフェイスに制限したり、ファイアウォールを使用してホワイトリストに登録された IP のみを許可したりします。