mirror of
https://github.com/firehol/firehol.git
synced 2024-06-30 19:02:21 +00:00
Allowed multiple 'to' arguments to DNAT and SNAT.
This commit is contained in:
parent
09bb1278f8
commit
316dcdbbe4
20
firehol.sh
20
firehol.sh
@ -10,7 +10,7 @@
|
||||
#
|
||||
# config: /etc/firehol.conf
|
||||
#
|
||||
# $Id: firehol.sh,v 1.75 2003/01/20 21:50:36 ktsaou Exp $
|
||||
# $Id: firehol.sh,v 1.76 2003/01/20 22:10:56 ktsaou Exp $
|
||||
#
|
||||
|
||||
|
||||
@ -1963,7 +1963,12 @@ rule() {
|
||||
action="SNAT"
|
||||
if [ "${1}" = "to" ]
|
||||
then
|
||||
local -a action_param=("--to-source" "${2}")
|
||||
local -a action_param=
|
||||
local x=
|
||||
for x in ${2}
|
||||
do
|
||||
action_param=(${action_param[@]} "--to-source" "${x}")
|
||||
done
|
||||
shift 2
|
||||
else
|
||||
error "SNAT requires a 'to' argument."
|
||||
@ -1975,7 +1980,12 @@ rule() {
|
||||
action="DNAT"
|
||||
if [ "${1}" = "to" ]
|
||||
then
|
||||
local -a action_param=("--to-destination" "${2}")
|
||||
local -a action_param=
|
||||
local x=
|
||||
for x in ${2}
|
||||
do
|
||||
action_param=(${action_param[@]} "--to-destination" "${x}")
|
||||
done
|
||||
shift 2
|
||||
else
|
||||
error "DNAT requires a 'to' argument"
|
||||
@ -2996,7 +3006,7 @@ case "${arg}" in
|
||||
else
|
||||
|
||||
cat <<"EOF"
|
||||
$Id: firehol.sh,v 1.75 2003/01/20 21:50:36 ktsaou Exp $
|
||||
$Id: firehol.sh,v 1.76 2003/01/20 22:10:56 ktsaou Exp $
|
||||
(C) Copyright 2002, Costa Tsaousis <costa@tsaousis.gr>
|
||||
FireHOL is distributed under GPL.
|
||||
|
||||
@ -3164,7 +3174,7 @@ then
|
||||
|
||||
cat <<"EOF"
|
||||
|
||||
$Id: firehol.sh,v 1.75 2003/01/20 21:50:36 ktsaou Exp $
|
||||
$Id: firehol.sh,v 1.76 2003/01/20 22:10:56 ktsaou Exp $
|
||||
(C) Copyright 2002, Costa Tsaousis <costa@tsaousis.gr>
|
||||
FireHOL is distributed under GPL.
|
||||
Home Page: http://firehol.sourceforge.net
|
||||
|
Loading…
Reference in New Issue
Block a user