#!/bin/bash

firewall-cmd --set-log-denied=unicast  > /dev/null 2>&1
firewall-cmd --complete-reload         > /dev/null 2>&1
cat >/etc/rsyslog.d/firewalld.conf <<EOF
:msg,contains,"_DROP" /var/log/firewalld.log
& stop
:msg,contains,"_REJECT" /var/log/firewalld.log
& stop
EOF
sleep 2
systemctl restart rsyslog              > /dev/null 2>&1