This function blocks IP addresses from accessing the domains on a cPanel account.
Important
When you disable the Web Server role, the system disables this function.
uapi --output=jsonpretty \ --user=username \ BlockIP \ add_ip \ ip='192.168.0.1/16'
{- "apiversion": 3,
- "func": "add_ip",
- "module": "BlockIP",
- "result": {
- "data": [
- "1.1.1.1"
], - "errors": null,
- "messages": null,
- "metadata": {
- "transformed": 1
}, - "status": 1,
- "warnings": null
}
}