- Plesk Onyx
How to restrict administrative access via command-line interface?
It is possible to send SQL queries using plesk db cli-utility:
Run the following commands. They work for both Linux and Windows:
To choose default IP Access Restriction policy:
# plesk db "INSERT INTO misc (param,val) VALUES ('access_policy','deny')"
To allow access from 203.0.113.2 IP address among with 203.0.113.0/24 network and deny from the others:
# plesk db "INSERT INTO cp_access (type, netaddr, netmask) VALUES ('deny', '203.0.113.2', '255.255.255.0')"
where 203.0.113.2 is the IP address of the computer Plesk is being accessed from.
You can vote for the feature to be implemented as a separate CLI feature on our UserVoice portal.