forked from extern/shorewall_code
Fix Nat
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@5567 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
f136f6c26d
commit
d97ef334ed
@ -164,19 +164,28 @@ sub setup_one_masq($$$$$$)
|
|||||||
# Handle Protocol and Ports
|
# Handle Protocol and Ports
|
||||||
#
|
#
|
||||||
$rule .= do_proto $proto, $ports, '';
|
$rule .= do_proto $proto, $ports, '';
|
||||||
|
#
|
||||||
|
# Do we need to detect the source addresses at run-time?
|
||||||
|
#
|
||||||
|
my $detectinterface = '';
|
||||||
|
|
||||||
|
unless ( $networks =~ /.*\..*\./ ) {
|
||||||
|
$detectinterface = $networks;
|
||||||
|
$networks = '';
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Parse the ADDRESSES column
|
# Parse the ADDRESSES column
|
||||||
#
|
#
|
||||||
if ( $addresses ) {
|
if ( $addresses ) {
|
||||||
if ( $addresses =~ /^SAME:nodst:/ ) {
|
if ( $addresses =~ /^SAME:nodst:/ ) {
|
||||||
$target = '-j SAME ';
|
$target = '-j SAME --nodst';
|
||||||
$addresses =~ s/.*://;
|
$addresses =~ s/.*://;
|
||||||
for my $addr ( split /,/, $addresses ) {
|
for my $addr ( split /,/, $addresses ) {
|
||||||
$target .= "--to $addr ";
|
$target .= "--to $addr ";
|
||||||
}
|
}
|
||||||
} elsif ( $addresses =~ /^SAME:nodst:/ ) {
|
} elsif ( $addresses =~ /^SAME:nodst:/ ) {
|
||||||
$target = '-j SAME --nodst ';
|
$target = '-j SAME ';
|
||||||
$addresses =~ s/.*://;
|
$addresses =~ s/.*://;
|
||||||
for my $addr ( split /,/, $addresses ) {
|
for my $addr ( split /,/, $addresses ) {
|
||||||
$target .= "--to $addr ";
|
$target .= "--to $addr ";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user