shorewall_code/Shorewall/action.TCPFlags
Tom Eastep df5f34951c Correct actions
- Restore the TCP-related actions
- Correct typo in action.Drop

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-03-12 15:09:31 -08:00

42 lines
995 B
Plaintext

#
# Shorewall version 5 - Drop TCPFlags Action
#
# /usr/share/shorewall/action.TCPFlags
#
# Accepts a single optional parameter:
#
# - = Do not Audit
# audit = Audit dropped packets.
#
#################################################################################
DEFAULTS -
?begin perl;
use strict;
use Shorewall::Config qw(:DEFAULT F_IPV4 F_IPV6);
use Shorewall::Chains;
use Shorewall::Rules;
my $action = 'DROP';
my ( $audit ) = get_action_params( 1 );
if ( supplied $audit ) {
fatal_error "Invalid parameter ($audit) to action TCPFlags" if $audit ne 'audit';
$action = "A_DROP";
}
perl_action_tcp_helper( $action, '-p tcp --tcp-flags ALL FIN,URG,PSH' );
perl_action_tcp_helper( $action, '-p tcp --tcp-flags ALL NONE' );
perl_action_tcp_helper( $action, '-p tcp --tcp-flags SYN,RST SYN,RST' );
perl_action_tcp_helper( $action, '-p tcp --tcp-flags SYN,FIN SYN,FIN' );
perl_action_tcp_helper( $action, '-p tcp --syn --sport 0' );
?end perl;