The Linux system allows pings by default, but in some cases we set the server to no ping for security reasons
Temporarily allow the ping command to use the command:
echo 0 >/proc/sys/net/ipv4/icmp_ignore_all:0, delegate allowed; 1, delegate Forbidden
1. View current settings:
For 0, so we can ping it and try
2, use the ping command to test
Use-T to ping continuously
3, permanently allow or disallow ping, modify configuration file/etc/sysctl.conf
Add a row as shown, net.ipv4.icmp_echo_ignore_all=1
1 is forbidden, 0 means allow the modification to be completed after saving exit
4, execute sysctl-p to make the new configuration take effect
5, re-test the ping situation
, after the configuration takes effect again the ping command cannot ping the same IP, if you want to permanently allow the ping command, just change the configuration file 1 to 0
Linux allow, disable ping packets