[--options]
+```
+
+`command` is a positional argument and can be:
+
+| | |
+|-|-|
+|`add`|Add item(-s) from local ip-list|
+|`delete`|Remove item(-s) from local ip-list|
+|`list`|List item(-s) in local ip-list|
+
+`options` is a second positional argument and can be:
+
+| | |
+|-|-|
+|`--purpose {white,drop,captcha}`|IP List purpose can be `white` - do not block these IPs.
`drop` - deny access on the network level (DROP packets via iptables, and respond with 403 on web ports even when the request comes through a proxy).
`captcha` - deny access on the network level for all non-web ports, show a Splash Screen challenge page on web ports.
`splashscreen` - check the visitor's browser before allowing access to websites.|
+|`--expiration EXPIRATION`|Allows specifying expiration time for the listed IP (in seconds since epoch)|
+|`-comment COMMENT`|Allows to add comment to the item|
+|`--scope {local,group}`|Allows to set the scope to Global/Local. Accepts two values local (a default value, means "add IP on this server only") and group (means "add IP for the whole group in which this server is").|
+|`--full-access`|Only for the `add` command. Allows to grant full access to the IP or subnet ignoring the rules in Blocked ports.|
+|`--no-full-access`|Only for the `add` command. Allows to remove full access of the IP or subnet.|
+|`--json`|Returns data in JSON format|
+
+**Examples:**
+
+* The following commands adds IP 1.2.3.4 to the White List with a comment “one good ip”:
+```
+imunify360-agent ip-list local add --purpose white 11.22.33.44 --comment "one good IP"
+OK
+```
+
+* To check whether specific IP address is in the list, you can run the following command (where 11.22.33.44 is that specific IP address):
+
+```
+imunify360-agent ip-list local list --purpose white --by-ip 11.22.33.44
+AUTO_WHITELISTED COMMENT COUNTRY CTIME DEEP EXPIRATION FULL_ACCESS IMPORTED_FROM IP MANUAL NETMASK NETWORK_ADDRESS PURPOSE SCOPE VERSION
+False one good IP US 1715940270 None 0 None None 11.22.33.44 True 4294967295 185999660 white local 4
+```
+
+* The following command returns a list of IPs in the White List which are from United States:
+```
+imunify360-agent ip-list local list --by-country-code US
+```
+
+* The following command adds an IP 1.2.3.4 to the White List and sets the scope to group:
+```
+imunify360-agent ip-list local add --purpose white 1.2.3.4 --scope group
+OK
+```
+
+* To whitelist multiple IP addresses, put them into a file and add to the white list as follows:
+
+```
+cat list.txt | xargs -n 1 imunify360-agent ip-list local add --purpose white
+```
+
+The alternative would be using the [external white/black list feature](https://docs.imunify360.com/features/#external-black-whitelist-management).
+
+* For the following example, the old whitelist command syntax is used:
+ * The following command adds Bolivia to the White List (available commands `whitelist country add`/`delete`/`edit`/`list`):
+```
+imunify360-agent whitelist country add BO
+OK
+```
+
+ * The following command adds domain with a name example.com to the White List (available commands: `add`/`delete`/`list`/`reset-to`):
+
+```
+imunify360-agent whitelist domain add example.com
+OK
+```
+
## Login
@@ -2409,181 +2498,6 @@ imunify360-agent version [--json]
-## Whitelist
-
-This command allows to view or edit actual IPs and domains in the White List.
-
-**Usage:**
-
-
-
-```
-imunify360-agent whitelist [subject] [command] [--option]
-```
-
-
-
-`subject` is a positional argument and can be:
-
-| | |
-|-|-|
-|`ip`|Allows to manipulate with IPs in the White List.|
-|`domain`|Allows to manipulate with domains in the White List.|
-|`country`|Allows to manipulate with countries in the White List.|
-
-:::warning Note
-A domain whitelisting will affect only greylisted IPs. It will not affect ModSecurity rules and blacklisted IPs.
-:::
-
-`command` is a second positional argument and can be:
-
-| | |
-|-|-|
-|`add`|Add item(-s) to the White List.|
-|`delete`|Remove item(-s) from the White List.|
-|`move`|Move item(-s) to the White List.|
-|`edit`|Edit TTL, comment and other parameters of the Whitelisted item.|
-|`list`|List items(-s) in the White List.|
-|`reset-to`|Replace whitelisted domains list with a new list.|
-
-Please note that by default `list` command outputs only first 100 items in the list as if it was run as `imunify360-agent whitelist ip list --limit 100`.
-To check whether specific IP address is in the list, you can run the following command:
-
-
-
-```
-imunify360-agent whitelist ip list --by-ip 12.34.56.78
-```
-
-
-
-where `12.34.56.78` is that specific IP address.
-
-`value` is an item to manipulate with. It can be IP itself or a country code (find the necessary country codes in [CIDR notation](https://en.wikipedia.org/wiki/Classless_Inter-Domain_Routing#IPv4_CIDR_blocks) in ISO ALPHA-2 CODE column), or a domain name.
-
-`option` can be one or few of the optional arguments from the table above and one more:
-
-| | |
-|-|-|
-|`--comment`|Allows to add a comment to the item.|
-|`--full-access`|Only for `move` and `edit` commands.
Allows to grant full access to the IP or subnet ignoring the rules in Blocked ports.|
-|`--no-full-access`|Only for `move` and `edit` commands.
Allows to remove full access of the IP or subnet.|
-|`--expiration`|Allows specifying TTL for the whitelisted IP (in seconds since epoch).|
-|`--scope`|Allows to set the scope to _Global/Local_. Accepts two values: `local` (a default value, means "add IP on this server only") and `group` (means "add IP for the whole group in which this server is").|
-
-**Examples:**
-
-1. The following commands adds IP `1.2.3.4` to the White List with a comment “one good ip”:
-
-
-
- ```
- imunify360-agent whitelist ip add 1.2.3.4 --comment "one good ip"
- OK
- ```
-
-
-
-2. The following command returns a list of IPs in the White List which are from Bolivia:
-
-
-
- ```
- imunify360-agent whitelist --by-country-code BO
- ```
-
-
-
-3. The following command adds domain with a name `example.com` to the White List:
-
-
-
- ```
- imunify360-agent whitelist domain add example.com
- OK
- ```
-
-
-
-4. The following command checks domains in the White List:
-
-
-
- ```
- imunify360-agent whitelist domain list
- OK
- ```
-
-
-
-5. The following command adds an IP 1.2.3.4 to the White List and sets the scope to `group`:
-
-
-
- ```
- imunify360-agent whitelist ip add 1.2.3.4 --scope group
- OK
- ```
-
-
-
-6. The following command adds Bolivia to the White List:
-
-
-
- ```
- imunify360-agent whitelist country add BO
- OK
- ```
-
-
-
-7. The `--json` key can be used to get additional details about the IP address. For example, whether it has full access on the server or has just been added to a whitelist:
-
-
-
- ```
- imunify360-agent whitelist ip list --by-ip 1.2.3.4 -v --json
- ...
- {
- "auto_whitelisted": false,
- "comment": "Manually added on 2022-09-05 05:16:54",
- "country": {
- "code": "US",
- "id": "1234001",
- "name": "United States"
- },
- "ctime": 1662355015,
- "deep": null,
- "expiration": 0,
- "full_access": true,
- "imported_from": null,
- "ip": "1.2.3.4",
- "listname": "WHITE",
- "manual": true,
- "netmask": 1234967295,
- "network_address": 123495478,
- "scope": "local",
- "version": 4
- }
- ...
- ```
-
-
-
-To whitelist multiple IP addresses, put them into a file and add to the white list as follows:
-
-
-
-```
-cat list.txt | xargs -n 1 imunify360-agent whitelist ip add
-```
-
-
-
-The alternative would be using the [external white/black list feature](/features/#external-black-whitelist-management).
-
-
## Whitelisted crawlers