master
parent
5a2c97702d
commit
825c176073
|
@ -290,6 +290,8 @@ function enable_filtering {
|
||||||
[[ ${direction} = "" ]] && continue
|
[[ ${direction} = "" ]] && continue
|
||||||
([[ ${direction} != "IN" ]] && [[ ${direction} != "OUT" ]]) \
|
([[ ${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
|
&& ${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
|
# Do some creative work with variables to make building the iptables rules fairly painless
|
||||||
[[ ${dstport} != "-" ]] && dstport="--dport ${dstport}"
|
[[ ${dstport} != "-" ]] && dstport="--dport ${dstport}"
|
||||||
|
|
Loading…
Reference in New Issue