From 825c1760738680bc268685a6bfc054827208eaa5 Mon Sep 17 00:00:00 2001 From: "bbruns@gmail.com" Date: Sat, 5 Apr 2014 18:10:00 +0000 Subject: [PATCH] --- lib/iptables.inc | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/iptables.inc b/lib/iptables.inc index 63d4f17..698973a 100644 --- a/lib/iptables.inc +++ b/lib/iptables.inc @@ -290,6 +290,8 @@ function enable_filtering { [[ ${direction} = "" ]] && continue ([[ ${direction} != "IN" ]] && [[ ${direction} != "OUT" ]]) \ && ${display} RED "acl.conf: Error - must begin with IN/OUT: ${DEFAULT_COLOR}${direction} ${action} ${interface} ${dstaddress} ${dstport} ${srcaddress} ${srcport} ${protocol}" && continue + ([[ ${action} != "ACCEPT" ]] && [[ ${action} != "DROP" ]]) \ + && ${display} RED "acl.conf: Error - action must be either ACCEPT or DROP : ${DEFAULT_COLOR}${direction} ${action} ${interface} ${dstaddress} ${dstport} ${srcaddress} ${srcport} ${protocol}" && continue # Do some creative work with variables to make building the iptables rules fairly painless [[ ${dstport} != "-" ]] && dstport="--dport ${dstport}"