If we are using ECS, we may need to set open ports in the security group of the service provider, and set ports in the ECS. In ECS, we can directly set the iptables command in the firewall for our commonly used Linux system, but how to set the open port in the firewall of Windows server?

Similarly, we directly call out the CMD and enter the command.
Netsh advfirewall firewall add rule name=new port protocol=TCP localport=new port dir=in action=allow
Here we can take port 8888 as an example. Run the following command at the command prompt as an administrator to open port 8888 in the Windows Firewall.
netsh advfirewall firewall add rule name=8888 protocol=TCP localport=8888 dir=in action=allow
If we need to open other ports, it is similar.
Extended reading:
one Centos 7 Firewall Open Port Method (Common Centos 7 Port Configuration Tutorial)
two Tencent ECS security group configuration allows specific ports to ensure server security