Failure Symptoms
The local host's failure to ping the instance could be due to the following problems:
- The target server settings are incorrect.
- The domain name failed to resolve properly.
- Link Fault
On the premise that the local network is functioning properly(you can ping other websites without issue), you can troubleshoot according to the following steps:
- Check whether the instance is configured with a public IP
- Check security group settings
- Check system settings
- Check whether the domain name is registered
- Check domain name resolution.
- Other operations
Processing Procedures
Check whether the instance is configured with a public IP
The instance must have a public IP address to be accessible to other computers on the Internet. If the instance does not have a public IP, the private IP address cannot directly ping the instance.
- Log in to the CVM console.
- On the CVM List page, select the instance ID/host name that needs to be ping-tested and then enter the instance details page.
- In the Host Information column, check whether the instance is configured with a public IP.
- If yes, check the security group settings.
- If no, assign an Band Elastic IP to it.
Check security group settings
A security group is a virtual firewall that controls inbound and outbound traffic for associated instances. The rules of the security group can specify protocols, ports, policies, etc. Because ping uses the ICMP protocol, confirm whether the security group associated with instance allows ICMP. Perform the following steps to view the security group used by the instance and detailed inbound and outbound rules:
- Log in to the CVM console.
- On the CVM List page, select the instance ID/host name that needs security group settings and then enter the instance details page.
- Select the Security Group tab to enter the security group management page for the instance.
- Determine whether the security group associated with the instance allows ICMP by viewing the security group used by the instance and the detailed inbound and outbound rules.
- If yes, check system settings.
- If no, set the ICMP protocol policy to Allow.
Check system settings
Identify the operating system type of the instance and select different inspection methods.
- For Linux operating system, check Linux kernel parameters and firewall settings.
- For Windows operating system, check Windows Firewall settings.
Check Linux kernel parameters and firewall settings
Whether the Linux system allows ping is determined by both the kernel and firewall settings. If either of them blocks the system, it will cause a Request timeout for ping packets.
Check the value of kernel parameter icmp_echo_ignore_all
Log in to the instance.
Run the following command to check the system's icmp_echo_ignore_all settings.
cat /proc/sys/net/ipv4/icmp_echo_ignore_all