As you can see from the screenshot of GCP firewall rule page, should I remove ICMP Protocol from firewall rules base on security concern? Will it lower the chance of being attacked?
Opinions differ about this, but it is generally not considered a security risk to accept ICMP packets.
I'm using CentOS 7. I added net.ipv4.icmp_echo_ignore_all=1 to /etc/sysctl.d. Does this have the same effect as deleting the ICMP Protocol from GCP firewall rules page?
No. There are several types of ICMP requests. Ping or echo requests are just one of them. The setting
icmp_echo_ignore_all only disables ping responses, while blocking ICMP in the firewall will block all ICMP traffic, ping and all others. This will cause problems, as ICMP packets are sometimes necessary for proper operation.