From 7c63eb23784b5de4d65fd77347bae68f0164e75b Mon Sep 17 00:00:00 2001 From: root Date: Fri, 8 Dec 2017 16:55:07 +0900 Subject: [PATCH] In the CentOS7 and epel environment, result of "firewall-cmd -direct -get -chains ipv4 filter" is displayed one line Changed to be multiple lines with reference to firewallcmd-multiport.conf --- config/action.d/firewallcmd-new.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/config/action.d/firewallcmd-new.conf b/config/action.d/firewallcmd-new.conf index e64601e1..261573ba 100644 --- a/config/action.d/firewallcmd-new.conf +++ b/config/action.d/firewallcmd-new.conf @@ -16,7 +16,7 @@ actionstop = firewall-cmd --direct --remove-rule filter 0 -m st firewall-cmd --direct --remove-rules filter f2b- firewall-cmd --direct --remove-chain filter f2b- -actioncheck = firewall-cmd --direct --get-chains filter | grep -q 'f2b-$' +actioncheck = firewall-cmd --direct --get-chains ipv4 filter | sed -e 's, ,\n,g' | grep -q 'f2b-$' actionban = firewall-cmd --direct --add-rule filter f2b- 0 -s -j