Methods for opening ports

From the control panel, go to the Windows Defender firewall



Click Advanced Settings, click inbound Rules



Click the New rule on the right, click port, and click Next

Select the protocol type and port number and click Next

You can check whether the port is opened successfully by:

Go to Task Manager, click Performance, and then click on the lower right to open Resource Monitor



Select network, click Listening port, and check whether the port is opened by firewall in firewall status