How to DROP icmp requests with firewalld?
An equivalent example instead using iptables would be:
$ iptables -A INPUT --protocol icmp --in-interface enp0s8 -j DROP
The above produces the desired result (no response) like so:
[root@lexy1 ~]# ping l2
PING lexy2.example.vm (192.168.57.102) 56(84) bytes of data.
︙
(no other output)
︙
I'm able to block icmp requests with firewalld using something like:
$ firewall-cmd --zone=internal --add-icmp-block={echo-request,echo-reply}
However ping returns output like so:
[root@lexy1 ~]# ping l2
PING lexy2.example.vm (192.168.57.102) 56(84) bytes of data.
From lexy2.example.vm (192.168.57.102) icmp_seq=1 Destination Host Prohibited
From lexy2.example.vm (192.168.57.102) icmp_seq=2 Destination Host Prohibited
From lexy2.example.vm (192.168.57.102) icmp_seq=3 Destination Host Prohibited
︙
Ping should receive no indication that a server exists at this address. (This is not an attempt at security through obscurity.)