mirror of
https://gitlab.com/shorewall/code.git
synced 2025-02-17 02:00:57 +01:00
Correct DNAT with 'fw' source; verify interface in masq file entries
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@227 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
be3f7e6580
commit
b3e56a87ea
@ -1537,7 +1537,7 @@ add_nat_rule() {
|
|||||||
# Generate nat table rules
|
# Generate nat table rules
|
||||||
|
|
||||||
if [ "$source" = "$FW" ]; then
|
if [ "$source" = "$FW" ]; then
|
||||||
run_iptables -t nat -A OUTPUT $proto $sports -d addr
|
run_iptables -t nat -A OUTPUT $proto $sports -d addr \
|
||||||
$multiport $dports -j $target1
|
$multiport $dports -j $target1
|
||||||
else
|
else
|
||||||
chain=`dnat_chain $source`
|
chain=`dnat_chain $source`
|
||||||
@ -2397,6 +2397,10 @@ setup_masq()
|
|||||||
interface="${interface%:*}"
|
interface="${interface%:*}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if ! list_search $interface $all_interfaces; then
|
||||||
|
fatal_error "Error: Unknown interface $interface"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$subnet" = "${subnet%!*}" ]; then
|
if [ "$subnet" = "${subnet%!*}" ]; then
|
||||||
nomasq=
|
nomasq=
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user