Compare commits

...

16 Commits

Author SHA1 Message Date
Tom Eastep
72e21be89d Add a handle back to the flow classifier
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-08-04 11:03:36 -07:00
Tom Eastep
1b1e2c58f9 Allow optional provider interfaces to match a wildcard
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-08-02 15:44:19 -07:00
Tom Eastep
d3591c071d Correct dump instructions
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-08-02 09:23:49 -07:00
Tom Eastep
decf9d3b3e Correct comment formatting in 'trace' output
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-07-30 09:03:19 -07:00
Tom Eastep
a05623f49e Don't delete duplicate COUNT rules
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-07-30 08:24:53 -07:00
Tom Eastep
0b9cd93769 Default DSCP rules to the POSTROUTING chain
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-07-27 13:59:15 -07:00
Tom Eastep
d9e992b164 Merge branch 'master' of ssh://server.shorewall.net/home/teastep/shorewall/code
Conflicts:
	Shorewall/Perl/Shorewall/Config.pm
2016-07-25 07:33:04 -07:00
Tom Eastep
372359839b Add 'comment' to alternative input
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-07-24 15:08:55 -07:00
Tom Eastep
40dea5f597 Add 'comment' to alternative input
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-07-19 15:43:40 -07:00
Tom Eastep
4a6338d857 Correct/complete Scott Sumate's LOGFILE enhancement
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-07-15 14:25:02 -07:00
Scott Shumate
55ee0113ea Added support for systemd logging by configuring LOGFILE=systemd 2016-07-15 13:40:23 -05:00
Tom Eastep
65d5249bd8 Link to Digimer's article on Shorewall/REL7
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2016-07-07 12:44:28 -07:00
Roberto C. Sánchez
0364c15be1 Fix typos, thanks to Marco Di Cerbo for reporting them 2016-07-06 08:46:32 -04:00
Roberto C. Sánchez
76b2b0de78 Debian init script: fix name of force-reload target (Closes: #830110) 2016-07-06 08:43:21 -04:00
Roberto C. Sánchez
7c9876241c Debian init scripts: add run-level 1 to Default-Stop specification 2016-07-04 17:37:00 -04:00
Roberto C. Sánchez
8b36c2c1cf Debian init scripts: more accurately describe what action is being taken 2016-07-04 13:34:33 -04:00
20 changed files with 218 additions and 97 deletions

View File

@@ -191,6 +191,8 @@ setup_logread() {
else else
g_logread="logread" g_logread="logread"
fi fi
elif [ "$LOGFILE" = "systemd" ]; then
g_logread="journalctl -r"
elif [ -r $LOGFILE ]; then elif [ -r $LOGFILE ]; then
if qt mywhich tac; then if qt mywhich tac; then
g_logread="tac $LOGFILE" g_logread="tac $LOGFILE"

View File

@@ -30,7 +30,7 @@
# Required-Stop: $local_fs # Required-Stop: $local_fs
# X-Stop-After: $network # X-Stop-After: $network
# Default-Start: S # Default-Start: S
# Default-Stop: 0 6 # Default-Stop: 0 1 6
# Short-Description: Initialize the firewall at boot time # Short-Description: Initialize the firewall at boot time
# Description: Place the firewall in a safe state at boot time prior to # Description: Place the firewall in a safe state at boot time prior to
# bringing up the network # bringing up the network

View File

@@ -5,7 +5,7 @@
# Required-Start: $network $remote_fs # Required-Start: $network $remote_fs
# Required-Stop: $network $remote_fs # Required-Stop: $network $remote_fs
# Default-Start: S # Default-Start: S
# Default-Stop: 0 6 # Default-Stop: 0 1 6
# Short-Description: Configure the firewall at boot time # Short-Description: Configure the firewall at boot time
# Description: Configure the firewall according to the rules specified in # Description: Configure the firewall according to the rules specified in
# /etc/shorewall-lite # /etc/shorewall-lite
@@ -92,10 +92,11 @@ shorewall_start () {
# stop the firewall # stop the firewall
shorewall_stop () { shorewall_stop () {
echo -n "Stopping \"Shorewall firewall\": "
if [ "$SAFESTOP" = 1 ]; then if [ "$SAFESTOP" = 1 ]; then
echo -n "Stopping \"Shorewall Lite firewall\": "
$SRWL $SRWL_OPTS stop >> $INITLOG 2>&1 && echo "done." || echo_notdone $SRWL $SRWL_OPTS stop >> $INITLOG 2>&1 && echo "done." || echo_notdone
else else
echo -n "Clearing all \"Shorewall Lite firewall\" rules: "
$SRWL $SRWL_OPTS clear >> $INITLOG 2>&1 && echo "done." || echo_notdone $SRWL $SRWL_OPTS clear >> $INITLOG 2>&1 && echo "done." || echo_notdone
fi fi
return 0 return 0

View File

@@ -1337,7 +1337,14 @@ sub push_rule( $$ ) {
push @{$chainref->{rules}}, $ruleref; push @{$chainref->{rules}}, $ruleref;
$chainref->{referenced} = 1; $chainref->{referenced} = 1;
$chainref->{optflags} |= RETURNS_DONT_MOVE if ( $ruleref->{target} || '' ) eq 'RETURN'; $chainref->{optflags} |= RETURNS_DONT_MOVE if ( $ruleref->{target} || '' ) eq 'RETURN';
trace( $chainref, 'A', @{$chainref->{rules}}, "-A $chainref->{name} $_[1] $ruleref->{comment}" ) if $debug;
if ( $debug ) {
if ( $ruleref->{comment} ) {
trace( $chainref, 'A', @{$chainref->{rules}}, "-A $chainref->{name} $_[1] -m comment --comment \"$ruleref->{comment}\"" );
} else {
trace( $chainref, 'A', @{$chainref->{rules}}, "-A $chainref->{name} $_[1]" );
}
}
$chainref->{complete} = 1 if $complete; $chainref->{complete} = 1 if $complete;
@@ -4012,7 +4019,7 @@ sub delete_duplicates {
my $docheck; my $docheck;
my $duplicate = 0; my $duplicate = 0;
if ( $baseref->{mode} == CAT_MODE ) { if ( $baseref->{mode} == CAT_MODE && $baseref->{target} ) {
my $ports1; my $ports1;
my @keys1 = sort( grep ! $skip{$_}, keys( %$baseref ) ); my @keys1 = sort( grep ! $skip{$_}, keys( %$baseref ) );
my $rulenum = @_; my $rulenum = @_;

View File

@@ -577,6 +577,7 @@ our $max_format; # Max format value
our $comment; # Current COMMENT our $comment; # Current COMMENT
our $comments_allowed; # True if [?]COMMENT is allowed in the current file our $comments_allowed; # True if [?]COMMENT is allowed in the current file
our $nocomment; # When true, ignore [?]COMMENT in the current file our $nocomment; # When true, ignore [?]COMMENT in the current file
our $sr_comment; # When true, $comment should only be applied to the current rule
our $warningcount; # Used to suppress duplicate warnings about missing COMMENT support our $warningcount; # Used to suppress duplicate warnings about missing COMMENT support
our $checkinline; # The -i option to check/compile/etc. our $checkinline; # The -i option to check/compile/etc.
our $directive_callback; # Function to call in compiler_directive our $directive_callback; # Function to call in compiler_directive
@@ -731,6 +732,7 @@ sub initialize( $;$$) {
# Contents of last COMMENT line. # Contents of last COMMENT line.
# #
$comment = ''; $comment = '';
$sr_comment = '';
$warningcount = 0; $warningcount = 0;
# #
# Misc Globals # Misc Globals
@@ -2156,6 +2158,47 @@ sub split_list3( $$ ) {
@list2; @list2;
} }
#
# This version spits a list on white-space with optional leading comma. It prevents double-quoted
# strings from being split.
#
sub split_list4( $ ) {
my ($list ) = @_;
my @list1 = split( /,?\s+/, $list );
my @list2;
my $element = '';
my $opencount = 0;
return @list1 unless $list =~ /"/;
@list1 = split( /(,?\s+)/, $list );
for ( my $i = 0; $i < @list1; $i += 2 ) {
my $e = $list1[$i];
if ( $e =~ /[^\\]"/ ) {
if ( $e =~ /[^\\]".*[^\\]"/ ) {
fatal_error 'Unescaped embedded quote (' . join( $list1[$i - 1], $element, $e ) . ')' if $element ne '';
push @list2, $e;
} elsif ( $element ne '' ) {
fatal_error 'Quoting Error (' . join( $list1[$i - 1], $element, $e ) . ')' unless $e =~ /"$/;
push @list2, join( $list1[$i - 1], $element, $e );
$element = '';
} else {
$element = $e;
}
} elsif ( $element ne '' ) {
$element = join( $list1[$i - 1], $element, $e );
} else {
push @list2, $e;
}
}
fatal_error "Mismatched_quotes ($list)" if $element ne '';
@list2;
}
# #
# Splits the columns of a config file record # Splits the columns of a config file record
# #
@@ -2225,6 +2268,8 @@ sub passed( $ ) {
defined $val && $val ne '' && $val ne '-'; defined $val && $val ne '' && $val ne '-';
} }
sub clear_comment();
# #
# Pre-process a line from a configuration file. # Pre-process a line from a configuration file.
@@ -2248,6 +2293,8 @@ sub split_line2( $$;$$$ ) {
} }
$inline_matches = ''; $inline_matches = '';
clear_comment if $sr_comment;
# #
# First, see if there are double semicolons on the line; what follows will be raw iptables input # First, see if there are double semicolons on the line; what follows will be raw iptables input
# #
@@ -2354,18 +2401,37 @@ sub split_line2( $$;$$$ ) {
$pairs =~ s/^\s*//; $pairs =~ s/^\s*//;
$pairs =~ s/\s*$//; $pairs =~ s/\s*$//;
my @pairs = split( /,?\s+/, $pairs ); my @pairs = split_list4( $pairs );
for ( @pairs ) { for ( @pairs ) {
fatal_error "Invalid column/value pair ($_)" unless /^(\w+)(?:=>?|:)(.+)$/; fatal_error "Invalid column/value pair ($_)" unless /^(\w+)(?:=>?|:)(.+)$/;
my ( $column, $value ) = ( lc( $1 ), $2 ); my ( $column, $value ) = ( lc( $1 ), $2 );
fatal_error "Unknown column ($1)" unless exists $columnsref->{$column};
$column = $columnsref->{$column}; if ( $value =~ /"$/ ) {
fatal_error "Non-ASCII gunk in file" if $columns =~ /[^\s[:print:]]/; fatal_error "Invalid value ( $value )" unless $value =~ /^"(.*)"$/;
$value = $1 if $value =~ /^"([^"]+)"$/; $value = $1;
fatal_error "Column values may not contain embedded double quotes, single back quotes or backslashes" if $columns =~ /["`\\]/; }
fatal_error "Non-ASCII gunk in the value of the $column column" if $columns =~ /[^\s[:print:]]/;
$line[$column] = $value; if ( $column eq 'comment' ) {
if ( $comments_allowed ) {
if ( have_capability( 'COMMENTS' ) ) {
$comment = $value;
$sr_comment = 1;
} else {
warning_message '"comment" ignored -- requires comment support in iptables/Netfilter' unless $warningcount++;
}
} else {
fatal_error '"comment" is not allowed in this file';
}
} else {
fatal_error "Unknown column ($1)" unless exists $columnsref->{$column};
$column = $columnsref->{$column};
fatal_error "Non-ASCII gunk in file" if $columns =~ /[^\s[:print:]]/;
$value = $1 if $value =~ /^"([^"]+)"$/;
$value =~ s/\\"/"/g;
fatal_error "Non-ASCII gunk in the value of the $column column" if $columns =~ /[^\s[:print:]]/;
$line[$column] = $value;
}
} }
} }
@@ -2395,6 +2461,7 @@ sub no_comment() {
sub clear_comment() { sub clear_comment() {
$comment = ''; $comment = '';
$nocomment = 0; $nocomment = 0;
$sr_comment = '';
} }
# #
@@ -2490,7 +2557,8 @@ sub push_include() {
$max_format, $max_format,
$comment, $comment,
$nocomment, $nocomment,
$section_function ]; $section_function,
$sr_comment ];
} }
# #
@@ -2514,7 +2582,8 @@ sub pop_include() {
$max_format, $max_format,
$comment, $comment,
$nocomment, $nocomment,
$section_function ) = @$arrayref; $section_function,
$sr_comment ) = @$arrayref;
} else { } else {
$currentfile = undef; $currentfile = undef;
$currentlinenumber = 'EOF'; $currentlinenumber = 'EOF';
@@ -2883,6 +2952,7 @@ sub process_compiler_directive( $$$$ ) {
if ( have_capability( 'COMMENTS' ) ) { if ( have_capability( 'COMMENTS' ) ) {
( $comment = $line ) =~ s/^\s*\?COMMENT\s*//; ( $comment = $line ) =~ s/^\s*\?COMMENT\s*//;
$comment =~ s/\s*$//; $comment =~ s/\s*$//;
$sr_comment = '';
} else { } else {
directive_warning( 'Yes', "COMMENTs ignored -- require comment support in iptables/Netfilter" , $filename, $linenumber ) unless $warningcount++; directive_warning( 'Yes', "COMMENTs ignored -- require comment support in iptables/Netfilter" , $filename, $linenumber ) unless $warningcount++;
} }
@@ -3236,6 +3306,7 @@ sub push_open( $;$$$$ ) {
push @openstack, \@a; push @openstack, \@a;
@includestack = (); @includestack = ();
$currentfile = undef; $currentfile = undef;
$sr_comment = '';
open_file( $file , $max, $comments_allowed || $ca, $nc , $cf ); open_file( $file , $max, $comments_allowed || $ca, $nc , $cf );
} }

View File

@@ -686,6 +686,7 @@ sub process_a_provider( $ ) {
interface => $interface , interface => $interface ,
physical => $physical , physical => $physical ,
optional => $optional , optional => $optional ,
wildcard => $interfaceref->{wildcard} || 0,
gateway => $gateway , gateway => $gateway ,
gatewaycase => $gatewaycase , gatewaycase => $gatewaycase ,
shared => $shared , shared => $shared ,
@@ -2113,9 +2114,31 @@ sub provider_realm( $ ) {
# #
sub handle_optional_interfaces( $ ) { sub handle_optional_interfaces( $ ) {
my ( $interfaces, $wildcards ) = find_interfaces_by_option1 'optional'; my @interfaces;
my $wildcards;
if ( @$interfaces ) { #
# First do the provider interfacess. Those that are real providers will never have wildcard physical
# names but they might derive from wildcard interface entries. Optional interfaces which do not have
# wildcard physical names are also included in the providers table.
#
for my $providerref ( grep $_->{optional} , sort { $a->{number} <=> $b->{number} } values %providers ) {
push @interfaces, $providerref->{interface};
$wildcards ||= $providerref->{wildcard};
}
#
# Now do the optional wild interfaces
#
for my $interface ( grep interface_is_optional($_) && ! $provider_interfaces{$_}, all_real_interfaces ) {
push@interfaces, $interface;
unless ( $wildcards ) {
my $interfaceref = find_interface($interface);
$wildcards = 1 if $interfaceref->{wildcard};
}
}
if ( @interfaces ) {
my $require = $config{REQUIRE_INTERFACE}; my $require = $config{REQUIRE_INTERFACE};
my $gencase = shift; my $gencase = shift;
@@ -2126,7 +2149,7 @@ sub handle_optional_interfaces( $ ) {
# #
# Clear the '_IS_USABLE' variables # Clear the '_IS_USABLE' variables
# #
emit( join( '_', 'SW', uc var_base( get_physical( $_ ) ) , 'IS_USABLE=' ) ) for @$interfaces; emit( join( '_', 'SW', uc var_base( get_physical( $_ ) ) , 'IS_USABLE=' ) ) for @interfaces;
if ( $wildcards ) { if ( $wildcards ) {
# #
@@ -2143,74 +2166,76 @@ sub handle_optional_interfaces( $ ) {
emit ''; emit '';
} }
for my $interface ( grep $provider_interfaces{$_}, @$interfaces ) { for my $interface ( @interfaces ) {
my $provider = $provider_interfaces{$interface}; if ( my $provider = $provider_interfaces{ $interface } ) {
my $physical = get_physical $interface; my $physical = get_physical $interface;
my $base = uc var_base( $physical ); my $base = uc var_base( $physical );
my $providerref = $providers{$provider}; my $providerref = $providers{$provider};
my $interfaceref = known_interface( $interface );
my $wildbase = uc $interfaceref->{base};
emit( "$physical)" ), push_indent if $wildcards; emit( "$physical)" ), push_indent if $wildcards;
if ( $provider eq $physical ) { if ( $provider eq $physical ) {
# #
# Just an optional interface, or provider and interface are the same # Just an optional interface, or provider and interface are the same
# #
emit qq(if [ -z "\$interface" -o "\$interface" = "$physical" ]; then); emit qq(if [ -z "\$interface" -o "\$interface" = "$physical" ]; then);
} else { } else {
# #
# Provider # Provider
# #
emit qq(if [ -z "\$interface" -o "\$interface" = "$physical" ]; then); emit qq(if [ -z "\$interface" -o "\$interface" = "$physical" ]; then);
} }
push_indent;
if ( $providerref->{gatewaycase} eq 'detect' ) {
emit qq(if interface_is_usable $physical && [ -n "$providerref->{gateway}" ]; then);
} else {
emit qq(if interface_is_usable $physical; then);
}
emit( ' HAVE_INTERFACE=Yes' ) if $require;
emit( " SW_${base}_IS_USABLE=Yes" ,
'fi' );
pop_indent;
emit( "fi\n" );
emit( ';;' ), pop_indent if $wildcards;
}
for my $interface ( grep ! $provider_interfaces{$_}, @$interfaces ) {
my $physical = get_physical $interface;
my $base = uc var_base( $physical );
my $case = $physical;
my $wild = $case =~ s/\+$/*/;
if ( $wildcards ) {
emit( "$case)" );
push_indent; push_indent;
if ( $providerref->{gatewaycase} eq 'detect' ) {
emit qq(if interface_is_usable $physical && [ -n "$providerref->{gateway}" ]; then);
} else {
emit qq(if interface_is_usable $physical; then);
}
if ( $wild ) { emit( ' HAVE_INTERFACE=Yes' ) if $require;
emit( qq(if [ -z "\$SW_${base}_IS_USABLE" ]; then) );
emit( " SW_${base}_IS_USABLE=Yes" );
emit( " SW_${wildbase}_IS_USABLE=Yes" ) if $interfaceref->{wildcard};
emit( 'fi' );
pop_indent;
emit( "fi\n" );
emit( ';;' ), pop_indent if $wildcards;
} else {
my $physical = get_physical $interface;
my $base = uc var_base( $physical );
my $case = $physical;
my $wild = $case =~ s/\+$/*/;
if ( $wildcards ) {
emit( "$case)" );
push_indent; push_indent;
emit ( 'if interface_is_usable $interface; then' );
if ( $wild ) {
emit( qq(if [ -z "\$SW_${base}_IS_USABLE" ]; then) );
push_indent;
emit ( 'if interface_is_usable $interface; then' );
} else {
emit ( "if interface_is_usable $physical; then" );
}
} else { } else {
emit ( "if interface_is_usable $physical; then" ); emit ( "if interface_is_usable $physical; then" );
} }
} else {
emit ( "if interface_is_usable $physical; then" );
}
emit ( ' HAVE_INTERFACE=Yes' ) if $require; emit ( ' HAVE_INTERFACE=Yes' ) if $require;
emit ( " SW_${base}_IS_USABLE=Yes" , emit ( " SW_${base}_IS_USABLE=Yes" ,
'fi' ); 'fi' );
if ( $wildcards ) { if ( $wildcards ) {
pop_indent, emit( 'fi' ) if $wild; pop_indent, emit( 'fi' ) if $wild;
emit( ';;' ); emit( ';;' );
pop_indent; pop_indent;
}
} }
} }

View File

@@ -4299,7 +4299,7 @@ sub process_mangle_rule1( $$$$$$$$$$$$$$$$$$ ) {
}, },
DSCP => { DSCP => {
defaultchain => 0, defaultchain => POSTROUTING,
allowedchains => PREROUTING | FORWARD | OUTPUT | POSTROUTING, allowedchains => PREROUTING | FORWARD | OUTPUT | POSTROUTING,
minparams => 1, minparams => 1,
maxparams => 1, maxparams => 1,

View File

@@ -350,9 +350,10 @@ sub process_simple_device() {
for ( my $i = 1; $i <= 3; $i++ ) { for ( my $i = 1; $i <= 3; $i++ ) {
my $prio = 16 | $i; my $prio = 16 | $i;
my $j = $i + 3;
emit "run_tc qdisc add dev $physical parent $number:$i handle ${number}${i}: sfq quantum 1875 limit 127 perturb 10"; emit "run_tc qdisc add dev $physical parent $number:$i handle ${number}${i}: sfq quantum 1875 limit 127 perturb 10";
emit "run_tc filter add dev $physical protocol all prio $prio parent $number: handle $i fw classid $number:$i"; emit "run_tc filter add dev $physical protocol all prio $prio parent $number: handle $i fw classid $number:$i";
emit "run_tc filter add dev $physical protocol all prio 1 parent ${number}$i: flow hash keys $type divisor 1024" if $type ne '-' && have_capability 'FLOW_FILTER'; emit "run_tc filter add dev $physical protocol all prio 1 parent ${number}$i: handle $j flow hash keys $type divisor 1024" if $type ne '-' && have_capability 'FLOW_FILTER';
emit ''; emit '';
} }

View File

@@ -1587,7 +1587,7 @@ sub known_interface($)
name => $i , name => $i ,
number => $interfaceref->{number} , number => $interfaceref->{number} ,
physical => $physical , physical => $physical ,
base => var_base( $physical ) , base => $interfaceref->{base} ,
wildcard => $interfaceref->{wildcard} , wildcard => $interfaceref->{wildcard} ,
zones => $interfaceref->{zones} , zones => $interfaceref->{zones} ,
}; };

View File

@@ -4,7 +4,7 @@
# Required-Start: $network $remote_fs # Required-Start: $network $remote_fs
# Required-Stop: $network $remote_fs # Required-Stop: $network $remote_fs
# Default-Start: S # Default-Start: S
# Default-Stop: 0 6 # Default-Stop: 0 1 6
# Short-Description: Configure the firewall at boot time # Short-Description: Configure the firewall at boot time
# Description: Configure the firewall according to the rules specified in # Description: Configure the firewall according to the rules specified in
# /etc/shorewall # /etc/shorewall
@@ -97,10 +97,11 @@ shorewall_start () {
# stop the firewall # stop the firewall
shorewall_stop () { shorewall_stop () {
echo -n "Stopping \"Shorewall firewall\": "
if [ "$SAFESTOP" = 1 ]; then if [ "$SAFESTOP" = 1 ]; then
echo -n "Stopping \"Shorewall firewall\": "
$SRWL $SRWL_OPTS stop >> $INITLOG 2>&1 && echo "done." || echo_notdone $SRWL $SRWL_OPTS stop >> $INITLOG 2>&1 && echo "done." || echo_notdone
else else
echo -n "Clearing all \"Shorewall firewall\" rules: "
$SRWL $SRWL_OPTS clear >> $INITLOG 2>&1 && echo "done." || echo_notdone $SRWL $SRWL_OPTS clear >> $INITLOG 2>&1 && echo "done." || echo_notdone
fi fi
return 0 return 0
@@ -145,7 +146,7 @@ case "$1" in
restart) restart)
shorewall_restart shorewall_restart
;; ;;
force0reload|reload) force-reload|reload)
shorewall_reload shorewall_reload
;; ;;
status) status)

View File

@@ -355,7 +355,8 @@ DIVERTHA - - tcp</programlisting>
EF =&gt; 0x2e</programlisting> EF =&gt; 0x2e</programlisting>
<para>To indicate more than one class, add their hex values <para>To indicate more than one class, add their hex values
together and specify the result.</para> together and specify the result. By default, DSCP rules are
placed in the POSTROUTING chain.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>

View File

@@ -1354,7 +1354,7 @@ net all DROP info</programlisting>then the chain name is 'net-all'
<varlistentry> <varlistentry>
<term><emphasis <term><emphasis
role="bold">LOGFILE=</emphasis>[<emphasis>pathname</emphasis>]</term> role="bold">LOGFILE=</emphasis>[<emphasis>pathname</emphasis>|<option>systemd</option>]</term>
<listitem> <listitem>
<para>This parameter tells the /sbin/shorewall program where to look <para>This parameter tells the /sbin/shorewall program where to look
@@ -1364,7 +1364,10 @@ net all DROP info</programlisting>then the chain name is 'net-all'
log</emphasis>, and <emphasis role="bold">hits</emphasis> commands. log</emphasis>, and <emphasis role="bold">hits</emphasis> commands.
If not assigned or if assigned an empty value, /var/log/messages is If not assigned or if assigned an empty value, /var/log/messages is
assumed. For further information, see <ulink assumed. For further information, see <ulink
url="/shorewall_logging.html">http://www.shorewall.net/shorewall_logging.html</ulink>.</para> url="/shorewall_logging.html">http://www.shorewall.net/shorewall_logging.html</ulink>.
Beginning with Shorewall 5.0.10.1, you may specify
<option>systemd</option> to use <command>journelctl -r</command> to
read the log.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>

View File

@@ -5,7 +5,7 @@
# Required-Start: $network $remote_fs # Required-Start: $network $remote_fs
# Required-Stop: $network $remote_fs # Required-Stop: $network $remote_fs
# Default-Start: S # Default-Start: S
# Default-Stop: 0 6 # Default-Stop: 0 1 6
# Short-Description: Configure the firewall at boot time # Short-Description: Configure the firewall at boot time
# Description: Configure the firewall according to the rules specified in # Description: Configure the firewall according to the rules specified in
# /etc/shorewall6-lite # /etc/shorewall6-lite
@@ -92,10 +92,11 @@ shorewall6_start () {
# stop the firewall # stop the firewall
shorewall6_stop () { shorewall6_stop () {
echo -n "Stopping \"Shorewall6 Lite firewall\": "
if [ "$SAFESTOP" = 1 ]; then if [ "$SAFESTOP" = 1 ]; then
echo -n "Stopping \"Shorewall6 Lite firewall\": "
$SRWL $SRWL_OPTS stop >> $INITLOG 2>&1 && echo "done." || echo_notdone $SRWL $SRWL_OPTS stop >> $INITLOG 2>&1 && echo "done." || echo_notdone
else else
echo -n "Clearing all \"Shorewall6 Lite firewall\" rules: "
$SRWL $SRWL_OPTS clear >> $INITLOG 2>&1 && echo "done." || echo_notdone $SRWL $SRWL_OPTS clear >> $INITLOG 2>&1 && echo "done." || echo_notdone
fi fi
return 0 return 0

View File

@@ -4,7 +4,7 @@
# Required-Start: $network $remote_fs # Required-Start: $network $remote_fs
# Required-Stop: $network $remote_fs # Required-Stop: $network $remote_fs
# Default-Start: S # Default-Start: S
# Default-Stop: 0 6 # Default-Stop: 0 1 6
# Short-Description: Configure the firewall at boot time # Short-Description: Configure the firewall at boot time
# Description: Configure the firewall according to the rules specified in # Description: Configure the firewall according to the rules specified in
# /etc/shorewall6 # /etc/shorewall6
@@ -97,10 +97,11 @@ shorewall6_start () {
# stop the firewall # stop the firewall
shorewall6_stop () { shorewall6_stop () {
echo -n "Stopping \"Shorewall6 firewall\": "
if [ "$SAFESTOP" = 1 ]; then if [ "$SAFESTOP" = 1 ]; then
echo -n "Stopping \"Shorewall6 firewall\": "
$SRWL $SRWL_OPTS stop >> $INITLOG 2>&1 && echo "done." || echo_notdone $SRWL $SRWL_OPTS stop >> $INITLOG 2>&1 && echo "done." || echo_notdone
else else
echo -n "Clearing all \"Shorewall6 firewall\" rules: "
$SRWL $SRWL_OPTS clear >> $INITLOG 2>&1 && echo "done." || echo_notdone $SRWL $SRWL_OPTS clear >> $INITLOG 2>&1 && echo "done." || echo_notdone
fi fi
return 0 return 0

View File

@@ -356,7 +356,8 @@ DIVERTHA - - tcp</programlisting>
EF =&gt; 0x2e</programlisting> EF =&gt; 0x2e</programlisting>
<para>To indicate more than one class, add their hex values <para>To indicate more than one class, add their hex values
together and specify the result.</para> together and specify the result. By default, DSCP rules are
placed in the POSTROUTING chain.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
@@ -633,7 +634,7 @@ INLINE eth0 - ; -p tcp -j MARK --set
<listitem> <listitem>
<para>The third number specifies the number of log <para>The third number specifies the number of log
messages that should be buffered in the kernel before they messages that should be buffered in the kernel before they
are sent to user space. The default is 1. </para> are sent to user space. The default is 1.</para>
</listitem> </listitem>
</itemizedlist> </itemizedlist>
</listitem> </listitem>

View File

@@ -1166,7 +1166,7 @@ net all DROP info</programlisting>then the chain name is 'net-all'
<varlistentry> <varlistentry>
<term><emphasis <term><emphasis
role="bold">LOGFILE=</emphasis>[<emphasis>pathname</emphasis>]</term> role="bold">LOGFILE=</emphasis>[<emphasis>pathname</emphasis>|<option>systemd</option>]</term>
<listitem> <listitem>
<para>This parameter tells the /sbin/shorewall6 program where to <para>This parameter tells the /sbin/shorewall6 program where to
@@ -1175,7 +1175,9 @@ net all DROP info</programlisting>then the chain name is 'net-all'
role="bold">logwatch</emphasis>, <emphasis role="bold">show role="bold">logwatch</emphasis>, <emphasis role="bold">show
log</emphasis>, and <emphasis role="bold">hits</emphasis> commands. log</emphasis>, and <emphasis role="bold">hits</emphasis> commands.
If not assigned or if assigned an empty value, /var/log/messages is If not assigned or if assigned an empty value, /var/log/messages is
assumed.</para> assumed. Beginning with Shorewall 5.0.10.1, you may specify
<option>systemd</option> to use <command>journelctl -r</command> to
read the log.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>

View File

@@ -61,7 +61,7 @@
<listitem> <listitem>
<para><emphasis role="bold">Shorewall6</emphasis>. This package <para><emphasis role="bold">Shorewall6</emphasis>. This package
requires the Shorewall package and adds those components needed to requires the Shorewall package and adds those components needed to
create an IPv6 fireawall.</para> create an IPv6 firewall.</para>
</listitem> </listitem>
<listitem> <listitem>

View File

@@ -26,6 +26,8 @@
<year>2011</year> <year>2011</year>
<year>2016</year>
<holder>Thomas M. Eastep</holder> <holder>Thomas M. Eastep</holder>
</copyright> </copyright>
@@ -89,7 +91,9 @@
<listitem> <listitem>
<para><ulink url="two-interface.htm">Two-interface</ulink> Linux System <para><ulink url="two-interface.htm">Two-interface</ulink> Linux System
acting as a firewall/router for a small local network</para> acting as a firewall/router for a small local network. For
Redhat-specific install/configure information, see <ulink url="???">this
article </ulink>contributed by Digimer.</para>
</listitem> </listitem>
<listitem> <listitem>

View File

@@ -398,7 +398,7 @@ ACCEPT net $FW tcp 22</programlisting>
<listitem> <listitem>
<para><emphasis role="bold">Shorewall6</emphasis>. This package <para><emphasis role="bold">Shorewall6</emphasis>. This package
requires the Shorewall package and adds those components needed to requires the Shorewall package and adds those components needed to
create an IPv6 fireawall.</para> create an IPv6 firewall.</para>
</listitem> </listitem>
<listitem> <listitem>

View File

@@ -297,8 +297,8 @@ State:Stopped (Thu Mar 30 14:08:11 PDT 2006)</programlisting>
</listitem> </listitem>
<listitem> <listitem>
<para>Post the <filename>/tmp/status.txt</filename> file as an <para>Post the <filename>/tmp/shorewall_dump.txt</filename> file
attachment compressed with gzip or bzip2.</para> as an attachment compressed with gzip or bzip2.</para>
</listitem> </listitem>
<listitem> <listitem>