How to drop ICMP packets with firewalld

#firewalld #linux #cli

  1. Drop all ICMP
firewall-cmd --set-target=DROP --zone=public --permanent
firewall-cmd --zone=public --remove-icmp-block={echo-request,echo-reply,timestamp-request,timestamp-reply} --permanent
  1. Reload the firewall
firewall-cmd --reload

References: