• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

MySQL server is remote accessible?

Azurel

Silver Pleskian
I looked in /var/log/mysqld.log and found this lines:

130902 17:10:29 [Warning] IP address '60.191.145.130' could not be resolved: Temporary failure in name resolution
130905 7:34:38 [Note] Hostname 'cncln.online.ln.cn' does not resolve to '218.60.54.18'.
130905 7:34:38 [Note] Hostname 'cncln.online.ln.cn' has the following IP addresses:
130905 7:34:38 [Note] - 60.19.29.21

130906 23:34:44 [Warning] IP address '115.238.164.249' could not be resolved: Name or service not known
130909 9:12:53 [Note] Server hostname (bind-address): '0.0.0.0'; port: 3306
130909 9:12:53 [Note] - '0.0.0.0' resolves to '0.0.0.0';
130909 9:12:53 [Note] Server socket created on IP: '0.0.0.0'.
130909 9:12:53 [Note] Event Scheduler: Loaded 0 events
130909 9:12:53 [Note] /usr/libexec/mysqld: ready for connections.
Version: '5.5.33-cll-lve' socket: '/var/lib/mysql/mysql.sock' port: 3306 MySQL Community Server (GPL) by Atomicorp
130911 3:47:30 [Warning] IP address '27.14.206.104' could not be resolved: Name or service not known
130913 0:45:24 [Warning] IP address '222.186.42.165' could not be resolved: Name or service not known
130917 2:55:22 [Warning] IP address '58.218.211.59' could not be resolved: Name or service not known
130923 0:44:52 [Warning] IP address '125.64.94.220' could not be resolved: Name or service not known
130923 9:05:06 [Warning] IP address '122.70.133.202' could not be resolved: Name or service not known
130926 21:17:11 [Warning] IP address '60.191.145.130' could not be resolved: Name or service not known
130926 21:26:57 [Note] Hostname 'tele10.hostarraignment.com' does not resolve to '199.15.251.203'.
130926 21:26:57 [Note] Hostname 'tele10.hostarraignment.com' has the following IP addresses:
130926 21:26:57 [Note] - 204.140.26.253

130930 12:57:59 [Warning] IP address '82.221.105.7' could not be resolved: Name or service not known

Whats happen here? Is my mysql server remote accessible? How I can stop this?


EDIT:
I found that I must add in "/etc/my.cnf" this line after "[mysqld]":
bind-address=127.0.0.1
or
skip-networking

Ist this correct, must I restart the mysql server with "/etc/rc.d/init.d/mysqld restart"?


EDIT2:
Since Plesk 8 MySQL users and databases are created with permissions that allow access to the database from outside.
http://kb.parallels.com/de/1134/?show_at=en
 
Last edited:
You just need to firewall port 3306 to prevent anyone from accessing the database remotely.
Note also that someone would need a valid username/password combination to do so anyway.

But by far the best option for any firewall is to deny all ports by default, and only open those that you need. In this way you won't accidentally allow something by not blocking it.
 
Thanks. Good idea.. I have now blocked :

* FTP server (I use winscp port 22)
* Mail password change service
* MySQL server
* PostgreSQL server
* Tomcat administrative interface
* Samba (file sharing in Windows networks)
 
Back
Top