Module: ip#
block ip IPRANGE
unblock ip IPRANGE
IPRANGE can be a single address, a CDIR, or a hostname. See: https://api.docs.cpanel.net/openapi/cpanel/operation/blockip-add-ip/ for a list of supported formats.
For a list of currently blocked IP ranges, you can use:
Example
$ cpanel cat file /public_html/.htaccess | grep 'deny from'
COMMANDS
block ip IPRANGE
Block a range of IP addresses from accessing your account’s hosts.
Example
$ cpanel block ip 192.168.0.1-192.168.0.58
unblock ip IPRANGE
Allow a range of IP addresses access to your account’s hosts.
Example
$ cpanel unblock ip 192.168.0.1-192.168.0.58