Disclaimer: This article may contain information about third-party products. Such information is for reference only. Alibaba Cloud does not make any guarantee, express or implied, with respect to the performance and reliability of third-party products, as well as potential impacts of operations on the products.
If the server's kernel does not block ping, the client cannot ping the server.
ban is set for clients by the internal firewall policy of the server system.
- Log on to the server and run the following command to prepare for packet capture.
tcpdump -i eth0 host [$Eth0_IP] | grep ICMP
Note: [$Eth0_IP] is the IP address of ethnetwork interface controller.
- Log on to the client and run the following commands to test the connectivity between the client and the server:
Note:[$Server_IP] is the public IP address of the server.
Analysis of troubleshooting results
- The following packet capture result is displayed on the server. You can see that the client sends data packets every 5 seconds, but the server does not send any response packet.
- The analysis may be that the server's firewall or third-party security software has ban settings.
- Log on to the server and run the following command to view the firewall configuration information:
iptables -nL --line-numberThe following shows the detailed configuration. You can see that the firewall adopts a DROP policy for the client data packets, so the server cannot respond to the client data packets.
This topic describes how to disable the firewall and delete the corresponding masking rules.
Disable the firewall.
Log on to the server. If environmental conditions permit, run the following command to temporarily disable the firewall:
systemctl stop firewalld
Delete masking rule
Log on to the server and run the following commands to delete the corresponding blocking rule in the firewall:
iptables -D INPUT -s [$Client_IP] -j DROP
Note:[$Client_IP] is the IP address of the client.
Verify the result.
- Log on to the client and run the following command to make sure that the client can successfully ping the server:
- Log on to the server and obtain the following packet capture information. Verify that the server has returned a response.
- Elastic Compute Service