mirror of
https://gitlab.com/shorewall/code.git
synced 2024-12-16 19:30:44 +01:00
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
|
||||
#
|
||||
$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
|
||||
#
|
||||
if ( $addresses ) {
|
||||
if ( $addresses =~ /^SAME:nodst:/ ) {
|
||||
$target = '-j SAME ';
|
||||
$target = '-j SAME --nodst';
|
||||
$addresses =~ s/.*://;
|
||||
for my $addr ( split /,/, $addresses ) {
|
||||
$target .= "--to $addr ";
|
||||
}
|
||||
} elsif ( $addresses =~ /^SAME:nodst:/ ) {
|
||||
$target = '-j SAME --nodst ';
|
||||
$target = '-j SAME ';
|
||||
$addresses =~ s/.*://;
|
||||
for my $addr ( split /,/, $addresses ) {
|
||||
$target .= "--to $addr ";
|
||||
|
Loading…
Reference in New Issue
Block a user