Anti-DDoS Proxy port configurations support batch export. You can export all port forwarding rules (manually added rules only), session and health check settings, and DDoS mitigation policies of an Anti-DDoS Proxy instance as TXT files and download the files to your computer. The exported configurations use the same format as the configurations that you add in batches. This topic describes how to export the port-related configurations of Anti-DDoS Proxy in batches.
Procedure
Log on to the Anti-DDoS Proxy console.
In the top navigation bar, select the region of your instance.
Anti-DDoS Proxy (Chinese Mainland): Choose the Chinese Mainland region.
Anti-DDoS Proxy (Outside Chinese Mainland): Choose the Outside Chinese Mainland region.
In the left-side navigation pane, choose .
On the Port Config page, select the Anti-DDoS Proxy instance that you want to manage. In the lower part of the port forwarding rule list, choose , , or to submit the corresponding export task.
Click OK. In the upper-right corner of the page, click Tasks, wait for the export task to complete, and then click Download to save the exported file to your computer.
NoteIf the current task is in the Pending state, wait until the export task is complete.
After the download is complete, you can open the downloaded TXT file to view the rules or configurations. For more information about the format of the configurations in the TXT file, see Exported file format.
(Optional) On the Tasks page, find the task that you no longer need and click Delete.
Exported file format
All exported files are in TXT format. The format of the exported content varies depending on the type of batch export, as described in the following list.
If you use Anti-DDoS Proxy (Chinese Mainland), the name of the exported file starts with DDoSCoo_. If you use Anti-DDoS Proxy (Outside Chinese Mainland), the name of the exported file starts with DDoSDip_. The formats of the files exported from the Anti-DDoS Proxy (Chinese Mainland) and Anti-DDoS Proxy (Outside Chinese Mainland) consoles are the same.
Rule file
Each line corresponds to one port forwarding rule, and each rule contains four fields. From left to right, they are the protocol, forwarding port, origin server port, and origin server IP address. For more information, see Configure port forwarding rules.
tcp 8001 8888 118.178.XX.XX tcp 8002 8888 118.178.XX.XX tcp 8003 8888 118.178.XX.XXSession and health check settings file
Each line corresponds to the configuration of one rule. From left to right, each configuration contains the following fields: forwarding protocol port, forwarding protocol, session persistence timeout period, health check type, health check port, health check timeout period, health check interval, unhealthy threshold, healthy threshold, health check path, and domain name. A session persistence timeout period of 0 indicates that session persistence is disabled. An empty health check type indicates that the health check is disabled and that all subsequent fields are empty. The health check path and domain name fields are available only for the HTTP type. For more information, see Configure session persistence and Configure health checks.
8001 tcp 0 8002 tcp 0 8003 tcp 900 tcp 8003 5 15 3 3DDoS mitigation policy file
Each line corresponds to the configuration of one rule. From left to right, each configuration contains the following fields: forwarding protocol port, forwarding protocol, maximum new connections per source IP address, maximum concurrent connections per source IP address, maximum new connections per destination IP address, maximum concurrent connections per destination IP address, minimum packet length, maximum packet length, and False Source and Empty Connection. False Source and Empty Connection take effect only for the TCP protocol. You must enable False Source before you enable Empty Connection. For more information, see Add DDoS mitigation policies in batches.
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