Skip to content

Commit 61796fa

Browse files
authored
Merge pull request #909 from crowdsecurity/hes-fix-integrations-size-limit
add lists size limit mgmt doc
2 parents 790d566 + b7cf56f commit 61796fa

File tree

12 files changed

+92
-4
lines changed

12 files changed

+92
-4
lines changed

crowdsec-docs/unversioned/console/service_api/integrations.md

Lines changed: 47 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,54 @@ For some constructors, the integrations can generate vendor-specific format, see
1919

2020
For all the other providers, the `plain_text` format consists of one ip per line, and should be supported by most devices. If a specific format is missing, reach out to us and we'll help you support it!
2121

22-
## Dealing with blocklist size limits
22+
## Managing integrations size limits with pagination
2323

24-
Some providers have technical limits on the number of IPs they can pull at once. That's why we recommand to monitor the number of IPS returned by the integration and use the pagination feature if needed. For this, you can use the page and page_size query parameters in the URL.
24+
Some firewalls or security devices impose strict limits on how many IP addresses can be imported or processed from an external blocklist. When a blocklist exceeds these limits, it can lead to incomplete imports or failures during updates. To address this, CrowdSec integrations support pagination, allowing you to fetch IPs in manageable chunks.
2525

26-
https://admin.api.crowdsec.net/v1/integrations/123/content?page=1&page_size=1500
26+
### Why pagination matters
2727

28-
You can then use the page parameter to get the next page of IPs.
28+
Pagination ensures that large blocklists are retrieved and processed efficiently by splitting them into smaller segments. This helps:
2929

30+
* Avoid exceeding the maximum number of entries a firewall can handle per list.
31+
* Maintain reliable updates without API timeouts.
32+
* Improve performance when synchronizing IPs from CrowdSec.
33+
34+
### How pagination works
35+
36+
You can control pagination using two query parameters in the integration API URL:
37+
38+
* `page`: The current page number (starting from 1).
39+
* `page_size`: The number of IP addresses to include per page.
40+
41+
Example request:
42+
43+
```
44+
GET https://admin.api.crowdsec.net/v1/integrations/123/content?page=1&page_size=1500
45+
```
46+
47+
* The above request retrieves the first 1,500 IPs in the list.
48+
* To fetch the next batch, increment the page parameter:
49+
50+
```
51+
GET https://admin.api.crowdsec.net/v1/integrations/123/content?page=2&page_size=1500
52+
```
53+
54+
Repeat this process until no new results are returned.
55+
56+
### Example use case (Palo Alto firewall)
57+
58+
A Palo Alto firewall may limit external dynamic lists between 50,000 and 150,000 entries depending on the model. If your CrowdSec blocklist exceeds this limit, you can set `page_size` to 50,000 and iterate through pages until all IPs are retrieved.
59+
60+
1. Start with `page=1` and `page_size=50000`.
61+
2. Add the dynamic list to the firewall.
62+
3. Increment the `page` parameter and add the new dynamic list.
63+
4. Repeat until all IPs are processed.
64+
65+
66+
### Pro Tip
67+
68+
When you know the maximum number of entries your device can handle, and you want to calculate the number of pages needed, you will also need to know the total number of IPs in your integration. You can get this information from the [integration details page](https://app.crowdsec.net/blocklists/integrations), where you can find the "Total IPs" count. Then, use the following formula:
69+
70+
```
71+
number_of_pages = ceil(total_ips / page_size)
72+
```

crowdsec-docs/unversioned/integrations/checkpoint.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,10 @@ Accessobserv2,192.168.38.188,IP,high,high,AB,C&C server IP
9898
The format is as follows: UNIQ-NAME , VALUE , TYPE , CONFIDENCE , SEVERITY , PRODUCT , COMMENT
9999
:::
100100

101+
## Manage integration size limits with pagination
102+
103+
If you want to learn how to manage integration size limits with pagination, please refer to the [Managing integrations size limits with pagination](console/service_api/integrations.md#managing-integrations-size-limits-with-pagination) section.
104+
101105
## Contribute to this documentation
102106

103107
Since CrowdSec is a community-driven project, we welcome contributions to this documentation. If you have any instructions or tips that you would like to share with the community, please feel free to open a pull request on our [GitHub repository](https://github.com/crowdsecurity/crowdsec-docs)

crowdsec-docs/unversioned/integrations/cisco.mdx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,11 @@ The CrowdSec blocklist will be in plain text format, with one IP address per lin
6161
192.168.38.186
6262
```
6363

64+
## Manage integration size limits with pagination
65+
66+
If you want to learn how to manage integration size limits with pagination, please refer to the [Managing integrations size limits with pagination](console/service_api/integrations.md#managing-integrations-size-limits-with-pagination) section.
67+
68+
6469
## Contribute to this documentation
6570

6671
Since CrowdSec is a community-driven project, we welcome contributions to this documentation. If you have any instructions or tips that you would like to share with the community, please feel free to open a pull request on our [GitHub repository](https://github.com/crowdsecurity/crowdsec-docs)

crowdsec-docs/unversioned/integrations/f5.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,10 @@ The CrowdSec blocklist will be in F5 format, with formatted data per line. Here
6363
The format is as follows: IP, Mask, WL/BL, Category
6464
:::
6565

66+
## Manage integration size limits with pagination
67+
68+
If you want to learn how to manage integration size limits with pagination, please refer to the [Managing integrations size limits with pagination](console/service_api/integrations.md#managing-integrations-size-limits-with-pagination) section.
69+
6670
## Contribute to this documentation
6771

6872
Since CrowdSec is a community-driven project, we welcome contributions to this documentation. If you have any instructions or tips that you would like to share with the community, please feel free to open a pull request on our [GitHub repository](https://github.com/crowdsecurity/crowdsec-docs)

crowdsec-docs/unversioned/integrations/fortinet.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,10 @@ The CrowdSec blocklist will be in plain text format, with one IP address per lin
6060
192.168.38.186
6161
```
6262

63+
## Manage integration size limits with pagination
64+
65+
If you want to learn how to manage integration size limits with pagination, please refer to the [Managing integrations size limits with pagination](console/service_api/integrations.md#managing-integrations-size-limits-with-pagination) section.
66+
6367
## Contribute to this documentation
6468

6569
Since CrowdSec is a community-driven project, we welcome contributions to this documentation. If you have any instructions or tips that you would like to share with the community, please feel free to open a pull request on our [GitHub repository](https://github.com/crowdsecurity/crowdsec-docs)

crowdsec-docs/unversioned/integrations/juniper.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ The CrowdSec blocklist will be in plain text format, with one IP address per lin
108108
192.168.38.186
109109
```
110110

111+
## Manage integration size limits with pagination
112+
113+
If you want to learn how to manage integration size limits with pagination, please refer to the [Managing integrations size limits with pagination](console/service_api/integrations.md#managing-integrations-size-limits-with-pagination) section.
114+
111115
## Contribute to this documentation
112116

113117
Since CrowdSec is a community-driven project, we welcome contributions to this documentation. If you have any instructions or tips that you would like to share with the community, please feel free to open a pull request on our [GitHub repository](https://github.com/crowdsecurity/crowdsec-docs)

crowdsec-docs/unversioned/integrations/mikrotik.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,10 @@ The CrowdSec blocklist will be in mikrotik format, with formatted data per line.
112112
/ip6 firewall address-list add list=crowdsec-integration address=2001:0db8:85a3::/128 comment="crowdsec/mikrotik" timeout=48h;
113113
```
114114
115+
## Manage integration size limits with pagination
116+
117+
If you want to learn how to manage integration size limits with pagination, please refer to the [Managing integrations size limits with pagination](console/service_api/integrations.md#managing-integrations-size-limits-with-pagination) section.
118+
115119
## Contribute to this documentation
116120
117121
Since CrowdSec is a community-driven project, we welcome contributions to this documentation. If you have any instructions or tips that you would like to share with the community, please feel free to open a pull request on our [GitHub repository](https://github.com/crowdsecurity/crowdsec-docs)

crowdsec-docs/unversioned/integrations/opnsense.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ The CrowdSec blocklist will be in plain text format, with one IP address per lin
7878
192.168.38.186
7979
```
8080

81+
## Manage integration size limits with pagination
82+
83+
If you want to learn how to manage integration size limits with pagination, please refer to the [Managing integrations size limits with pagination](console/service_api/integrations.md#managing-integrations-size-limits-with-pagination) section.
84+
8185
## Contribute to this documentation
8286

8387
Since CrowdSec is a community-driven project, we welcome contributions to this documentation. If you have any instructions or tips that you would like to share with the community, please feel free to open a pull request on our [GitHub repository](https://github.com/crowdsecurity/crowdsec-docs)

crowdsec-docs/unversioned/integrations/paloalto.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,10 @@ The CrowdSec blocklist will be in plain text format, with one IP address per lin
107107
192.168.38.186
108108
```
109109

110+
## Manage integration size limits with pagination
111+
112+
If you want to learn how to manage integration size limits with pagination, please refer to the [Managing integrations size limits with pagination](console/service_api/integrations.md#managing-integrations-size-limits-with-pagination) section.
113+
110114
## Contribute to this documentation
111115

112116
Since CrowdSec is a community-driven project, we welcome contributions to this documentation. If you have any instructions or tips that you would like to share with the community, please feel free to open a pull request on our [GitHub repository](https://github.com/crowdsecurity/crowdsec-docs)

crowdsec-docs/unversioned/integrations/pfsense.mdx

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ The CrowdSec blocklist will be in plain text format, with one IP address per lin
7878
192.168.38.186
7979
```
8080

81+
## Manage integration size limits with pagination
82+
83+
If you want to learn how to manage integration size limits with pagination, please refer to the [Managing integrations size limits with pagination](console/service_api/integrations.md#managing-integrations-size-limits-with-pagination) section.
84+
8185
## Contribute to this documentation
8286

8387
Since CrowdSec is a community-driven project, we welcome contributions to this documentation. If you have any instructions or tips that you would like to share with the community, please feel free to open a pull request on our [GitHub repository](https://github.com/crowdsecurity/crowdsec-docs)

0 commit comments

Comments
 (0)