Search Our Database

Setting Up Custom Access Rules in Plesk 12.5

Last updated on |

Introduction

This guide explains how to configure remote access to databases in Plesk, enabling administrators to control which IP addresses can connect to their MySQL, PostgreSQL, or SQL Server databases. Use these steps when you need to secure database access for applications or users, either allowing or restricting connections based on specific needs. The configurations can be applied directly through the Plesk control panel, with additional firewall settings required for PostgreSQL and SQL Server. Follow the steps provided to ensure secure and appropriate access for your database users.

 

Prerequisites

  • Access to the Plesk control panel with administrative privileges.
  • A subscription with the permission “Remote access for database users.”
  • Contact your hosting provider to ensure that the Plesk firewall is configured to allow remote access, especially for PostgreSQL or SQL Server databases.

 

Setting Up Remote Access for MySQL Databases

MySQL databases in Plesk use MySQL’s native access control lists (ACL) to manage remote connections.

  1. For an Existing User:
    • Go to Databases > Users.
    • Select the user and go to the Access Control group of options.
  2. For a New User:
    • Go to Databases > Users > Add Database User.
    • Configure the Access Control settings while creating the user.
  3. Options for Access Control:
    • Allow local connections only: Permits access from the localhost and all IPs used by Plesk.
    • Allow remote connections from any host: Allows connections from any IP, including localhost.
    • Allow remote connections from (specified hosts): Only allows connections from specified IPs or hostnames.
  4. Save Changes: After selecting your preferred option, save the settings.
Note
If the Plesk firewall is active, ensure it permits remote MySQL connections; otherwise, custom access control settings will not work.

 

Setting Up Remote Access for PostgreSQL Databases

Remote access for PostgreSQL databases is managed by firewall rules set by your hosting provider.

  1. For an Existing User:
    • Go to Databases > Users.
    • Select the user and go to the Remote Access group of options.
  2. For a New User:
    • Go to Databases > User Management > Add Database User.
    • Configure the Remote Access settings while creating the user.
  3. Options for Access Control:
    • Use system firewall rules: Default rules set by the hosting provider will apply.
    • Allow remote connections from (specified hosts): Specify IP addresses that can access the database. These changes will be reviewed by your hosting provider before being applied.
  4. Save Changes: After configuring your access settings, save the changes.

 

Setting Up Remote Access for Microsoft SQL Server Databases (Windows)

SQL Server databases also rely on firewall rules to control remote access.

  1. For an Existing User:
    • Go to Databases > Users.
    • Select the user and go to the Remote Access group of options.
  2. For a New User:
    • Go to Databases > User Management > Add Database User.
    • Configure the Remote Access settings while creating the user.
  3. Options for Access Control:
    • Use system firewall rules: Applies the default firewall rules set by the hosting provider.
    • Allow remote connections from (specified hosts): Specify which IP addresses can access the database. This will be reviewed by the hosting provider before being implemented.
  4. Save Changes: Once you have configured the settings, save the changes.

 

 

Conclusion

By configuring remote access settings in Plesk, you can control which IP addresses are allowed to connect to your MySQL, PostgreSQL, and SQL Server databases. This flexibility enhances security by restricting access based on your specific requirements. Always consult with your hosting provider to ensure that firewall rules are appropriately set and that your changes are compatible with the existing configurations. Regularly review and update your remote access settings to maintain optimal security for your databases.

 

 

Source : www.plesk.com

Article posted on 23 February 2020 by Louis