Home > Article > Operation and Maintenance > How to configure the firewall for remote connections to Windows instances
Overview
This article mainly introduces how to configure the remote connection firewall of Windows instances.
Details
#In order to improve the security of remote connection instances, it is recommended that you enable and configure the firewall. We provide you with the following Two options for configuring the remote connection firewall.
#Add port rule
#Add predefined Rules
Add port rules
Allow remote connections by allowing the local remote desktop port. The default port of the remote server is port 3389 of the TCP protocol.
Tip: In the inbound rules of the firewall, if the port set is inconsistent with the port set by the remote server, remote access to the server will not be successful. Once this happens, you can also add the actual port of the remote service to the firewall's inbound rules via this method.
1. Log in to the Windows instance. For how to log in, see Connecting to the Windows Instance on a Local Client.
2. Select Start > Run in the menu bar.
3. In the Run window, enter wf.msc. Click OK.
4. In the pop-up Advanced Security Winodws Firewall window, click Inbound Rules, and then click New Rule.
5. In the pop-up New Inbound Rule Wizard window, select the port and click Next.
6. In the pop-up window, select TCP and then add a specific local port. Click Next.
Tip: Please refer to the actual remote port for this port. Generally, the default is port 3389.
7. In the pop-up window, select Allow connection. Click Next.
8. In the pop-up window, just use the default configuration. Click Next.
#9. In the pop-up window, fill in the rule name. Click Finish.
10. Check the Windows Firewall properties to confirm whether the firewall is enabled.
11. If the firewall is not enabled, select Enable (recommended).
Tip: It is recommended to enable all firewalls under the Domain Configuration File, Private Configuration File, and Public Configuration File tabs.
#12. After the above steps are completed, access the server remotely and add a new remote port number after the remote address to connect to the instance. For example: 192.168.1.2:3389.
Add predefined rules
By adding predefined "Remote Desktop" for inbound rules Related rules allow remote desktop access.
Tip: This method is suitable for situations where the remote desktop port has not been changed and TCP 3389 port is used by default.
1. Log in to the Windows instance. For how to log in, see Connecting to the Windows Instance on the Local Client.
2. Select Start > Run in the menu bar.
3. In the Run window, enter wf.msc. Click OK.
4. In the pop-up Advanced Security Winodws Firewall window, click Inbound Rules, and then click New Rule.
5. In the pop-up New Inbound Rule Wizard window, select Pre In Define Remote Desktop, click Next.
6. In the pop-up window, check Remote Desktop (TCP-In) and click Next.
##7. In the pop-up window, check Allow connection and click Finish.
Tip: It is recommended to enable all firewalls under the Domain Configuration File, Private Configuration File, and Public Configuration File tabs.
#10. After the above steps are completed, access the server remotely and add a new remote port number after the remote address to connect to the instance. For example: 192.168.1.2:3389.
Applicable to Cloud Server ECS
Recommended tutorial:
The above is the detailed content of How to configure the firewall for remote connections to Windows instances. For more information, please follow other related articles on the PHP Chinese website!