1. 禁止ping

    [root@varnish ~]# echo 1 >/proc/sys/net/ipv4/icmp_echo_ignore_all

  

  2. 允许ping

   [root@varnish ~]# echo 0 >/proc/sys/net/ipv4/icmp_echo_ignore_all