pf如何设置拒绝ping
pf.conf中写入下面的就可以了
- block in inet proto icmp all icmp-type echoreq keep state
反之,
- pass in inet proto icmp all icmp-type echoreq keep state
也可以把其他ICMP给禁用了,只允许Ping。
- block drop on $ext_if proto icmp from any to $ext_if
- pass in inet proto icmp all icmp-type echoreq keep state