forked from extern/shorewall_code
Modify the Event actions to handle NAT rules
- Separate DNAT and REDIRECT into DNAT- and REDIRECT- plus ACCEPT Signed-off-by: Tom Eastep <teastep@shorewall.net>
This commit is contained in:
parent
1065c2951b
commit
41ea3bdeda
@ -107,6 +107,11 @@ if ( $command & $REAP_OPT ) {
|
||||
|
||||
$duration .= '--rttl ' if $command & $TTL_OPT;
|
||||
|
||||
if ( ( $targets{$action} || 0 ) & NATRULE ) {
|
||||
perl_action_helper( "${action}-", "-m recent --rcheck ${duration}--hitcount $hitcount" );
|
||||
$action = 'ACCEPT';
|
||||
}
|
||||
|
||||
if ( $command & $RESET_CMD ) {
|
||||
require_capability 'MARK_ANYWHERE', '"reset"', 's';
|
||||
|
||||
|
@ -41,6 +41,11 @@ fatal_error "Invalid Src or Dest ($destination)" unless $destination =~ /^(?:src
|
||||
set_action_disposition( $disposition) if supplied $disposition;
|
||||
set_action_name_to_caller;
|
||||
|
||||
if ( ( $targets{$action} || 0 ) & NATRULE ) {
|
||||
perl_action_helper( "${action}-", "" );
|
||||
$action = 'ACCEPT';
|
||||
}
|
||||
|
||||
if ( $destination eq 'dst' ) {
|
||||
perl_action_helper( $action, '', '', "-m recent --name $event --remove --rdest" );
|
||||
} else {
|
||||
|
@ -37,6 +37,11 @@ fatal_error "Invalid Src or Dest ($destination)" unless $destination =~ /^(?:src
|
||||
set_action_disposition( $disposition) if supplied $disposition;
|
||||
set_action_name_to_caller;
|
||||
|
||||
if ( ( $targets{$action} || 0 ) & NATRULE ) {
|
||||
perl_action_helper( "${action}-", "" );
|
||||
$action = 'ACCEPT';
|
||||
}
|
||||
|
||||
if ( $destination eq 'dst' ) {
|
||||
perl_action_helper( $action, '', '', "-m recent --name $event --set --rdest" );
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user