0

I'm working on app that uses MySQL database on XAMPP Control Panel on Windows.

I am concerned about security part.

I received advice about connecting to MySQL through VPN so it won't be accessible so easily.

As far as I understand it, VPN helps with blocking unwanted traffic to database.

I was thinking about whitelisting IP's instead of setting up VPN. There is only handful of non-localhost connections for this database so setting up separate privileges and user with specified IP address allowed to connect for each device wouldn't be problem at all.

Thing is, I don't know exactly how this works - will it allow to try to connect if particular IP is not within whitelist? I would guess not?

Will this get me similar result as if I'd use VPN? What are differences between this two approaches?

1
  • Just note that out of the box XAMPP is not remotely secure. If you need to deploy to anything beyond development, switch over to Apache for proper security.
    – Nelson
    Mar 19, 2021 at 3:26

1 Answer 1

0

IP Whitelist should kill any connection from an unknown IP.

It should be safe enough, and it's highly unlikely that an attacker will go through the IP whitelist, unless you whitelisted public IPs (school, restaurant, library, etc)

Using a VPN would be "safer", because you could encrypt your traffic and prevent an attacker on the same network as you from seeing any data other than the VPN's IP.

It also makes it so that there is two passwords/keys required - one for the VPN login and one for the MySQL server login.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.