mirror of
https://gitlab.com/shorewall/code.git
synced 2024-11-14 19:54:06 +01:00
Another look at DNAT/REDIRECT and nested zones
git-svn-id: https://shorewall.svn.sourceforge.net/svnroot/shorewall/trunk@8051 fbd18981-670d-0410-9b5c-8dc0c1a9a2bb
This commit is contained in:
parent
755983b38c
commit
88a74e40f3
@ -1598,7 +1598,7 @@ sub generate_matrix() {
|
||||
add_rule $preroutingref, $_ for ( @returnstack );
|
||||
@returnstack = ();
|
||||
add_rule $preroutingref, join( '', match_source_dev( $interface), $source, $ipsec_in_match, '-j ', $chainref->{name} );
|
||||
push @returnstack, join( '', match_source_dev( $interface), $source, $ipsec_in_match, '-j RETURN' ) unless $filter_table->{"${zone}2${fw}"}->{policy} eq 'CONTINUE';
|
||||
push @returnstack, join( '', match_source_dev( $interface), $source, $ipsec_in_match, '-j RETURN' ) if $zoneref->{options}{nested};
|
||||
}
|
||||
|
||||
if ( $chain2 ) {
|
||||
|
@ -83,6 +83,7 @@ use constant { NOTHING => 'NOTHING',
|
||||
#
|
||||
# %zones{<zone1> => {type = > <zone type> 'firewall', 'ipv4', 'ipsec4', 'bport4';
|
||||
# options => { complex => 0|1
|
||||
# nested => 0|1
|
||||
# in_out => < policy match string >
|
||||
# in => < policy match string >
|
||||
# out => < policy match string >
|
||||
@ -297,7 +298,8 @@ sub determine_zones()
|
||||
options => { in_out => parse_zone_option_list( $options || '', $type ) ,
|
||||
in => parse_zone_option_list( $in_options || '', $type ) ,
|
||||
out => parse_zone_option_list( $out_options || '', $type ) ,
|
||||
complex => ($type eq 'ipsec4' || $options || $in_options || $out_options ? 1 : 0) } ,
|
||||
complex => ($type eq 'ipsec4' || $options || $in_options || $out_options ? 1 : 0) ,
|
||||
nested => @parents > 0 } ,
|
||||
interfaces => {} ,
|
||||
children => [] ,
|
||||
hosts => {}
|
||||
|
Loading…
Reference in New Issue
Block a user