Anti-DDoS Proxy captures traffic to provide packet and session details for attack analysis and troubleshooting. Create a manual packet capture task to capture traffic immediately and generate a PCAP file, and then analyze the file to configure mitigation policies in a targeted manner. This topic describes how to create a packet capture task.
Packet capture scope
Packet capture covers the traffic between client IP addresses and Anti-DDoS Proxy IP addresses. It does not include the traffic between Anti-DDoS Proxy IP addresses and origin servers. However, if a client IP address belongs to an Alibaba Cloud resource, the traffic from that client is not captured.
Anti-DDoS Proxy (Chinese Mainland): All instances support packet capture. Packet capture is performed at scrubbing centers in the Chinese mainland.
NoteFor China Telecom (Shenzhen), the captured data is post-scrubbing data and does not include pre-scrubbing data.
Anti-DDoS Proxy (Outside Chinese Mainland):
Insurance and Unlimited: Packet capture is performed at scrubbing centers outside the Chinese mainland.
Chinese Mainland Acceleration: Packet capture is supported only in the China (Hong Kong) region.
Sec-CMA 2.0: Packet capture is supported only in the China (Hong Kong) region, and only post-scrubbing traffic from upstream carrier protection is captured.
Considerations
Sampling ratio: The default sampling ratio is 1:1. Lower traffic volume results in higher sampling accuracy. When traffic volume is extremely high, packet capture automatically switches to sampled capture, and the sampling ratio increases with the traffic volume.
Packet size limit: For regions in the Chinese mainland, the data packets of each packet capture task cannot exceed 300 MB. For regions outside the Chinese mainland, the data packets of each packet capture task cannot exceed 100 MB. When the limit is exceeded, packet capture stops and the packet file is generated immediately.
Packet capture task limit: Each Alibaba Cloud account can create up to 50 packet capture tasks per calendar month.
Captured file limit: Each Alibaba Cloud account can store up to 20 captured files at a time. If you exceed this limit, delete older captured files first.
Captured file retention period: Captured files are retained for a maximum of 30 days and are then automatically deleted.
Expired Anti-DDoS Proxy instances: Packet capture tasks are marked as Invalid, and released instances do not support packet capture.
Cross-border packet capture: Packet capture may fail when a client outside the Chinese mainland accesses an Anti-DDoS Proxy IP address in the Chinese mainland, or when a client in the Chinese mainland accesses an Anti-DDoS Proxy IP address outside the Chinese mainland.
Create a packet capture task
Enable packet capture analysis.
The first time you access the Packet Capture page, click Authorize to allow captured files to be stored in the shared resource pool of OSS.
Create a packet capture task.
On the Packet Capture Task tab, click Create Packet Capture Task.
NoteOnly one manual packet capture task can run at a time.
Parameter
Description
Task Type
Manual packet capture: The capture starts after the packet capture task is created.
Protocol Type
Valid values: TCP, UDP, ICMP, and ALL. Default value: ALL.
Destination IP Address
The IP address of the Anti-DDoS Proxy instance.
Packet capture is not supported on Sec-CMA lines. Therefore, you cannot select the IP addresses of instances on these lines.
Destination Port
Valid values: 0 to 65535. A value of 0 indicates all ports.
Source IP Address
IP addresses and IP masks are supported. An asterisk (*) indicates all IP addresses.
Source Port
Valid values: 0 to 65535. A value of 0 indicates all ports.
Packet Capture Duration
Valid values: 5 to 60. Unit: seconds.
Packet Capture Direction
Bidirectional: all requests between the client IP address and the Anti-DDoS Proxy IP address.
Outbound: requests sent from the Anti-DDoS Proxy IP address to the client IP address.
Inbound: requests sent from the client IP address to the Anti-DDoS Proxy IP address.
In the packet capture task list, in the Actions column, click Packet Capture File to download or delete the file.
When you download files, each Anti-DDoS Proxy (Chinese Mainland) task corresponds to one captured file. For Anti-DDoS Proxy (Outside Chinese Mainland), data is stored at each scrubbing center after a packet capture task is issued, so each task corresponds to nine captured files. You can identify the region from the captured file name.
If no data is generated in a region during packet capture, no captured file for that region is available for download.
Downloading a captured file pulls data from the local scrubbing center, which may involve cross-border data transfer. A cross-border transfer can extend the download time. The following table describes the mapping between file names and regions:
Region
Field in the file name
China (Hong Kong)
cn-hongkong
Singapore
ap-southeast-1
Japan
ap-northeast-1
US (Silicon Valley)
us-east-1
US (Virginia)
us-west-1
Germany (Frankfurt)
eu-central-1
UK (London)
eu-west-1
Indonesia
ap-southeast-5
Malaysia
ap-southeast-3
(Optional) Click Issue Again to create a new packet capture task.
FAQ
Are the IP addresses recorded in a captured file the real attack source IP addresses?
The source IP addresses recorded in a DDoS attack capture file (PCAP file) are usually not the real attacker IP addresses. Attack traffic mostly comes from compromised hosts (botnets) or uses spoofed source IP addresses. Therefore, you cannot trace the real attack source directly from the captured file. Use captured data to analyze attack types and traffic characteristics rather than to trace the attacker identity.
What do I do if downloading a captured file fails or the file cannot be downloaded?
Check the following possible causes:
No packet capture task ran during the corresponding time period, or the task did not generate a file.
The Anti-DDoS Proxy instance has expired, the packet capture task is marked as Invalid, and released instances do not support downloads.
Packet capture failed in a cross-border scenario, and no captured file was generated.
The trigger conditions for automatic packet capture were not met (no transport-layer volumetric attack or non-web application-layer attack occurred), so the automatic packet capture task was not triggered.
What's next
View the operation logs of packet capture tasks. For instructions, see Operation logs.
Analyze captured files and configure mitigation policies in a targeted manner to improve protection. For details, see Protection settings.