I am using Debian 10 as a MySQL server and I have opened my firewall on port 3306 TCP to allow some others to connect to databases on the MySQL server. At the moment port 3306 is open to all but I want to only open this for fixed IP’s. Now how can I see the IP’s that are connected to my MySQL on port 3306?
I made a testscript and ran if from somewhere else, it connects ok and retrieves all MySQL data but netstat or nmap is not showing that connection at all.
2
Answers
I found a solution by using tcpdump and filter on port 3306. This works fine.
This is a solution for netstat.
It shows the ip’s connected as well as the number of connections by that same ip.