kb: how-to
Plesk for Linux
Question
How to restrict access to webmail.example.com for all IP except one?
Answer
- Connect to the server via SSH
-
Create a custom template directory if it doesn't exist.
# mkdir -p /usr/local/psa/admin/conf/templates/custom/webmail
-
Copy the Roundcube template
# cp -a /usr/local/psa/admin/conf/templates/default/webmail/nginxWebmailPartial.php /usr/local/psa/admin/conf/templates/custom/webmail/nginxWebmailPartial.php
-
Open the template
/usr/local/psa/admin/conf/templates/custom/webmail/nginxWebmailPartial.phpand add inside the block "server {}":CONFIG_TEXT: allow 203.0.113.10;
allow 198.51.100.20;
allow 192.168.10.0/24;
allow 2001:db8:1234::/64;
deny all; -
Rebuild configurations:
# /usr/local/psa/admin/bin/httpdmng --reconfigure-all
Comments
Please sign in to leave a comment.