- Created by Documentation, last modified on Apr 09, 2018
disable_authentication_provider
disable_failing_authentication_providers
enable_authentication_provider
get_available_authentication_providers
get_provider_client_configurations
get_provider_configuration_fields
get_provider_display_configurations
get_users_authn_linked_accounts
set_provider_client_configurations
set_provider_display_configurations
twofactorauth_generate_tfa_config
twofactorauth_get_user_configs
cpgreylist_is_server_netblock_trusted
cpgreylist_list_entries_for_common_mail_provider
cpgreylist_load_common_mail_providers_config
cpgreylist_save_common_mail_providers_config
cpgreylist_trust_entries_for_common_mail_provider
cpgreylist_untrust_entries_for_common_mail_provider
create_cpgreylist_trusted_host
delete_cpgreylist_trusted_host
Description
This function returns cPHulk's current settings.
Examples
https://hostname.example.com:2087/cpsess##########/json-api/load_cphulk_config?api.version=1
https://hostname.example.com:2087/cpsess##########/xml-api/load_cphulk_config?api.version=1
whmapi1 load_cphulk_config
Notes:
- You must URI-encode values.
- For more information and additional output options, read our Guide to WHM API 1 documentation or run the
whmapi1 --help
command. If you run CloudLinux™, you must use the full path of the
whmapi1
command:/usr/local/cpanel/bin/whmapi1
{ "data": { "cphulk_config": { "is_enabled": 1, "ip_brute_force_period_mins": 15, "max_failures": 15, "brute_force_period_sec": 300, "lookback_period_min": 360, "mark_as_brute": 30, "ip_brute_force_period_sec": 900, "lookback_time": 21600, "brute_force_period_mins": 5, "notify_on_brute": "0", "notify_on_root_login": 0, "max_failures_byip": 5 } }, "metadata": { "version": 1, "reason": "OK", "result": 1, "command": "load_cphulk_config" } }
<result> <data> <cphulk_config> <is_enabled>1</is_enabled> <ip_brute_force_period_mins>15</ip_brute_force_period_mins> <max_failures>15</max_failures> <brute_force_period_sec>300</brute_force_period_sec> <lookback_period_min>360</lookback_period_min> <mark_as_brute>30</mark_as_brute> <ip_brute_force_period_sec>900</ip_brute_force_period_sec> <lookback_time>21600</lookback_time> <brute_force_period_mins>5</brute_force_period_mins> <notify_on_brute>0</notify_on_brute> <notify_on_root_login>0</notify_on_root_login> <max_failures_byip>5</max_failures_byip> </cphulk_config> </data> <metadata> <version>1</version> <reason>OK</reason> <result>1</result> <command>load_cphulk_config</command> </metadata> </result>
Note:
Parameters
This function does not accept parameters.
Returns
Return | Type | Description | Possible values | Example |
---|---|---|---|---|
is_enabled | Boolean | Whether the cPHulk service is enabled. |
| 1 |
ip_brute_force_period_mins | integer | The number of minutes during which cPHulk measures an attacker's login attempts. | A valid integer, measured in minutes. | 15 |
ip_brute_force_period_sec | integer | The number of seconds during which cPHulk measures an attacker's login attempts. | A valid integer, measured in seconds. | 300 |
brute_force_period_mins | integer | The number of minutes during which cPHulk measures all login attempts to a specific user's account. | A valid integer, measured in minutes. | 5 |
brute_force_period_sec | integer | The number of seconds over which cPHulk measures all login attempts to a specific user's account. | A valid integer, measured in seconds. | 360 |
max_failures | integer | The maximum number of failures that cPHulk will allow per account within the defined time range. | A valid integer. | 30 |
max_failures_byip | integer | The maximum number of failures that cPHulk will allow per account from a specific IP address within the defined time range. | A valid integer. | 5 |
mark_as_brute | integer | The maximum number of failures that cPHulk will allow per account from a specific IP address before the system locks out that address for two weeks. | A valid integer. | 30 |
lookback_period_min | integer | The number of minutes during which cPHulk counts failed logins against a user. | A valid integer. | 360 |
lookback_time | integer | The number of seconds during which cPHulk counts failed logins against a user. | A valid integer. | 21600 |
notify_on_brute | Boolean | Whether cPHulk will send a notification when it detects a brute force attack. |
| 1 |
notify_on_root_login | Boolean | Whether cPHulk will send a notification when the root user successfully logs in from an IP address that is not on the whitelist. |
| 1 |
Function information
API Version:
Available in:
WHM 11.48+
Methods:
GET, POST
Required Parameters:
Return Formats:
About WHM API 1
WHM API 1 performs functions and accesses data in WHM.
Notes:
- Some functions and parameters may require that you authenticate as the
root
user. - You must use the appropriate WHM ports (
2086
or2087
) to call WHM API functions.
Find a function
Related functions
-
Page:WHM API 1 Sections - cPHulk — cPHulk functions allow you to manage your cPHulk settings.
-
Page:WHM API 1 Functions - cphulk_status — This function returns the status of the cPHulk service.
-
Page:WHM API 1 Functions - create_cphulk_record — This function adds a new record or records to cPHulk's whitelist or blacklist.
-
Page:WHM API 1 Functions - delete_cphulk_record — This function deletes a record or records from cPHulk's whitelist or blacklist.
-
Page:WHM API 1 Functions - disable_cphulk — This function disables the cPHulk service.