Take the 2-minute tour ×
Webmasters Stack Exchange is a question and answer site for pro webmasters. It's 100% free, no registration required.

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?

share|improve this question
1  
Check [this][1], our neighborhoods from SO. Might could help you [1]: stackoverflow.com/questions/7127602/… –  fiskolin Sep 2 '13 at 17:12
add comment

1 Answer

up vote 1 down vote accepted

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.

share|improve this answer
1  
+2 for background research / memory "If your VPS is using the Plesk control panel (as in your previous questions)" –  sam Sep 3 '13 at 21:28
    
Thanks, I remembered - hope it helps :-) –  dan Sep 3 '13 at 23:39
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

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