summaryrefslogtreecommitdiff
path: root/package/firewall
diff options
context:
space:
mode:
authorTravis Kemen <thepeople@openwrt.org>2010-02-11 02:33:34 +0000
committerTravis Kemen <thepeople@openwrt.org>2010-02-11 02:33:34 +0000
commit9f3a73d9e275c7270d32049b13f4583713f316ff (patch)
tree8bd4e1958f8ecd85dd7a607f94400a7b69753249 /package/firewall
parent0017e832cc5210d5e2b4fc9f51e00c3c6f521277 (diff)
downloadmtk-20170518-9f3a73d9e275c7270d32049b13f4583713f316ff.zip
mtk-20170518-9f3a73d9e275c7270d32049b13f4583713f316ff.tar.gz
mtk-20170518-9f3a73d9e275c7270d32049b13f4583713f316ff.tar.bz2
Add destination ip of the wan adapter useful if you have multiple ip addresses.
SVN-Revision: 19574
Diffstat (limited to 'package/firewall')
-rwxr-xr-xpackage/firewall/files/uci_firewall.sh2
1 files changed, 2 insertions, 0 deletions
diff --git a/package/firewall/files/uci_firewall.sh b/package/firewall/files/uci_firewall.sh
index 49e5ca8..207dcd8 100755
--- a/package/firewall/files/uci_firewall.sh
+++ b/package/firewall/files/uci_firewall.sh
@@ -343,6 +343,7 @@ fw_redirect() {
config_get src $1 src
config_get src_ip $1 src_ip
+ config_get src_dip $1 src_dip
config_get src_port $1 src_port
config_get src_dport $1 src_dport
config_get src_mac $1 src_mac
@@ -372,6 +373,7 @@ fw_redirect() {
$IPTABLES -A zone_${src}_prerouting -t nat \
${proto:+-p $proto} \
${src_ip:+-s $src_ip} \
+ ${src_dip:+-d $src_dip} \
${src_port:+--sport $src_port} \
${src_dport:+--dport $src_dport} \
${src_mac:+-m mac --mac-source $src_mac} \