fixes firewall rule generation. forwarding rules were inserted in input chains, fixes #4028
SVN-Revision: 12768
This commit is contained in:
parent
b56d5cc36f
commit
221f4ad32d
1 changed files with 6 additions and 3 deletions
|
@ -216,10 +216,13 @@ fw_rule() {
|
|||
config_get proto $1 proto
|
||||
config_get target $1 target
|
||||
config_get ruleset $1 ruleset
|
||||
|
||||
|
||||
ZONE=input
|
||||
TARGET=$target
|
||||
[ -z "$target" ] && target=DROP
|
||||
[ -n "$src" ] && ZONE=zone_$src || ZONE=input
|
||||
[ -n "$dest" ] && TARGET=zone_${dest}_$target || TARGET=$target
|
||||
[ -n "$src" -a -z "$dest" ] && ZONE=zone_$src
|
||||
[ -n "$src" -a -n "$dest" ] && ZONE=zone_${src}_forward
|
||||
[ -n "$dest" ] && TARGET=zone_${dest}_$target
|
||||
add_rule() {
|
||||
$IPTABLES -I $ZONE 1 \
|
||||
${proto:+-p $proto} \
|
||||
|
|
Loading…
Reference in a new issue