Linux systems allow ping by default, but in some cases for security reasons, we set the server to disable ping. To temporarily allow the ping command, use the command:
echo 0 >/proc/sys/net/ipv4/icmp_ignore_all :0,代表允许;1,代表禁止
is 0, for this we can try pinging
Use -t to ping continuously
Add a line as shown above, net.ipv4.icmp_echo_ignore_all=1
1 means prohibited, 0 means allowed. Save and exit after modification is completed
As shown in the figure, after the configuration takes effect, the ping command cannot ping the same IP again. If you want to permanently allow the ping command, you only need to change the configuration file 1 to 0.
The above is the detailed content of Linux's love-hate relationship with ping packages. For more information, please follow other related articles on the PHP Chinese website!