#!/bin/bash
cat /var/log/firewalld.log | awk '{print $10"="$17":"$19}' | grep -vE "SRC=0000*|SRC=fe80*" | grep DPT >/tmp/deny_analyze
cat /var/log/firewalld.log | awk '{print $10"="$18":"$20}' | grep -vE "SRC=0000*|SRC=fe80*" | grep DPT >>/tmp/deny_analyze
cat /tmp/deny_analyze | awk -F= '{gsub("PROTO","协议",$3);gsub("DPT","",$4);print $2"->"$3"/"$4$5}' | sort -nr | uniq -c | sort -nr | head -10