Why, MariaDB user allowed host IP address also allows a virtual machine on the host with NAT network adapter
0
votes
0
answers
95
views
The MariaDB user specifies an allowed IP address in the
Host
column of the mysql.user
table. So, it only allows logging in from the host with the specified IP address. And MySQL has the same design.
**We have verified in testing:**
With VirtualBox hypervisor, a virtual machine runs on the allowed host, and the VM's Setting has a "NAT" network adaptor for global traffics. So, the MariaDB user account also allows logging in from the VM.
**Our Questions:**
- Why does the allowed host IP address of MariaDB user also allow the VM running on the host?
On both the host and the virtual machine, the testing connection client is DBeaver with MariaDB JDBC driver. And we want to better understand the mechanism:
- How does the MariaDB server get the source IP address of the in-coming login request? Is it a JDBC driver property, or is it from the TCP/IP protocol?
We highly appreciate any hints and suggestions, or any directions on the terminologies to search.
\
Notes:
I'm setting a "vmware" tag to this question, as "virtualbox" is not available in the choices.
Asked by James
(149 rep)
Oct 6, 2023, 05:32 PM