All Products
Search
Document Center

Anti-DDoS:Export multiple port configurations at a time

Last Updated:Mar 31, 2026

Export port configurations from an Anti-DDoS Pro or Anti-DDoS Premium instance as a TXT file. You can export forwarding rules, session and health check settings, and mitigation policies. The exported file format matches the import format, so you can use it directly for bulk imports.

Export port configurations

  1. Log on to the Anti-DDoS Proxy console.

  2. In the top navigation bar, select the region of your instance.

    • Anti-DDoS Proxy (Chinese Mainland): Select Chinese Mainland.

    • Anti-DDoS Proxy (Outside Chinese Mainland): Select Outside Chinese Mainland.

  3. In the left-side navigation pane, choose Provisioning > Port Config.

  4. On the Port Config page, select the instance to manage. In the lower part of the rule list, click Batch Export and choose one of the following options:

    • Export Rule: Exports forwarding rules.

    • Export Session and Health Check Settings: Exports session persistence and health check configurations.

    • Export Mitigation Policy: Exports mitigation policies.

  5. Click OK. In the upper-right corner of the Port Config page, click Tasks. In the Tasks panel, wait for the export task to complete. After the task is complete, click Download in the Actions column to save the file to your computer.

    If the task is in the Pending state, wait until the status changes before proceeding.
  6. (Optional) To remove a task you no longer need, find it in the Tasks panel and click Delete in the Actions column.

Exported file format

All exported files are in TXT format, with one rule per row. The field order and meaning vary by file type.

The exported file name starts with DDoSCoo_ for Anti-DDoS Proxy (Chinese Mainland) instances and DDoSDip_ for Anti-DDoS Proxy (Outside Chinese Mainland) instances. Both file types use the same format.

Forwarding rule files

Each row contains four space-separated fields.

FieldDescriptionExample
1Forwarding protocoltcp
2Forwarding port8001
3Origin server port8888
4Origin server IP address118.178.XX.XX

Example:

tcp 8001 8888 118.178.XX.XX
tcp 8002 8888 118.178.XX.XX
tcp 8003 8888 118.178.XX.XX

For more information, see Manage forwarding rules.

Session and health check settings files

Each row contains up to 11 space-separated fields. If session persistence is disabled, field 3 is 0. If health check is disabled, field 4 is blank and fields 5–11 are omitted. Fields 10 and 11 apply only to HTTP-based health checks.

FieldDescriptionExample
1Forwarding port8003
2Forwarding protocoltcp
3Session persistence timeout in seconds (0 = disabled)900
4Health check type (blank = disabled)tcp
5Health check port8003
6Health check timeout in seconds5
7Health check interval in seconds15
8Threshold at which a port is declared unhealthy3
9Threshold at which a port is declared healthy3
10Health check path (HTTP only)
11Domain name (HTTP only)

Example:

8001 tcp 0
8002 tcp 0
8003 tcp 900 tcp 8003 5 15 3 3

For more information, see Configure session persistence and Configure a health check.

Mitigation policy files

Each row contains 10 space-separated fields. Fields 9 and 10 (False Source and Empty Connection) apply only when the forwarding protocol is TCP. You must enable False Source before you can enable Empty Connection.

FieldDescriptionExample
1Forwarding port8001
2Forwarding protocoltcp
3Maximum new connections per source IP20000
4Maximum concurrent connections per source IP50000
5Maximum new connections per destination IP100000
6Maximum concurrent connections per destination IP0
7Minimum packet length0
8Maximum packet length6000
9False Source (on/off; TCP only)on
10Empty Connection (on/off; TCP only; requires False Source = on)off

Example:

8001 tcp 20000 50000 100000 0 0 6000 on off
8002 tcp 0 0 100000 0 0 6000 on on
8003 tcp 0 0 100000 0 0 6000 on off

For more information, see Create multiple anti-DDoS protection policies.