Applicable to:
- Plesk for Linux
- Plesk for Windows
Symptoms
It is not possible to log in to Plesk as a Plesk administrator with the following message:
PLESK_ERROR: Access for administrator from address 203.0.113.2 is restricted in accordance with IP Access restriction policy currently applied.
Cause
The current Plesk IP access policy does not allow to log in from a particular IP address.
This setting is configured in Plesk at Tools & Settings > Restrict Administrative Access.
Resolution
Apply one of the following solutions:
-
Connect to the Plesk server via SSH (Plesk on Linux) / RDP (Plesk for Windows Server).
-
Access the Plesk database (on Windows Server use command prompt as an Administrator):
# plesk db "INSERT INTO cp_access (type, netaddr, netmask) VALUES ('deny' , '203.0.113.2', '255.255.255.255')"
- where 203.0.113.2 - the IP address of a device from which you are accessing Plesk
-
For Plesk on Linux
-
Connect to the Plesk server via SSH.
-
For security reasons, create a dump of the Plesk database.
-
Clear the access policy settings:
3.1. Remove all records from the "cp_access" table:
# plesk db "DELETE FROM cp_access"
3.2. Set the policy to allow:
# plesk db "UPDATE misc SET val='allow' WHERE param='access_policy'"
-
-
For Plesk on Windows
-
Connect to the Plesk server via RDP and start a command prompt as an Administrator.
-
For security reasons, create a dump of the Plesk database.
-
Clear the access policy settings:
3.1. Remove all records from the "cp_access" table:
C:\> plesk db "DELETE FROM cp_access"
3.2. Set the policy to allow:
C:\> plesk db "UPDATE misc SET val='allow' WHERE param='access_policy'"
-
Comments
11 comments
Thanks a lot...!!!
where to enter those mentioned script in Windows Server 2012 i used ? Is t thru DOS command, or Windows Explorer or the other ? Am using Plesk 17.5.3 with Windows Server 2012. Please bright me up. Thank you Integrator
Hi @Orange Look,
In order to execute those command on a Windows server, you need to login to the server over RDP and open CMD (Command Prompt). You may search world-wide how to open CMD on Windows, but I also inserted instructions for you in this article above.
Privet Yulia!
[vopros ot chajnika ;) ] How do I "...log into the Plesk UI locally"? (Linux server, Windows 7 on my laptop, if that helps)
...I tried following instructions for connecting using SSH with Putty and that didn't work (fatal error, connection time out)
Spasibo OGROMNOE
@Alex Kozak
Привет Алекс! Под Plesk UI подразумевается логин в панель в браузере: это интерфейс Plesk. Для этого используется следующий адрес: https://10.10.10.10:8443 (замените 10.10.10.10 на реальный серверный IP адрес или на хостнейм). Подробности смотрите здесь:
https://docs.plesk.com/en-US/onyx/administrator-guide/about-plesk/logging-in-to-plesk-for-the-first-time.74769/
https://support.plesk.com/hc/en-us/articles/115003241249-How-to-access-enter-Plesk-Control-Panel-
Но эта статья посвящена тому, когда выдается ошибка при попытке логина на https://10.10.10.10:8443. В данном случае, нужно залогиниться на сам сервер, где установлен Plesk: нужно зайти под пользователем root. Информация про то, как логиниться на сервер через SSH доступна здесь: https://support.plesk.com/hc/en-us/articles/115000172834
Если Вы не можете войти по SSH на сервер, обратитесь к Вашему провайдеру или владельцу сервера: сторона, предоставившая Вам доатсуп в Plesk также может подсказать как правильно логиниться по пользователем root на сервер.
Personally, I do not like this solution. Plesk should get rid of the plesk utility directory logic. With a serious redesign, you would not need to write the documentation for both, Windows and Linux architectures. IMHO, it should be something like this:
[root@plesk ~]# plesk admin --add-allowed-ip 192.168.1.1
C:\Users\jouni> plesk admin --add-allowed-ip 192.168.1.1
PS C:\Users\jouni> plesk admin --add-allowed-ip 192.168.1.1
@Jouni Kivilahti
Hi!
Thank you for the feedback. We are doing our best to constantly improve Plesk.
Please, create a feature suggestion at Plesk User Voice. The top-ranked suggestions are likely to be included in the next versions of Plesk.
Hello Rober MS
In case you're Plesk server owner, it's required to contact the company, providing the server, to enable SSH for you.
Hey all!
Running Plesk Obsidian 18.0.27 Update 1.
Worked for me, depsite logical irrelevance with 'deny' key value in request
plesk db "INSERT INTO cp_access (type, netaddr, netmask) VALUES ('deny' , '203.0.113.2', '255.255.255.255')"
Thanks!
Hello,
I create a simple shell script to turn easy these steps. Because in Covid period we have some collaborators accessing Plesk Admin from different location. So this script help us to solve this. So if anybody need, I'm sharing the script below:
To use this script, just create a ipplesk file with the content above in /usr/sbin and run chmod +x /usr/sbin/ipplesk
After that, you can run ipplesk -a [IP] from any directory.
PS.: Some improvement to validate parameters could be a good thing if you have newbies in your team. So change the script as you wish. :D
Hello Eduardo Broering
Thank you for sharing!
Indeed, it may be useful for other Pleskians.
Please sign in to leave a comment.