Mobile app version of vmapp.org
Login or Join
Shakeerah822

: Is it possible to block access to a DB based on IP? We're looking to beef up the security on a site, among other things we thought of trying to block access to the DB based on IP (in

@Shakeerah822

Posted in: #Data #Database #IpAddress #Security

We're looking to beef up the security on a site, among other things we thought of trying to block access to the DB based on IP (in a similar way you can do a FTP lock dependent on IP), so that only the static IP of our VPS can access it as well as our local office IP (also static).

Is this a standard approach, I tried searching for it to see any notes on implementation / best practices, but I could see anything written about it?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Shakeerah822

1 Comments

Sorted by latest first Latest Oldest Best

 

@Voss4911412

If you're looking to increase security for connections to remote server applications, you might look into setting up a VPN.

If your VPS is using the Plesk control panel (as in your previous questions), you can use their VPN Module. As stated there:


Virtual Private Networking technologies allow communications between
geographically distributed LAN segments over public networks. VPN
message traffic passes through public networking infrastructures, such
as the Internet, via secure tunnel protocols.

One of the most useful implementations of VPN is allowing access to a
local network for a single remote host. For example, if a user needs
to get access to a remote network from his home computer, they must
establish a VPN connection.


You can then specify the remote IP address (or host name) of your local office to restrict access to just that, as covered under VPN Preferences. A VPN can also be added to a server without a control panel, and setup depends on your environment.

Another option is to create a firewall rule to only allow your local office's IP address to connect to the IP or port number that your database is accessible on. For example, MySQL uses the default port of 3306. See this for configuring the firewall in Plesk, or this for a server without a control panel.

Last but not least, you could configure the database to be accessible only on a subdomain or another domain, and then restrict access to this to just the IP address of your local office.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme