This topic explains how to troubleshoot failures to access an external network from a Windows instance.
Problem description
You cannot use a browser on a Windows ECS instance to access the external network.
Possible causes
The causes of this issue are similar to those described in Troubleshoot remote connection failures to a Windows instance. Common causes include:
Controls from the public network ISP.
Abnormal behavior on the Windows instance can trigger an Alibaba Cloud security policy, blocking access to the external network.
The security group of the Windows instance is misconfigured.
The Windows instance has performance issues.
Restrictive firewall policies on the Windows instance.
Access restrictions from third-party antivirus software on the Windows instance.
The Windows instance is infected with a virus or Trojan horse.
Bugs or compatibility issues in the TCP/IP stack of the Windows instance.
Misconfigured Routing and Remote Access Service (RRAS) on the Windows instance.
The route table or network configuration of the instance is incorrect.
Solutions
To identify and resolve the issue, perform comparison tests and use packet capture tools. The following methods describe the steps:
The steps in this topic use a Windows Server 2019 Datacenter Edition (64-bit) operating system as an example. The steps may vary depending on your operating system version.
Method 1: Perform diagnostic checks
Perform the following checks based on your scenario.
Check the instance status in Security Center
-
In the Security Center console, go to the Host page to check whether the instance is at risk.
For more information, see Manage servers. In the Risk Status column of the server list, check if the target instance has a status of At Risk. If it does, click View for details.
-
Click the ID of the target instance to go to its details page. Review information such as vulnerabilities, application issues, protection status, security settings, and security alerts. Resolve any reported issues based on the alerts or notifications to restore the instance to a normal state.
-
Check if the connectivity issue is limited to a specific network segment.
If your Windows instance cannot reach a specific network segment, the issue might be related to ISP controls. In this case, use the
ping <CIDR block>command in Command Prompt to test multiple network segments. Follow these steps:NoteUse the
ping <CIDR block>command only to troubleshoot issues with specific unreachable networks, not for general network failures.-
Open Command Prompt.
-
In the lower-left corner of the desktop, click the Start icon
and entercmdin the search box. -
Click Command Prompt.
The Command Prompt window opens.
-
-
In Command Prompt, use the
ping <network_segment>command to run comparison tests on multiple related network segments.C:\Users\Administrator>ping xxx.xxx.50.242 Pinging xxx.xxx.50.242 with 32 bytes of data: Reply from xxx.xxx.50.242: bytes=32 time=12ms TTL=50 Reply from xxx.xxx.50.242: bytes=32 time=12ms TTL=50 Reply from xxx.xxx.50.242: bytes=32 time=12ms TTL=50 Reply from xxx.xxx.50.242: bytes=32 time=12ms TTL=50 Ping statistics for xxx.xxx.50.242: Packets: Sent = 4, Received = 4, Lost = 0 (0% loss), Approximate round trip times in milli-seconds: Minimum = 12ms, Maximum = 12ms, Average = 12ms C:\Users\Administrator>ping xxx.xxx.51.242 Pinging xxx.xxx.51.242 with 32 bytes of data: Request timed out. Request timed out. Request timed out. Request timed out. Ping statistics for xxx.xxx.51.242: Packets: Sent = 4, Received = 0, Lost = 4 (100% loss), C:\Users\Administrator>
-
Run ipconfig /all to check NIC configuration
-
Open Command Prompt.
-
In the lower-left corner of the desktop, click the Start icon
and entercmdin the search box. -
Click Command Prompt.
The Command Prompt window opens.
-
-
Run the
ipconfig /allcommand to view the NIC configuration information.C:\Users\Administrator>ipconfig /all Windows IP Configuration Host Name . . . . . . . . . . . . : iZxxxxxxxxxZ Primary Dns Suffix . . . . . . . : Node Type . . . . . . . . . . . . : Hybrid IP Routing Enabled. . . . . . . . . . . : No WINS Proxy Enabled. . . . . . . . . . . : No Ethernet adapter Ethernet: Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Red xxx Physical Address. . . . . . . . . : xx-xx-xx-xx-xx-xx DHCP Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes Link-local IPv6 Address . . . . . : fexx::xxxx:xxxx:xxxx:xxxx(Preferred) IPv4 Address. . . . . . . . . . . : 172.16.39.138(Preferred) Subnet Mask . . . . . . . . . . . : 255.255.240.0 Lease Obtained. . . . . . . . . . : 20xx-xx-xx Lease Expires . . . . . . . . . . : 20xx-xx-xx Default Gateway . . . . . . . . . : 172.16.47.253 DHCP Server . . . . . . . . . . . : 172.16.47.253 DHCPv6 IAID . . . . . . . . . . . : 1xxxxxxxx DHCPv6 Client DUID. . . . . . . . : 00-xx-xx-xx DNS Servers . . . . . . . . . . . : 100.xxx.xxx.xxx 100.xxx.xxx.xxx NetBIOS over Tcpip. . . . . . . . : Enabled C:\Users\Administrator> -
On the desktop, run
ncpa.cplto open Network Connections and verify that the NIC is sending and receiving packets.-
In the lower-left corner of the desktop, click the Start icon
, enterncpa.cplin the search box, and then click ncpa.cpl. -
In the Network Connections window, double-click the target NIC.
In the NIC status dialog box, check if the values for Sent and Received bytes in the Activity section continuously increase. If they do, the NIC is working correctly.
-
Use nslookup or ping to check DNS resolution
For more information, see What do I do if a custom domain name on a Windows instance resolves to a different IP address than on my local network?
Check for performance issues
The Windows instance may experience issues such as high CPU utilization, memory exhaustion, full bandwidth usage, or dynamic port exhaustion. Check for these issues by using the following methods:
Use tools to analyze memory usage. For more information, see Introduction to Windows memory analysis tools.
View the performance data of the Windows instance in the ECS console or CloudMonitor console. For more information, see View instance monitoring information.
Verify security group rules
Review the security group rules of the Windows instance. If they are misconfigured, modify the rules to allow all traffic for testing purposes.
To learn how to view the security group rules for a Windows instance, see View information about a single instance on its details page.
To learn how to add or modify security group rules, see Add a security group rule or Modify a security group rule.
Check the firewall policy configuration
Temporarily disable the firewall on the Windows instance and test connectivity again. If access is restored, check your firewall policy configuration. Follow these steps:
-
In the lower-left corner of the desktop, choose
> Server Manager. In the Server Manager window, click Local Server in the navigation pane on the left.
-
In the PROPERTIES section, click the firewall status to the right of Windows Defender Firewall.
-
On the Windows Security page, follow the on-screen instructions to turn off the firewall. The page displays three network profiles: Domain network, Private network, and Public network (active). You must turn off the firewall for each profile separately.
Try to access the website again.
If you can access the website, review your firewall policy configuration. For more information, see Configure firewall policies for an ECS instance that runs Windows Server.
Disable or uninstall third-party antivirus software
Disable or uninstall your third-party antivirus software by following its documentation, and then test connectivity again.
Run Windows Update to install the latest patches
This step helps rule out issues with the operating system's TCP/IP stack. Follow these steps:
In the lower-left corner of the desktop, click the Start icon
, enter updatein the search box, and then click Check for updates.-
On the Windows Update page, click Download to install the latest patches.
Try to access the website again.
Method 2: Capture and analyze network packets
Use a packet capture tool, such as Wireshark, on the Windows instance to capture packets. Analyze the captured packets for issues with DNS resolution, ARP resolution, or failed TCP connections. For more information, see Troubleshoot remote connection failures to a Windows instance.