Home  >  Article  >  Operation and Maintenance  >  Linux cannot ping the gateway and other IP addresses

Linux cannot ping the gateway and other IP addresses

王林
王林Original
2019-12-17 14:19:233295browse

Linux cannot ping the gateway and other IP addresses

Background:

There is a Linux test server. It seems that some changes were made to it from a security perspective, which caused it to only work with When communicating on the same network segment of the intranet, the addresses and gateways of other network segments cannot be pinged.

Solution:

1. First, setup and check that the IP address, gateway, and DNS are all fine.

2. You can ping your own IP, and you can ping IPs in the same network segment, but you can't ping IPs in any other network segment and the external network.

Free online video tutorial recommendation: linux video tutorial

3. Clear routing information

ip route flush dev eth0

4. Restart network service

service network restart

5. Then everything becomes smooth.

Recommended related articles and tutorials: linux tutorial

The above is the detailed content of Linux cannot ping the gateway and other IP addresses. For more information, please follow other related articles on the PHP Chinese website!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn