Add Protocol Blocking
Updated at:2025-10-16
Description
- Apply protocol blocking for the protection IPs in TBSP.
- Supported blocking protocol types include ICMP, TCP, and UDP. ICMP does not require start or end port values, but the other protocol types require specifying ports (multiple port ranges are allowed).
- Port range for blocking: 0-65,535 (excluding 0). The starting port should not exceed the ending port, and overlapping ranges are not allowed.
Request structure
Plain Text
1POST /v{version}/tbsp/{id}/protocolBlocking?clientToken={clientToken} HTTP/1.1
2Host: eip.bj.baidubce.com
3Authorization: authorization string
4{
5 "ip": ip,
6 "protocolPortList": protocolPortList
7}
Request headers
No additional headers required beyond standard ones.
Request parameters
| Parameter name | Types | Required or not | Parameter location | Description |
|---|---|---|---|---|
| version | String | Yes | URL parameter | API version number, current value is 1. |
| id | String | Yes | URL parameter | ID of the TBSP |
| clientToken | String | Yes | Query | Idempotence token, for details, refer to [Idempotence](EIP/API Reference/General Description.md#Idempotence) |
| ip | String | Yes | RequestBody | IP address of TBSP protection object |
| protocolPortList | List<[ProtocolPortModel](EIP/API Reference/Appendix 1.md#ProtocolPortModel)> | Yes | RequestBody | List of ports blocked by protocol |
Response headers
No special headers are required beyond the standard ones.
Response parameters
No special response parameters are available.
Request example
Java
1POST /v1/tbsp/ipDdos-f294b1c9/protocolBlocking?clientToken=be31b98c-5e41-4838-9830-9be700de5a20 HTTP/1.1
2Host: eip.bj.baidubce.com
3Authorization:bce-auth-v1/a43eea003308400587496785f7f5d9ee/2022-04-28T11:06:00Z/3600/host;x-bce-date/25ec3d4baba54ad7397cb31c96cb5e364088ff79f9b853ffb8dc6c11ebcdcf16
4{
5 "ip": "100.88.15.226",
6 "protocolPortList": [
7 {
8 "type": "icmp"
9 },
10 {
11 "type": "udp",
12 "portBegin": 80,
13 "portEnd": 80
14 },
15 {
16 "type": "udp",
17 "portBegin": 90,
18 "portEnd": 1000
19 },
20 {
21 "type": "tcp",
22 "portBegin": 80,
23 "portEnd": 80
24 },
25 {
26 "type": "tcp",
27 "portBegin": 90,
28 "portEnd": 1000
29 }
30 ]
31}
Response example
Java
1HTTP/1.1 200 OK
2Server: nginx/1.19.0
3Date: Thu, 28 Apr 2022 11:06:00 GMT
4Content-Type: application/json; charset=UTF-8
5X-Bce-Request-Id: 36a6324a-7b10-4736-8872-4c29be8ef854
