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
Log on to the Anti-DDoS Proxy console.
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.
In the left-side navigation pane, choose Provisioning > Port Config.
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.
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.
(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.
| Field | Description | Example |
|---|---|---|
| 1 | Forwarding protocol | tcp |
| 2 | Forwarding port | 8001 |
| 3 | Origin server port | 8888 |
| 4 | Origin server IP address | 118.178.XX.XX |
Example:
tcp 8001 8888 118.178.XX.XX
tcp 8002 8888 118.178.XX.XX
tcp 8003 8888 118.178.XX.XXFor 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.
| Field | Description | Example |
|---|---|---|
| 1 | Forwarding port | 8003 |
| 2 | Forwarding protocol | tcp |
| 3 | Session persistence timeout in seconds (0 = disabled) | 900 |
| 4 | Health check type (blank = disabled) | tcp |
| 5 | Health check port | 8003 |
| 6 | Health check timeout in seconds | 5 |
| 7 | Health check interval in seconds | 15 |
| 8 | Threshold at which a port is declared unhealthy | 3 |
| 9 | Threshold at which a port is declared healthy | 3 |
| 10 | Health check path (HTTP only) | — |
| 11 | Domain name (HTTP only) | — |
Example:
8001 tcp 0
8002 tcp 0
8003 tcp 900 tcp 8003 5 15 3 3For 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.
| Field | Description | Example |
|---|---|---|
| 1 | Forwarding port | 8001 |
| 2 | Forwarding protocol | tcp |
| 3 | Maximum new connections per source IP | 20000 |
| 4 | Maximum concurrent connections per source IP | 50000 |
| 5 | Maximum new connections per destination IP | 100000 |
| 6 | Maximum concurrent connections per destination IP | 0 |
| 7 | Minimum packet length | 0 |
| 8 | Maximum packet length | 6000 |
| 9 | False Source (on/off; TCP only) | on |
| 10 | Empty 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 offFor more information, see Create multiple anti-DDoS protection policies.