Compare commits

..

19 Commits

Author SHA1 Message Date
Tom Eastep
6b21135ade Correct handling of an ipset in the SPORT column
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-04-11 18:37:27 -07:00
Tom Eastep
2f3f6ffa15 Revert "Make $update global in Config.pm"
This reverts commit b9d0821acb.
2019-03-17 08:02:53 -07:00
Tom Eastep
60f2f3b0d0 Allow variable expansion when processing shorewallrc.
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-03-14 20:38:10 -07:00
Tom Eastep
e626b77097 Correct policy zone exclusion handling
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-02-21 09:31:13 -08:00
Tom Eastep
15dd14e167 Correct link to Roberto's repository
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-02-08 10:47:43 -08:00
Tom Eastep
83b586c192 More document changes
- Include Linuxfest presentation titles

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-02-08 10:45:09 -08:00
Matt Darfeuille
d3fcb29f0d Use proper function name for warning messages
Signed-off-by: Matt Darfeuille <matdarf@gmail.com>
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-02-07 10:44:46 -08:00
Tom Eastep
a4ed419aba Add new manpages to Manpages web page
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-02-07 10:42:23 -08:00
Tom Eastep
e548043e96 Remove modules files
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-02-06 14:17:10 -08:00
Tom Eastep
443a4223c2 Remove pre-2.6.20 helpers
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-02-06 14:11:48 -08:00
Tom Eastep
8f42a6a72b Remove LOAD_HELPERS_ONLY
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-02-03 10:04:19 -08:00
Tom Eastep
0982fec513 Remove superfluous whitespace from Providers.pm
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-02-01 12:44:44 -08:00
Tom Eastep
f5262dd050 Correct typo in shorewall-providers(5)
- RESTORE_DEFAULT_OPTION -> RESTORE_DEFAULT_GATEWAY
2019-02-01 12:44:00 -08:00
Tom Eastep
8dcfd86f3a Document compiler globals
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-01-24 08:26:27 -08:00
Tom Eastep
edc9e25f25 Deprecate 'all[+]-'
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-01-23 12:35:07 -08:00
Tom Eastep
ef11ae834d Drop documentation for all-
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-01-22 15:53:33 -08:00
Tom Eastep
9f423412d8 Allow zone exclusion in the policy file
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-01-22 12:35:23 -08:00
Tom Eastep
7f7fef3a4e Disallow 'all' in a policy zone list
Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-01-21 10:00:36 -08:00
Tom Eastep
b9d0821acb Make $update global in Config.pm
- Only save raw image if we are updating

Signed-off-by: Tom Eastep <teastep@shorewall.net>
2019-01-20 11:06:40 -08:00
45 changed files with 216 additions and 687 deletions

View File

@@ -411,7 +411,7 @@ load_kernel_modules() # $1 = Yes, if we are to save moduleinfo in $VARDIR
[ -d $directory ] && moduledirectories="$moduledirectories $directory" [ -d $directory ] && moduledirectories="$moduledirectories $directory"
done done
[ -n "$LOAD_HELPERS_ONLY" ] && modules=$(find_file helpers) || modules=$(find_file modules) modules=$(find_file helpers)
if [ -f $modules -a -n "$moduledirectories" ]; then if [ -f $modules -a -n "$moduledirectories" ]; then
[ -d /sys/module/ ] || MODULES=$(lsmod | cut -d ' ' -f1) [ -d /sys/module/ ] || MODULES=$(lsmod | cut -d ' ' -f1)

View File

@@ -426,6 +426,11 @@ echo "Capability file builder installed in ${DESTDIR}${LIBEXECDIR}/$PRODUCT/shor
if [ -f modules ]; then if [ -f modules ]; then
install_file modules ${DESTDIR}${SHAREDIR}/$PRODUCT/modules 0600 install_file modules ${DESTDIR}${SHAREDIR}/$PRODUCT/modules 0600
echo "Modules file installed as ${DESTDIR}${SHAREDIR}/$PRODUCT/modules" echo "Modules file installed as ${DESTDIR}${SHAREDIR}/$PRODUCT/modules"
for f in modules.*; do
install_file $f ${DESTDIR}${SHAREDIR}/$PRODUCT/$f 0644
echo "Module file $f installed as ${DESTDIR}${SHAREDIR}/$PRODUCT/$f"
done
fi fi
if [ -f helpers ]; then if [ -f helpers ]; then
@@ -433,11 +438,6 @@ if [ -f helpers ]; then
echo "Helper modules file installed as ${DESTDIR}${SHAREDIR}/$PRODUCT/helpers" echo "Helper modules file installed as ${DESTDIR}${SHAREDIR}/$PRODUCT/helpers"
fi fi
for f in modules.*; do
install_file $f ${DESTDIR}${SHAREDIR}/$PRODUCT/$f 0644
echo "Module file $f installed as ${DESTDIR}${SHAREDIR}/$PRODUCT/$f"
done
# #
# Install the Man Pages # Install the Man Pages
# #

View File

@@ -4991,10 +4991,10 @@ sub do_proto( $$$;$ )
$invert = $sports =~ s/^!// ? '! ' : ''; $invert = $sports =~ s/^!// ? '! ' : '';
if ( $ports =~ /^\+/ ) { if ( $sports =~ /^\+/ ) {
$output .= $invert; $output .= $invert;
$output .= '-m set '; $output .= '-m set ';
$output .= get_set_flags( $ports, 'src' ); $output .= get_set_flags( $sports, 'src' );
} elsif ( $multiport ) { } elsif ( $multiport ) {
if ( port_count( $sports ) > 15 ) { if ( port_count( $sports ) > 15 ) {
if ( $restricted ) { if ( $restricted ) {
@@ -5207,8 +5207,8 @@ sub do_iproto( $$$ )
fatal_error "'=' in the SOURCE PORT(S) column requires one or more ports in the DEST PORT(S) column" if $sports eq '='; fatal_error "'=' in the SOURCE PORT(S) column requires one or more ports in the DEST PORT(S) column" if $sports eq '=';
$invert = $sports =~ s/^!// ? '! ' : ''; $invert = $sports =~ s/^!// ? '! ' : '';
if ( $ports =~ /^\+/ ) { if ( $sports =~ /^\+/ ) {
push @output, set => ${invert} . get_set_flags( $ports, 'src' ); push @output, set => ${invert} . get_set_flags( $sports, 'src' );
} elsif ( $multiport ) { } elsif ( $multiport ) {
if ( port_count( $sports ) > 15 ) { if ( port_count( $sports ) > 15 ) {
if ( $restricted ) { if ( $restricted ) {

View File

@@ -47,13 +47,13 @@ our @EXPORT = qw( compiler );
our @EXPORT_OK = qw( $export ); our @EXPORT_OK = qw( $export );
our $VERSION = 'MODULEVERSION'; our $VERSION = 'MODULEVERSION';
our $export; our $export; # True when compiling for export
our $test; our $test; # True when running regression tests
our $family; our $family; # IP address family (4 or 6)
our $have_arptables; our $have_arptables; # True if we have arptables rules
# #
# Initilize the package-globals in the other modules # Initilize the package-globals in the other modules
@@ -384,7 +384,7 @@ sub generate_script_3() {
save_progress_message 'Initializing...'; save_progress_message 'Initializing...';
if ( $export || $config{EXPORTMODULES} ) { if ( $export || $config{EXPORTMODULES} ) {
my $fn = find_file( $config{LOAD_HELPERS_ONLY} ? 'helpers' : 'modules' ); my $fn = find_file( 'helpers' );
if ( -f $fn && ( $config{EXPORTMODULES} || ( $export && ! $fn =~ "^$globals{SHAREDIR}/" ) ) ) { if ( -f $fn && ( $config{EXPORTMODULES} || ( $export && ! $fn =~ "^$globals{SHAREDIR}/" ) ) ) {
emit 'echo MODULESDIR=\"$MODULESDIR\" > ${VARDIR}/.modulesdir'; emit 'echo MODULESDIR=\"$MODULESDIR\" > ${VARDIR}/.modulesdir';

View File

@@ -396,7 +396,7 @@ our %renamed = ( AUTO_COMMENT => 'AUTOCOMMENT', BLACKLIST_LOGLEVEL => 'BLACKLIST
# #
# Config options and global settings that are to be copied to output script # Config options and global settings that are to be copied to output script
# #
our @propagateconfig = qw/ DISABLE_IPV6 MODULESDIR LOAD_HELPERS_ONLY LOCKFILE SUBSYSLOCK LOG_VERBOSITY RESTART/; our @propagateconfig = qw/ DISABLE_IPV6 MODULESDIR LOCKFILE SUBSYSLOCK LOG_VERBOSITY RESTART/;
# #
# From parsing the capabilities file or detecting capabilities # From parsing the capabilities file or detecting capabilities
# #
@@ -731,18 +731,19 @@ our %converted = (
# #
# Eliminated options # Eliminated options
# #
our %eliminated = ( LOGRATE => 1, our %eliminated = ( LOGRATE => 1,
LOGBURST => 1, LOGBURST => 1,
EXPORTPARAMS => 1, EXPORTPARAMS => 1,
LEGACY_FASTSTART => 1, LEGACY_FASTSTART => 1,
IPSECFILE => 1, IPSECFILE => 1,
WIDE_TC_MARKS => 1, WIDE_TC_MARKS => 1,
HIGH_ROUTE_MARKS => 1, HIGH_ROUTE_MARKS => 1,
BLACKLISTNEWONLY => 1, BLACKLISTNEWONLY => 1,
CHAIN_SCRIPTS => 1, CHAIN_SCRIPTS => 1,
MODULE_SUFFIX => 1, MODULE_SUFFIX => 1,
MAPOLDACTIONS => 1, MAPOLDACTIONS => 1,
INLINE_MATCHES => 1, INLINE_MATCHES => 1,
LOAD_HELPERS_ONLY => 1,
); );
# #
# Variables involved in ?IF, ?ELSE ?ENDIF processing # Variables involved in ?IF, ?ELSE ?ENDIF processing
@@ -980,7 +981,6 @@ sub initialize( $;$$$) {
OPTIMIZE_ACCOUNTING => undef, OPTIMIZE_ACCOUNTING => undef,
ACCOUNTING_TABLE => undef, ACCOUNTING_TABLE => undef,
DYNAMIC_BLACKLIST => undef, DYNAMIC_BLACKLIST => undef,
LOAD_HELPERS_ONLY => undef,
REQUIRE_INTERFACE => undef, REQUIRE_INTERFACE => undef,
FORWARD_CLEAR_MARK => undef, FORWARD_CLEAR_MARK => undef,
COMPLETE => undef, COMPLETE => undef,
@@ -4073,14 +4073,16 @@ sub process_shorewallrc( $$ ) {
my ( $shorewallrc , $product ) = @_; my ( $shorewallrc , $product ) = @_;
$shorewallrc{PRODUCT} = $product; $shorewallrc{PRODUCT} = $product;
$variables{PRODUCT} = $product;
if ( open_file $shorewallrc ) { if ( open_file $shorewallrc ) {
while ( read_a_line( STRIP_COMMENTS | SUPPRESS_WHITESPACE | CHECK_GUNK ) ) { while ( read_a_line( STRIP_COMMENTS | SUPPRESS_WHITESPACE | CHECK_GUNK | EXPAND_VARIABLES ) ) {
if ( $currentline =~ /^([a-zA-Z]\w*)=(.*)$/ ) { if ( $currentline =~ /^([a-zA-Z]\w*)=(.*)$/ ) {
my ($var, $val) = ($1, $2); my ($var, $val) = ($1, $2);
$val = $1 if $val =~ /^\"([^\"]*)\"$/; $val = $1 if $val =~ /^\"([^\"]*)\"$/;
expand_shorewallrc_variables($val) if supplied $val; expand_shorewallrc_variables($val) if supplied $val;
$shorewallrc{$var} = $val; $shorewallrc{$var} = $val;
$variables{$var} = $val;
} else { } else {
fatal_error "Unrecognized shorewallrc entry"; fatal_error "Unrecognized shorewallrc entry";
} }
@@ -4451,7 +4453,7 @@ sub load_kernel_modules( ) {
push @moduledirectories, $_ if -d $_; push @moduledirectories, $_ if -d $_;
} }
if ( $moduleloader && @moduledirectories && open_file( $config{LOAD_HELPERS_ONLY} ? 'helpers' : 'modules' ) ) { if ( $moduleloader && @moduledirectories && open_file( 'helpers' ) ) {
my %loadedmodules; my %loadedmodules;
$loadedmodules{$_}++ for split_list( $config{DONT_LOAD}, 'module' ); $loadedmodules{$_}++ for split_list( $config{DONT_LOAD}, 'module' );
@@ -5250,111 +5252,6 @@ sub determine_capabilities() {
qt1( "$iptables $iptablesw -A $sillyname -m state --state ESTABLISHED,RELATED -j ACCEPT");; qt1( "$iptables $iptablesw -A $sillyname -m state --state ESTABLISHED,RELATED -j ACCEPT");;
$globals{KLUDGEFREE} = $capabilities{KLUDGEFREE} = detect_capability 'KLUDGEFREE'; $globals{KLUDGEFREE} = $capabilities{KLUDGEFREE} = detect_capability 'KLUDGEFREE';
unless ( $config{ LOAD_HELPERS_ONLY } ) {
#
# Using 'detect_capability()' is a bit less efficient than calling the individual detection
# functions but it ensures that %detect_capability is initialized properly.
#
$capabilities{NAT_ENABLED} = detect_capability( 'NAT_ENABLED' );
$capabilities{PERSISTENT_SNAT} = detect_capability( 'PERSISTENT_SNAT' );
$capabilities{NAT_INPUT_CHAIN} = detect_capability( 'NAT_INPUT_CHAIN' );
$capabilities{MANGLE_ENABLED} = detect_capability( 'MANGLE_ENABLED' );
if ( $capabilities{CONNTRACK_MATCH} = detect_capability( 'CONNTRACK_MATCH' ) ) {
$capabilities{NEW_CONNTRACK_MATCH} = detect_capability( 'NEW_CONNTRACK_MATCH' );
$capabilities{OLD_CONNTRACK_MATCH} = detect_capability( 'OLD_CONNTRACK_MATCH' );
} else {
$capabilities{NEW_CONNTRACK_MATCH} = '';
$capabilities{OLD_CONNTRACK_MATCH} = '';
}
$capabilities{ MULTIPORT } = detect_capability( 'MULTIPORT' );
$capabilities{XMULTIPORT} = detect_capability( 'XMULTIPORT' );
$capabilities{EMULTIPORT} = detect_capability( 'EMULTIPORT' );
$capabilities{POLICY_MATCH} = detect_capability( 'POLICY_MATCH' );
if ( $capabilities{PHYSDEV_MATCH} = detect_capability( 'PHYSDEV_MATCH' ) ) {
$capabilities{PHYSDEV_BRIDGE} = detect_capability( 'PHYSDEV_BRIDGE' );
} else {
$capabilities{PHYSDEV_BRIDGE} = '';
}
$capabilities{IPRANGE_MATCH} = detect_capability( 'IPRANGE_MATCH' );
$capabilities{RECENT_MATCH} = detect_capability( 'RECENT_MATCH' );
$capabilities{REAP_OPTION} = detect_capability( 'REAP_OPTION' );
$capabilities{OWNER_MATCH} = detect_capability( 'OWNER_MATCH' );
$capabilities{OWNER_NAME_MATCH}
= detect_capability( 'OWNER_NAME_MATCH' );
$capabilities{CONNMARK_MATCH} = detect_capability( 'CONNMARK_MATCH' );
$capabilities{XCONNMARK_MATCH} = detect_capability( 'XCONNMARK_MATCH' );
$capabilities{IPP2P_MATCH} = detect_capability( 'IPP2P_MATCH' );
$capabilities{OLD_IPP2P_MATCH} = detect_capability( 'OLD_IPP2P_MATCH' );
$capabilities{LENGTH_MATCH} = detect_capability( 'LENGTH_MATCH' );
$capabilities{ENHANCED_REJECT} = detect_capability( 'ENHANCED_REJECT' );
$capabilities{COMMENTS} = detect_capability( 'COMMENTS' );
$capabilities{OLD_HL_MATCH} = detect_capability( 'OLD_HL_MATCH' );
$capabilities{HASHLIMIT_MATCH} = detect_capability( 'HASHLIMIT_MATCH' );
$capabilities{MARK} = detect_capability( 'MARK' );
$capabilities{XMARK} = detect_capability( 'XMARK' );
$capabilities{EXMARK} = detect_capability( 'EXMARK' );
$capabilities{CONNMARK} = detect_capability( 'CONNMARK' );
$capabilities{XCONNMARK} = detect_capability( 'XCONNMARK' );
$capabilities{CLASSIFY_TARGET} = detect_capability( 'CLASSIFY_TARGET' );
$capabilities{IPMARK_TARGET} = detect_capability( 'IPMARK_TARGET' );
$capabilities{TPROXY_TARGET} = detect_capability( 'TPROXY_TARGET' );
$capabilities{MANGLE_FORWARD} = detect_capability( 'MANGLE_FORWARD' );
$capabilities{RAW_TABLE} = detect_capability( 'RAW_TABLE' );
$capabilities{IPSET_MATCH} = detect_capability( 'IPSET_MATCH' );
$capabilities{ADDRTYPE} = detect_capability( 'ADDRTYPE' );
$capabilities{TCPMSS_MATCH} = detect_capability( 'TCPMSS_MATCH' );
$capabilities{NFQUEUE_TARGET} = detect_capability( 'NFQUEUE_TARGET' );
$capabilities{REALM_MATCH} = detect_capability( 'REALM_MATCH' );
$capabilities{CONNLIMIT_MATCH} = detect_capability( 'CONNLIMIT_MATCH' );
$capabilities{TIME_MATCH} = detect_capability( 'TIME_MATCH' );
$capabilities{GOTO_TARGET} = detect_capability( 'GOTO_TARGET' );
$capabilities{LOG_TARGET} = detect_capability( 'LOG_TARGET' );
$capabilities{ULOG_TARGET} = detect_capability( 'ULOG_TARGET' );
$capabilities{NFLOG_TARGET} = detect_capability( 'NFLOG_TARGET' );
$capabilities{LOGMARK_TARGET} = detect_capability( 'LOGMARK_TARGET' );
$capabilities{FLOW_FILTER} = detect_capability( 'FLOW_FILTER' );
$capabilities{FWMARK_RT_MASK} = detect_capability( 'FWMARK_RT_MASK' );
$capabilities{MARK_ANYWHERE} = detect_capability( 'MARK_ANYWHERE' );
$capabilities{ACCOUNT_TARGET} = detect_capability( 'ACCOUNT_TARGET' );
$capabilities{HEADER_MATCH} = detect_capability( 'HEADER_MATCH' );
$capabilities{AUDIT_TARGET} = detect_capability( 'AUDIT_TARGET' );
$capabilities{IPSET_V5} = detect_capability( 'IPSET_V5' );
$capabilities{CONDITION_MATCH} = detect_capability( 'CONDITION_MATCH' );
$capabilities{IPTABLES_S} = detect_capability( 'IPTABLES_S' );
$capabilities{BASIC_FILTER} = detect_capability( 'BASIC_FILTER' );
$capabilities{BASIC_EMATCH} = detect_capability( 'BASIC_EMATCH' );
$capabilities{CT_TARGET} = detect_capability( 'CT_TARGET' );
$capabilities{STATISTIC_MATCH} = detect_capability( 'STATISTIC_MATCH' );
$capabilities{IMQ_TARGET} = detect_capability( 'IMQ_TARGET' );
$capabilities{DSCP_MATCH} = detect_capability( 'DSCP_MATCH' );
$capabilities{DSCP_TARGET} = detect_capability( 'DSCP_TARGET' );
$capabilities{GEOIP_MATCH} = detect_capability( 'GEOIP_MATCH' );
$capabilities{RPFILTER_MATCH} = detect_capability( 'RPFILTER_MATCH' );
$capabilities{NFACCT_MATCH} = detect_capability( 'NFACCT_MATCH' );
$capabilities{CHECKSUM_TARGET} = detect_capability( 'CHECKSUM_TARGET' );
$capabilities{ARPTABLESJF} = detect_capability( 'ARPTABLESJF' );
$capabilities{MASQUERADE_TGT} = detect_capability( 'MASQUERADE_TGT' );
$capabilities{UDPLITEREDIRECT} = detect_capability( 'UDPLITEREDIRECT' );
$capabilities{NEW_TOS_MATCH} = detect_capability( 'NEW_TOS_MATCH' );
$capabilities{TARPIT_TARGET} = detect_capability( 'TARPIT_TARGET' );
$capabilities{IFACE_MATCH} = detect_capability( 'IFACE_MATCH' );
$capabilities{TCPMSS_TARGET} = detect_capability( 'TCPMSS_TARGET' );
$capabilities{CPU_FANOUT} = detect_capability( 'CPU_FANOUT' );
$capabilities{NETMAP_TARGET} = detect_capability( 'NETMAP_TARGET' );
$capabilities{NFLOG_SIZE} = detect_capability( 'NFLOG_SIZE' );
$capabilities{RESTORE_WAIT_OPTION}
= detect_capability( 'RESTORE_WAIT_OPTION' );
unless ( have_capability 'CT_TARGET' ) {
$capabilities{HELPER_MATCH} = detect_capability 'HELPER_MATCH';
}
}
} }
# #
@@ -6348,11 +6245,6 @@ sub get_configuration( $$$ ) {
unshift @INC, @config_path; unshift @INC, @config_path;
#
# get_capabilities requires that the true settings of these options be established
#
default_yes_no 'LOAD_HELPERS_ONLY' , 'Yes';
if ( ! $export && $> == 0 ) { if ( ! $export && $> == 0 ) {
get_capabilities($have_capabilities); get_capabilities($have_capabilities);
} }
@@ -6405,8 +6297,6 @@ sub get_configuration( $$$ ) {
$capabilities{$_} = 0 for grep /_HELPER/ , keys %capabilities; $capabilities{$_} = 0 for grep /_HELPER/ , keys %capabilities;
} }
report_capabilities unless $config{LOAD_HELPERS_ONLY};
# #
# Now initialize the used capabilities hash # Now initialize the used capabilities hash
# #
@@ -7144,8 +7034,6 @@ sub get_configuration( $$$ ) {
} }
convert_to_version_5_2 if $update; convert_to_version_5_2 if $update;
cleanup_iptables if $sillyname && ! $config{LOAD_HELPERS_ONLY};
} }
# #

View File

@@ -170,7 +170,6 @@ sub setup_route_marking() {
# #
# Clear the mark -- we have seen cases where the mark is non-zero even in the raw table chains! # Clear the mark -- we have seen cases where the mark is non-zero even in the raw table chains!
# #
if ( $config{ZERO_MARKS} ) { if ( $config{ZERO_MARKS} ) {
add_ijump( $mangle_table->{$_}, j => 'MARK', targetopts => '--set-mark 0' ) for qw/PREROUTING OUTPUT/; add_ijump( $mangle_table->{$_}, j => 'MARK', targetopts => '--set-mark 0' ) for qw/PREROUTING OUTPUT/;
} }
@@ -715,7 +714,6 @@ sub process_a_provider( $ ) {
$mark = ( $lastmark += ( 1 << $config{PROVIDER_OFFSET} ) ) if $mark eq '-' && $track; $mark = ( $lastmark += ( 1 << $config{PROVIDER_OFFSET} ) ) if $mark eq '-' && $track;
if ( $mark ne '-' ) { if ( $mark ne '-' ) {
require_capability( 'MANGLE_ENABLED' , 'Provider marks' , '' ); require_capability( 'MANGLE_ENABLED' , 'Provider marks' , '' );
if ( $tproxy && ! $local ) { if ( $tproxy && ! $local ) {

View File

@@ -292,6 +292,8 @@ our $mangle;
our $sticky; our $sticky;
our $excludefw;
our $divertref; # DIVERT chain our $divertref; # DIVERT chain
our %validstates = ( NEW => 0, our %validstates = ( NEW => 0,
@@ -365,6 +367,10 @@ sub initialize( $ ) {
# #
%actions = (); %actions = ();
# #
# Count of 'all[+]=' encountered
#
$excludefw = 0;
#
# Action variants actually used. Key is <action>:<loglevel>:<tag>:<caller>:<params>; value is corresponding chain name # Action variants actually used. Key is <action>:<loglevel>:<tag>:<caller>:<params>; value is corresponding chain name
# #
%usedactions = (); %usedactions = ();
@@ -672,14 +678,42 @@ sub process_a_policy1($$$$$$$) {
my ( $client, $server, $originalpolicy, $loglevel, $synparams, $connlimit, $intrazone ) = @_; my ( $client, $server, $originalpolicy, $loglevel, $synparams, $connlimit, $intrazone ) = @_;
my $clientwild = ( "\L$client" =~ /^all(\+)?$/ ); my $clientwild = ( "\L$client" =~ /^all(\+)?(?:!(.+))?$/ );
my $clientexclude;
my %clientexcluded;
$intrazone ||= $clientwild && $1; if ( $clientwild ) {
$intrazone ||= $1;
if ( $clientexclude = $2 ) {
for my $client ( split_list( $clientexclude, 'zone' ) ) {
fatal_error "Undefined zone ($client)" unless defined_zone( $client );
$clientexcluded{$client} = 1;
}
$client = 'all';
}
}
fatal_error "Undefined zone ($client)" unless $clientwild || defined_zone( $client ); fatal_error "Undefined zone ($client)" unless $clientwild || defined_zone( $client );
my $serverwild = ( "\L$server" =~ /^all(\+)?/ ); my $serverwild = ( "\L$server" =~ /^all(\+)?(?:!(.+))?/ );
$intrazone ||= ( $serverwild && $1 ); my $serverexclude;
my %serverexcluded;
if ( $serverwild ) {
$intrazone ||= $1;
if ( $serverexclude = $2 ) {
for my $server ( split_list( $serverexclude, 'zone' ) ) {
fatal_error "Undefined zone ($server)" unless defined_zone( $server );
$serverexcluded{$server} = 1;
}
$server = 'all';
}
}
fatal_error "Undefined zone ($server)" unless $serverwild || defined_zone( $server ); fatal_error "Undefined zone ($server)" unless $serverwild || defined_zone( $server );
@@ -762,20 +796,20 @@ sub process_a_policy1($$$$$$$) {
if ( $clientwild ) { if ( $clientwild ) {
if ( $serverwild ) { if ( $serverwild ) {
for my $zone ( @zonelist ) { for my $zone ( grep( ! $clientexcluded{$_}, @zonelist ) ) {
for my $zone1 ( @zonelist ) { for my $zone1 ( grep( ! $serverexcluded{zone}, @zonelist ) ) {
set_policy_chain $zone, $zone1, $chainref, $policy, $intrazone; set_policy_chain $zone, $zone1, $chainref, $policy, $intrazone;
print_policy $zone, $zone1, $originalpolicy, $chain; print_policy $zone, $zone1, $originalpolicy, $chain;
} }
} }
} else { } else {
for my $zone ( all_zones ) { for my $zone ( grep( ! $clientexcluded{$_}, all_zones ) ) {
set_policy_chain $zone, $server, $chainref, $policy, $intrazone; set_policy_chain $zone, $server, $chainref, $policy, $intrazone;
print_policy $zone, $server, $originalpolicy, $chain; print_policy $zone, $server, $originalpolicy, $chain;
} }
} }
} elsif ( $serverwild ) { } elsif ( $serverwild ) {
for my $zone ( @zonelist ) { for my $zone ( grep( ! $serverexcluded{$_}, @zonelist ) ) {
set_policy_chain $client, $zone, $chainref, $policy, $intrazone; set_policy_chain $client, $zone, $chainref, $policy, $intrazone;
print_policy $client, $zone, $originalpolicy, $chain; print_policy $client, $zone, $originalpolicy, $chain;
} }
@@ -802,11 +836,15 @@ sub process_a_policy() {
my ( $intrazone, $clientlist, $serverlist ); my ( $intrazone, $clientlist, $serverlist );
if ( $clientlist = ( $clients =~ /,/ ) ) { if ( $clients =~ /^all(\+)?!/ ) {
$intrazone = $1;
} elsif ( $clientlist = ( $clients =~ /,/ ) ) {
$intrazone = ( $clients =~ s/\+$// ); $intrazone = ( $clients =~ s/\+$// );
} }
if ( $serverlist = ( $servers =~ /,/ ) ) { if ( $servers =~ /^all(\+)?!/ ) {
$intrazone = $1;
} elsif ( $serverlist = ( $servers =~ /,/ ) ) {
$intrazone ||= ( $servers =~ s/\+$// ); $intrazone ||= ( $servers =~ s/\+$// );
} }
@@ -816,12 +854,14 @@ sub process_a_policy() {
if ( $clientlist || $serverlist ) { if ( $clientlist || $serverlist ) {
for my $client ( split_list( $clients, 'zone' ) ) { for my $client ( split_list( $clients, 'zone' ) ) {
fatal_error "'all' is not allowed in a source zone list" if $clientlist && $client =~ /^all\b/;
for my $server ( split_list( $servers, 'zone' ) ) { for my $server ( split_list( $servers, 'zone' ) ) {
fatal_error "'all' is not allowed in a destination zone list" if $serverlist && $server =~ /^all\b/;
process_a_policy1( $client, $server, $policy, $loglevel, $synparams, $connlimit, $intrazone ) if $intrazone || $client ne $server; process_a_policy1( $client, $server, $policy, $loglevel, $synparams, $connlimit, $intrazone ) if $intrazone || $client ne $server;
} }
} }
} else { } else {
process_a_policy1( $clients, $servers, $policy, $loglevel, $synparams, $connlimit, 0 ); process_a_policy1( $clients, $servers, $policy, $loglevel, $synparams, $connlimit, $intrazone );
} }
} }
@@ -3659,6 +3699,7 @@ sub next_section() {
# #
sub build_zone_list( $$$\$\$ ) { sub build_zone_list( $$$\$\$ ) {
my ($fw, $input, $which, $intrazoneref, $wildref ) = @_; my ($fw, $input, $which, $intrazoneref, $wildref ) = @_;
my $original_input = $input;
my $any = ( $input =~ s/^any/all/ ); my $any = ( $input =~ s/^any/all/ );
my $exclude; my $exclude;
my $rest; my $rest;
@@ -3687,9 +3728,25 @@ sub build_zone_list( $$$\$\$ ) {
if ( $input eq 'all+' ) { if ( $input eq 'all+' ) {
$$intrazoneref = 1; $$intrazoneref = 1;
} elsif ( ( $input eq 'all+-' ) || ( $input eq 'all-+' ) ) { } elsif ( ( $input eq 'all+-' ) || ( $input eq 'all-+' ) ) {
unless ( $excludefw++ ) {
if ( $any ) {
warning_message "$original_input is deprecated in favor of 'any+!\$FW'";
} else {
warning_message "$original_input is deprecated in favor of 'all+!\$FW'";
}
}
$$intrazoneref = 1; $$intrazoneref = 1;
$exclude{$fw} = 1; $exclude{$fw} = 1;
} elsif ( $input eq 'all-' ) { } elsif ( $input eq 'all-' ) {
unless ( $excludefw++ ) {
if ( $any ) {
warning_message "any- is deprecated in favor of 'any!\$FW'";
} else {
warning_message "all- is deprecated in favor of 'all!\$FW'" unless $excludefw++;
}
}
$exclude{$fw} = 1; $exclude{$fw} = 1;
} else { } else {
fatal_error "Invalid $which ($input)"; fatal_error "Invalid $which ($input)";

View File

@@ -34,6 +34,8 @@
# --debug # Print stack trace on warnings and fatal error. # --debug # Print stack trace on warnings and fatal error.
# --log=<filename> # Log file # --log=<filename> # Log file
# --log_verbosity=<number> # Log Verbosity range -1 to 2 # --log_verbosity=<number> # Log Verbosity range -1 to 2
# --test # Used by the regression library to omit versions and time/dates
# # from the generated script
# --family=<number> # IP family; 4 = IPv4 (default), 6 = IPv6 # --family=<number> # IP family; 4 = IPv4 (default), 6 = IPv6
# --preview # Preview the ruleset. # --preview # Preview the ruleset.
# --shorewallrc=<path> # Path to global shorewallrc file. # --shorewallrc=<path> # Path to global shorewallrc file.

View File

@@ -191,8 +191,6 @@ IP_FORWARDING=On
KEEP_RT_TABLES=No KEEP_RT_TABLES=No
LOAD_HELPERS_ONLY=Yes
MACLIST_TABLE=filter MACLIST_TABLE=filter
MACLIST_TTL= MACLIST_TTL=

View File

@@ -202,8 +202,6 @@ IP_FORWARDING=Off
KEEP_RT_TABLES=No KEEP_RT_TABLES=No
LOAD_HELPERS_ONLY=Yes
MACLIST_TABLE=filter MACLIST_TABLE=filter
MACLIST_TTL= MACLIST_TTL=

View File

@@ -199,8 +199,6 @@ IP_FORWARDING=On
KEEP_RT_TABLES=No KEEP_RT_TABLES=No
LOAD_HELPERS_ONLY=Yes
MACLIST_TABLE=filter MACLIST_TABLE=filter
MACLIST_TTL= MACLIST_TTL=

View File

@@ -202,8 +202,6 @@ IP_FORWARDING=On
KEEP_RT_TABLES=No KEEP_RT_TABLES=No
LOAD_HELPERS_ONLY=Yes
MACLIST_TABLE=filter MACLIST_TABLE=filter
MACLIST_TTL= MACLIST_TTL=

View File

@@ -191,8 +191,6 @@ IP_FORWARDING=Keep
KEEP_RT_TABLES=No KEEP_RT_TABLES=No
LOAD_HELPERS_ONLY=Yes
MACLIST_TABLE=filter MACLIST_TABLE=filter
MACLIST_TTL= MACLIST_TTL=

View File

@@ -16,25 +16,6 @@
# Helpers # Helpers
# #
loadmodule ip_conntrack_amanda
loadmodule ip_conntrack_ftp
loadmodule ip_conntrack_h323
loadmodule ip_conntrack_irc
loadmodule ip_conntrack_netbios_ns
loadmodule ip_conntrack_pptp
loadmodule ip_conntrack_sip
loadmodule ip_conntrack_tftp
loadmodule ip_nat_amanda
loadmodule ip_nat_ftp
loadmodule ip_nat_h323
loadmodule ip_nat_irc
loadmodule ip_nat_pptp
loadmodule ip_nat_sip
loadmodule ip_nat_snmp_basic
loadmodule ip_nat_tftp
#
# 2.6.20+ helpers
#
loadmodule nf_conntrack_ftp loadmodule nf_conntrack_ftp
loadmodule nf_conntrack_h323 loadmodule nf_conntrack_h323
loadmodule nf_conntrack_irc loadmodule nf_conntrack_irc

View File

@@ -466,17 +466,6 @@ if [ -z "$first_install" ]; then
fi fi
fi fi
#
# Install the Modules file
#
run_install $OWNERSHIP -m 0644 modules ${DESTDIR}${SHAREDIR}/${PRODUCT}/modules
echo "Modules file installed as ${DESTDIR}${SHAREDIR}/${PRODUCT}/modules"
for f in modules.*; do
run_install $OWNERSHIP -m 0644 $f ${DESTDIR}${SHAREDIR}/${PRODUCT}/$f
echo "Modules file $f installed as ${DESTDIR}${SHAREDIR}/${PRODUCT}/$f"
done
# #
# Install the Module Helpers file # Install the Module Helpers file
# #
@@ -1252,6 +1241,14 @@ if [ $PRODUCT = shorewall ]; then
rm -f ${DESTDIR}${SHAREDIR}/${PRODUCT}/deprecated/macro.SMTPTraps rm -f ${DESTDIR}${SHAREDIR}/${PRODUCT}/deprecated/macro.SMTPTraps
fi fi
#
# Remove unneeded modules files
#
if [ -n "$first_install" ]; then
rm -f ${DESTDIR}${SHAREDIR}/${PRODUCT}/modules*
fi
if [ $configure -eq 1 -a -z "$DESTDIR" -a -n "$first_install" -a -z "${cygwin}${mac}" ]; then if [ $configure -eq 1 -a -z "$DESTDIR" -a -n "$first_install" -a -z "${cygwin}${mac}" ]; then
if [ -n "$SERVICEDIR" ]; then if [ -n "$SERVICEDIR" ]; then
if systemctl enable ${PRODUCT}.service; then if systemctl enable ${PRODUCT}.service; then

View File

@@ -300,19 +300,6 @@ get_config() {
;; ;;
esac esac
case $LOAD_HELPERS_ONLY in
Yes|yes)
;;
No|no)
LOAD_HELPERS_ONLY=
;;
*)
if [ -n "$LOAD_HELPERS_ONLY" ]; then
fatal_error "Invalid LOAD_HELPERS_ONLY setting ($LOAD_HELPERS_ONLY)"
fi
;;
esac
if [ -n "$WORKAROUNDS" ]; then if [ -n "$WORKAROUNDS" ]; then
case $WORKAROUNDS in case $WORKAROUNDS in
[Yy]es) [Yy]es)

View File

@@ -38,6 +38,12 @@
<filename>helpers</filename> file is used when <filename>helpers</filename> file is used when
LOAD_HELPERS_ONLY=Yes</para> LOAD_HELPERS_ONLY=Yes</para>
<important>
<para>Beginning with Shorewall 5.2.3, the LOAD_HELPERS_ONLY option has
been removed and the behavior is the same as if LOAD_HELPERS_ONLY=Yes
was specified.</para>
</important>
<para>Each record in the files has the following format:</para> <para>Each record in the files has the following format:</para>
<cmdsynopsis> <cmdsynopsis>

View File

@@ -68,32 +68,35 @@
<term><emphasis role="bold">SOURCE</emphasis> - <term><emphasis role="bold">SOURCE</emphasis> -
<emphasis>zone</emphasis>[,...[+]]|<emphasis <emphasis>zone</emphasis>[,...[+]]|<emphasis
role="bold">$FW</emphasis>|<emphasis role="bold">$FW</emphasis>|<emphasis
role="bold">all</emphasis>|<emphasis role="bold">all[+][!<replaceable>ezone</replaceable>[,...]]</emphasis></term>
role="bold">all+</emphasis></term>
<listitem> <listitem>
<para>Source zone. Must be the name of a zone defined in <ulink <para>Source zone. Must be the name of a zone defined in <ulink
url="/manpages/shorewall-zones.html">shorewall-zones</ulink>(5), url="/manpages/shorewall-zones.html">shorewall-zones</ulink>(5),
$FW, "all" or "all+".</para> $FW, "all" or "all+".</para>
<para>Support for "all+" was added in Shorewall 4.5.17. "all" does <para>Support for <emphasis role="bold">all+</emphasis> was added in
not override the implicit intra-zone ACCEPT policy while "all+" Shorewall 4.5.17. <emphasis role="bold">all</emphasis> does not
does.</para> override the implicit intra-zone ACCEPT policy while <emphasis
role="bold">all+</emphasis> does.</para>
<para>Beginning with Shorewall 5.0.12, multiple zones may be listed <para>Beginning with Shorewall 5.0.12, multiple zones may be listed
separated by commas. As above, if '+' is specified after two or more separated by commas. As above, if '+' is specified after two or more
zone names, then the policy overrides the implicit intra-zone ACCEPT zone names, then the policy overrides the implicit intra-zone ACCEPT
policy if the same <replaceable>zone</replaceable> appears in both policy if the same <replaceable>zone</replaceable> appears in both
the SOURCE and DEST columns.</para> the SOURCE and DEST columns.</para>
<para>Beginning with Shorewall 5.2.3, a comma-separated list of
excluded zones preceded by "!" may follow <emphasis
role="bold">all</emphasis> or <emphasis
role="bold">all+.</emphasis></para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term><emphasis role="bold">DEST</emphasis> - <term><emphasis role="bold">DEST</emphasis> -
<emphasis>zone</emphasis>[,...[+]]|<emphasis <emphasis>zone</emphasis>[,...[+]]|<emphasis
role="bold">$FW</emphasis>|<emphasis role="bold">$FW</emphasis>|all[+][!<replaceable>ezone</replaceable>[,...]]</term>
role="bold">all</emphasis>|<emphasis
role="bold">all+</emphasis></term>
<listitem> <listitem>
<para>Destination zone. Must be the name of a zone defined in <ulink <para>Destination zone. Must be the name of a zone defined in <ulink
@@ -112,6 +115,11 @@
zone names, then the policy overrides the implicit intra-zone ACCEPT zone names, then the policy overrides the implicit intra-zone ACCEPT
policy if the same <replaceable>zone</replaceable> appears in both policy if the same <replaceable>zone</replaceable> appears in both
the SOURCE and DEST columns.</para> the SOURCE and DEST columns.</para>
<para>Beginning with Shorewall 5.2.3, a comma-separated list of
excluded zones preceded by "!" may follow <emphasis
role="bold">all</emphasis> or <emphasis
role="bold">all+</emphasis>.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>

View File

@@ -450,7 +450,7 @@
</note> </note>
<important> <important>
<para>RESTORE_DEFAULT_OPTION=Yes in shorewall[6].conf is not <para>RESTORE_DEFAULT_ROUTE=Yes in shorewall[6].conf is not
recommended when the <option>persistent</option> option is recommended when the <option>persistent</option> option is
used, as restoring default routes to the main routing table used, as restoring default routes to the main routing table
can prevent link status monitors such as foolsm from can prevent link status monitors such as foolsm from

View File

@@ -993,19 +993,18 @@
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term>all[+][-]</term> <term>all[+]</term>
<listitem> <listitem>
<para><emphasis role="bold">all</emphasis>, without the <para><emphasis role="bold">all</emphasis>, without the
"-" means "All Zones, including the firewall zone". If "-" means "All Zones, including the firewall zone".
the "-" is included, the firewall zone is omitted.
Normally all omits intra-zone traffic, but intra-zone Normally all omits intra-zone traffic, but intra-zone
traffic can be included specifying "+".</para> traffic can be included specifying "+".</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>any[+][-]</term> <term>any[+]</term>
<listitem> <listitem>
<para><emphasis role="bold">any</emphasis> is equivalent <para><emphasis role="bold">any</emphasis> is equivalent
@@ -1259,6 +1258,15 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term>all+!$FW</term>
<listitem>
<para>All but the firewall zone and applies to intrazone
traffic.</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term>net:^CN</term> <term>net:^CN</term>
@@ -1349,19 +1357,18 @@
<variablelist> <variablelist>
<varlistentry> <varlistentry>
<term>all[+][-]</term> <term>all[+]</term>
<listitem> <listitem>
<para><emphasis role="bold">all</emphasis>, without the <para><emphasis role="bold">all</emphasis>, without the
"-" means "All Zones, including the firewall zone". If "-" means "All Zones, including the firewall zone".
the "-" is included, the firewall zone is omitted.
Normally all omits intra-zone traffic, but intra-zone Normally all omits intra-zone traffic, but intra-zone
traffic can be included specifying "+".</para> traffic can be included specifying "+".</para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>any[+][-]</term> <term>any[+]</term>
<listitem> <listitem>
<para><emphasis role="bold">any</emphasis> is equivalent <para><emphasis role="bold">any</emphasis> is equivalent
@@ -1573,7 +1580,7 @@
<para>If the DEST <replaceable>zone</replaceable> is a bport zone, <para>If the DEST <replaceable>zone</replaceable> is a bport zone,
then either:<orderedlist numeration="loweralpha"> then either:<orderedlist numeration="loweralpha">
<listitem> <listitem>
<para>the SOURCE must be <option>all[+][-]</option>, or</para> <para>the SOURCE must be <option>all[+]</option>, or</para>
</listitem> </listitem>
<listitem> <listitem>

View File

@@ -1382,7 +1382,10 @@ net all DROP info</programlisting>then the chain name is 'net-all'
of modules loaded by shorewall to those listed in of modules loaded by shorewall to those listed in
<filename>/var/lib/shorewall[6]/helpers</filename> and those that <filename>/var/lib/shorewall[6]/helpers</filename> and those that
are actually used. When not set, or set to the empty value, are actually used. When not set, or set to the empty value,
LOAD_HELPERS_ONLY=No is assumed.</para> LOAD_HELPERS_ONLY=No is assumed in Shorewall versions 5.2.2 and
earlier. Beginning with Shorewall 5.2.3, the LOAD_HELPERS_ONLY
option is removed, and the behavior is as if LOAD_HELPERS_ONLY=Yes
had been specified.</para>
</listitem> </listitem>
</varlistentry> </varlistentry>

View File

@@ -1,39 +0,0 @@
#
# Shorewall version 5 - Modules File
#
# /usr/share/shorewall/modules
#
# This file loads the modules that may be needed by the firewall.
#
# THE ORDER OF THE COMMANDS BELOW IS IMPORTANT!!!!!! You MUST load in
# dependency order. i.e., if M2 depends on M1 then you must load M1
# before you load M2.
#
# If you need to modify this file, copy it to /etc/shorewall and modify the
# copy.
#
###############################################################################
#
# Essential Modules
#
INCLUDE modules.essential
#
# Other xtables modules
#
INCLUDE modules.xtables
#
# Helpers
#
INCLUDE helpers
#
# Ipset
#
INCLUDE modules.ipset
#
# Traffic Shaping
#
INCLUDE modules.tc
#
# Extensions
#
INCLUDE modules.extensions

View File

@@ -1,32 +0,0 @@
#
# Shorewall -- /usr/share/shorewall/modules.essential
#
# Essential Modules File
#
# This file loads the modules that may be needed by the firewall.
#
# THE ORDER OF THE COMMANDS BELOW IS IMPORTANT!!!!!! You MUST load in
# dependency order. i.e., if M2 depends on M1 then you must load M1
# before you load M2.
#
# If you need to modify this file, copy it to /etc/shorewall and modify the
# copy.
#
###############################################################################
#
# Essential Modules
#
loadmodule nfnetlink
loadmodule x_tables
loadmodule ip_tables
loadmodule iptable_filter
loadmodule iptable_mangle
loadmodule ip_conntrack
loadmodule nf_conntrack
loadmodule nf_conntrack_ipv4
loadmodule iptable_nat
loadmodule nf_nat
loadmodule nf_nat_ipv4
loadmodule iptable_raw
loadmodule xt_state
loadmodule xt_tcpudp

View File

@@ -1,59 +0,0 @@
#
# Shorewall -- /usr/share/shorewall/modules.extensions
#
# Extensions Modules File
#
# This file loads the modules that may be needed by the firewall.
#
# THE ORDER OF THE COMMANDS BELOW IS IMPORTANT!!!!!! You MUST load in
# dependency order. i.e., if M2 depends on M1 then you must load M1
# before you load M2.
#
# If you need to modify this file, copy it to /etc/shorewall and modify the
# copy.
#
###############################################################################
loadmodule ipt_addrtype
loadmodule ipt_ah
loadmodule ipt_CLASSIFY
loadmodule ipt_CLUSTERIP
loadmodule ipt_comment
loadmodule ipt_connmark
loadmodule ipt_CONNMARK
loadmodule ipt_conntrack
loadmodule ipt_dscp
loadmodule ipt_DSCP
loadmodule ipt_ecn
loadmodule ipt_ECN
loadmodule ipt_esp
loadmodule ipt_hashlimit
loadmodule ipt_helper
loadmodule ipt_ipp2p
loadmodule ipt_iprange
loadmodule ipt_length
loadmodule ipt_limit
loadmodule ipt_mac
loadmodule ipt_mark
loadmodule ipt_MARK
loadmodule ipt_MASQUERADE
loadmodule ipt_multiport
loadmodule ipt_NETMAP
loadmodule ipt_NOTRACK
loadmodule ipt_owner
loadmodule ipt_physdev
loadmodule ipt_pkttype
loadmodule ipt_policy
loadmodule ipt_realm
loadmodule ipt_recent
loadmodule ipt_REDIRECT
loadmodule ipt_REJECT
loadmodule ipt_SAME
loadmodule ipt_sctp
loadmodule ipt_set
loadmodule ipt_state
loadmodule ipt_tcpmss
loadmodule ipt_TCPMSS
loadmodule ipt_tos
loadmodule ipt_TOS
loadmodule ipt_ttl
loadmodule ipt_TTL

View File

@@ -1,27 +0,0 @@
#
# Shorewall -- /usr/share/shorewall/modules.ipset
#
# IP Set Modules File
#
# This file loads the modules that may be needed by the firewall.
#
# THE ORDER OF THE COMMANDS BELOW IS IMPORTANT!!!!!! You MUST load in
# dependency order. i.e., if M2 depends on M1 then you must load M1
# before you load M2.
#
# If you need to modify this file, copy it to /etc/shorewall and modify the
# copy.
#
###############################################################################
loadmodule xt_set
loadmodule ip_set
loadmodule ip_set_iphash
loadmodule ip_set_ipmap
loadmodule ip_set_ipporthash
loadmodule ip_set_iptree
loadmodule ip_set_iptreemap
loadmodule ip_set_macipmap
loadmodule ip_set_nethash
loadmodule ip_set_portmap
loadmodule ipt_SET
loadmodule ipt_set

View File

@@ -1,27 +0,0 @@
#
# Shorewall -- /usr/share/shorewall/modules.tc
#
# Traffic Shaping Modules File
#
# This file loads the modules that may be needed by the firewall.
#
# THE ORDER OF THE COMMANDS BELOW IS IMPORTANT!!!!!! You MUST load in
# dependency order. i.e., if M2 depends on M1 then you must load M1
# before you load M2.
#
# If you need to modify this file, copy it to /etc/shorewall and modify the
# copy.
#
###############################################################################
loadmodule sch_sfq
loadmodule sch_ingress
loadmodule sch_hfsc
loadmodule sch_htb
loadmodule sch_prio
loadmodule sch_tbf
loadmodule sch_fq_codel
loadmodule cls_u32
loadmodule cls_fw
loadmodule cls_flow
loadmodule cls_basic
loadmodule act_police

View File

@@ -1,53 +0,0 @@
#
# Shorewall -- /usr/share/shorewall/modules.xtables
#
# Xtables Modules File
#
# This file loads the modules that may be needed by the firewall.
#
# THE ORDER OF THE COMMANDS BELOW IS IMPORTANT!!!!!! You MUST load in
# dependency order. i.e., if M2 depends on M1 then you must load M1
# before you load M2.
#
# If you need to modify this file, copy it to /etc/shorewall and modify the
# copy.
#
###############################################################################
loadmodule xt_AUDIT
loadmodule xt_CLASSIFY
loadmodule xt_connmark
loadmodule xt_CONNMARK
loadmodule xt_conntrack
loadmodule xt_dccp
loadmodule xt_dscp
loadmodule xt_DSCP
loadmodule xt_hashlimit
loadmodule xt_helper
loadmodule xt_ipp2p
loadmodule xt_iprange
loadmodule xt_length
loadmodule xt_limit
loadmodule xt_mac
loadmodule xt_mark
loadmodule xt_MARK
loadmodule xt_multiport
loadmodule xt_nat
loadmodule xt_NFQUEUE
loadmodule xt_owner
loadmodule xt_physdev
loadmodule xt_pkttype
loadmodule xt_policy
loadmodule xt_sctp
loadmodule xt_tcpmss
loadmodule xt_TCPMSS
loadmodule xt_time
loadmodule xt_IPMARK
loadmodule xt_TPROXY
#
# From xtables-addons
#
loadmodule xt_condition
loadmodule xt_geoip
loadmodule xt_ipp2p
loadmodule xt_LOGMARK
loadmodule xt_RAWNAT

View File

@@ -178,8 +178,6 @@ IP_FORWARDING=Keep
KEEP_RT_TABLES=Yes KEEP_RT_TABLES=Yes
LOAD_HELPERS_ONLY=Yes
MACLIST_TABLE=filter MACLIST_TABLE=filter
MACLIST_TTL= MACLIST_TTL=

View File

@@ -179,8 +179,6 @@ IP_FORWARDING=Keep
KEEP_RT_TABLES=Yes KEEP_RT_TABLES=Yes
LOAD_HELPERS_ONLY=Yes
MACLIST_TABLE=filter MACLIST_TABLE=filter
MACLIST_TTL= MACLIST_TTL=

View File

@@ -178,8 +178,6 @@ IP_FORWARDING=Keep
KEEP_RT_TABLES=Yes KEEP_RT_TABLES=Yes
LOAD_HELPERS_ONLY=Yes
MACLIST_TABLE=filter MACLIST_TABLE=filter
MACLIST_TTL= MACLIST_TTL=

View File

@@ -178,8 +178,6 @@ IP_FORWARDING=Keep
KEEP_RT_TABLES=Yes KEEP_RT_TABLES=Yes
LOAD_HELPERS_ONLY=Yes
MACLIST_TABLE=filter MACLIST_TABLE=filter
MACLIST_TTL= MACLIST_TTL=

View File

@@ -178,8 +178,6 @@ IP_FORWARDING=Keep
KEEP_RT_TABLES=Yes KEEP_RT_TABLES=Yes
LOAD_HELPERS_ONLY=Yes
MACLIST_TABLE=filter MACLIST_TABLE=filter
MACLIST_TTL= MACLIST_TTL=

View File

@@ -1,39 +0,0 @@
#
# Shorewall6 version 5 - Modules File
#
# /usr/share/shorewall6/modules
#
# This file loads the modules that may be needed by the firewall.
#
# THE ORDER OF THE COMMANDS BELOW IS IMPORTANT!!!!!! You MUST load in
# dependency order. i.e., if M2 depends on M1 then you must load M1
# before you load M2.
#
# If you need to modify this file, copy it to /etc/shorewall and modify the
# copy.
#
###############################################################################
#
# Essential Modules
#
INCLUDE modules.essential
#
# Other xtables modules
#
INCLUDE modules.xtables
#
# Helpers
#
INCLUDE helpers
#
# Ipset
#
INCLUDE modules.ipset
#
# Traffic Shaping
#
INCLUDE modules.tc
#
# Extensions
#
INCLUDE modules.extensions

View File

@@ -1,28 +0,0 @@
#
# Shorewall6 -- /usr/share/shorewall6/modules.essential
#
# Essential Modules File
#
# This file loads the modules that may be needed by the firewall.
#
# THE ORDER OF THE COMMANDS BELOW IS IMPORTANT!!!!!! You MUST load in
# dependency order. i.e., if M2 depends on M1 then you must load M1
# before you load M2.
#
# If you need to modify this file, copy it to /etc/shorewall and modify the
# copy.
#
###############################################################################
loadmodule nfnetlink
loadmodule x_tables
loadmodule ip6_tables
loadmodule ip6table_filter
loadmodule ip6table_mangle
loadmodule ip6table_raw
loadmodule xt_conntrack
loadmodule nf_conntrack_ipv6
loadmodule nf_nat
loadmodule nf_nat_ipv6
loadmodule xt_state
loadmodule xt_tcpudp
loadmodule ip6t_REJECT

View File

@@ -1,16 +0,0 @@
#
# Shorewall6 -- /usr/share/shorewall6/modules.extension
#
# Extensions Modules File
#
# This file loads the modules that may be needed by the firewall.
#
# THE ORDER OF THE COMMANDS BELOW IS IMPORTANT!!!!!! You MUST load in
# dependency order. i.e., if M2 depends on M1 then you must load M1
# before you load M2.
#
# If you need to modify this file, copy it to /etc/shorewall and modify the
# copy.
#
###############################################################################
loadmodule ip6_queue

View File

@@ -1,27 +0,0 @@
#
# Shorewall6 -- /usr/share/shorewall6/modules.ipset
#
# IP Set Modules File
#
# This file loads the modules that may be needed by the firewall.
#
# THE ORDER OF THE COMMANDS BELOW IS IMPORTANT!!!!!! You MUST load in
# dependency order. i.e., if M2 depends on M1 then you must load M1
# before you load M2.
#
# If you need to modify this file, copy it to /etc/shorewall6 and modify the
# copy.
#
###############################################################################
loadmodule xt_set
loadmodule ip_set
loadmodule ip_set_iphash
loadmodule ip_set_ipmap
loadmodule ip_set_ipporthash
loadmodule ip_set_iptree
loadmodule ip_set_iptreemap
loadmodule ip_set_macipmap
loadmodule ip_set_nethash
loadmodule ip_set_portmap
loadmodule ipt_SET
loadmodule ipt_set

View File

@@ -1,27 +0,0 @@
#
# Shorewall6 -- /usr/share/shorewall6/modules.tc
#
# Traffic Shaping Modules File
#
# This file loads the modules that may be needed by the firewall.
#
# THE ORDER OF THE COMMANDS BELOW IS IMPORTANT!!!!!! You MUST load in
# dependency order. i.e., if M2 depends on M1 then you must load M1
# before you load M2.
#
# If you need to modify this file, copy it to /etc/shorewall and modify the
# copy.
#
###############################################################################
loadmodule sch_sfq
loadmodule sch_ingress
loadmodule sch_htb
loadmodule sch_hfsc
loadmodule sch_prio
loadmodule sch_tbf
loadmodule sch_fq_codel
loadmodule cls_u32
loadmodule cls_fw
loadmodule cls_flow
loadmodule cls_basic
loadmodule act_police

View File

@@ -1,51 +0,0 @@
#
# Shorewall6 -- /usr/share/shorewall6/modules.xtables
#
# Xtables Modules File
#
# This file loads the modules that may be needed by the firewall.
#
# THE ORDER OF THE COMMANDS BELOW IS IMPORTANT!!!!!! You MUST load in
# dependency order. i.e., if M2 depends on M1 then you must load M1
# before you load M2.
#
# If you need to modify this file, copy it to /etc/shorewall and modify the
# copy.
#
###############################################################################
loadmodule xt_AUDIT
loadmodule xt_CLASSIFY
loadmodule xt_connmark
loadmodule xt_CONNMARK
loadmodule xt_conntrack
loadmodule xt_dccp
loadmodule xt_dscp
loadmodule xt_DSCP
loadmodule xt_hashlimit
loadmodule xt_helper
loadmodule xt_iprange
loadmodule xt_length
loadmodule xt_limit
loadmodule xt_mac
loadmodule xt_mark
loadmodule xt_MARK
loadmodule xt_multiport
loadmodule xt_NFQUEUE
loadmodule xt_owner
loadmodule xt_physdev
loadmodule xt_pkttype
loadmodule xt_policy
loadmodule xt_sctp
loadmodule xt_tcpmss
loadmodule xt_TCPMSS
loadmodule xt_time
loadmodule xt_IPMARK
loadmodule xt_TPROXY
#
# From xtables-addons
#
loadmodule xt_condition
loadmodule xt_geoip
loadmodule xt_ipp2p
loadmodule xt_LOGMARK
loadmodule xt_RAWNAT

View File

@@ -5,7 +5,7 @@
<!--$Id: template.xml 5908 2007-04-12 23:04:36Z teastep $--> <!--$Id: template.xml 5908 2007-04-12 23:04:36Z teastep $-->
<articleinfo> <articleinfo>
<title>Shorewall 5.0 Manpages</title> <title>Shorewall 5.* Manpages</title>
<authorgroup> <authorgroup>
<author> <author>
@@ -18,7 +18,7 @@
<pubdate><?dbtimestamp format="Y/m/d"?></pubdate> <pubdate><?dbtimestamp format="Y/m/d"?></pubdate>
<copyright> <copyright>
<year>2007-2017</year> <year>2007-2019</year>
<holder>Thomas M. Eastep</holder> <holder>Thomas M. Eastep</holder>
</copyright> </copyright>
@@ -53,6 +53,10 @@
<member><ulink url="manpages/shorewall-actions.html">actions</ulink> - <member><ulink url="manpages/shorewall-actions.html">actions</ulink> -
Declare user-defined actions.</member> Declare user-defined actions.</member>
<member><ulink
url="/manpages/shorewall-addresses.html">addresses</ulink> - Describes
how IP address and ports are specified in Shorewall</member>
<member><ulink url="manpages/shorewall-arprules.html">arprules</ulink> <member><ulink url="manpages/shorewall-arprules.html">arprules</ulink>
- (Added in Shorewall 4.5.12) Define arpfilter rules.</member> - (Added in Shorewall 4.5.12) Define arpfilter rules.</member>
@@ -71,6 +75,9 @@
url="manpages/shorewall-exclusion.html">exclusion</ulink> - Excluding url="manpages/shorewall-exclusion.html">exclusion</ulink> - Excluding
hosts from a network or zone</member> hosts from a network or zone</member>
<member><ulink url="/manpages/shorewall-files.html">files</ulink> -
Describes the shorewall configuration files</member>
<member><ulink url="manpages/shorewall-hosts.html">hosts</ulink> - <member><ulink url="manpages/shorewall-hosts.html">hosts</ulink> -
Define multiple zones accessed through a single interface</member> Define multiple zones accessed through a single interface</member>
@@ -96,7 +103,11 @@
Define Masquerade/SNAT (deprecated)</member> Define Masquerade/SNAT (deprecated)</member>
<member><ulink url="manpages/shorewall-modules.html">modules</ulink> - <member><ulink url="manpages/shorewall-modules.html">modules</ulink> -
Specify which kernel modules to load.</member> Specify which kernel modules to load (Removed in Shorewall
5.2.3)</member>
<member><ulink url="/manpages/shorewall-names.html">names</ulink> -
Describes object naming in Shorewall configuration files</member>
<member><ulink url="manpages/shorewall-nat.html">nat</ulink> - Define <member><ulink url="manpages/shorewall-nat.html">nat</ulink> - Define
one-to-one NAT.</member> one-to-one NAT.</member>

View File

@@ -386,6 +386,10 @@
<filename>modules</filename> or <filename>helpers</filename> file <filename>modules</filename> or <filename>helpers</filename> file
found on the CONFIG_PATH on the Administrative System during found on the CONFIG_PATH on the Administrative System during
compilation will be used.</para> compilation will be used.</para>
<para>In Shorewall 5.2.3, the LOAD_HELPERS_ONLY option was removed and
the behavior is that which was formerly obtained by setting
LOAD_HELPERS_ONLY=Yes.</para>
</section> </section>
<section id="Converting"> <section id="Converting">

View File

@@ -283,8 +283,8 @@
<listitem> <listitem>
<para><filename>/usr/share/shorewall/modules</filename> — Specifies <para><filename>/usr/share/shorewall/modules</filename> — Specifies
the kernel modules to be loaded during shorewall the kernel modules to be loaded during shorewall start/restart
start/restart.</para> (removed in Shorewall 5.2.3).</para>
</listitem> </listitem>
<listitem> <listitem>
@@ -802,9 +802,9 @@ DNAT { source=net dest=loc:10.0.0.1 proto=tcp dport=80 mark=88 }</programlisting
<term>INLINE</term> <term>INLINE</term>
<listitem> <listitem>
<para>INLINE, added in Shorewall 4. is available in the mangle, masq <para>INLINE, added in Shorewall 4. is available in the mangle, snat
and rules files and allows you to specify ip[6]table text following (masq) and rules files and allows you to specify ip[6]table text
a semicolon to the right of the column-oriented following two semicolons to the right of the column-oriented
specifications.</para> specifications.</para>
<para>INLINE takes one optional parameter which, if present, must be <para>INLINE takes one optional parameter which, if present, must be
@@ -856,9 +856,9 @@ INLINE net $FW ;; -m recent --rcheck 10 --hitcount 5
support was extended to the conntrack file.</para> support was extended to the conntrack file.</para>
<caution> <caution>
<para>INLINE_MATCHES=Yes is deprecated and will no longer be <para>INLINE_MATCHES=Yes is deprecated and is not supported in
supported in Shorewall 5.2 and beyond. Use two adjacent semicolons Shorewall 5.2 and beyond. Use two adjacent semicolons to introduce
to introduce inline matches.</para> inline matches.</para>
</caution> </caution>
<para>Example from the masq file that spits outgoing SNAT between <para>Example from the masq file that spits outgoing SNAT between

View File

@@ -486,6 +486,11 @@ root@lists:~# </programlisting>
<filename>/usr/share/shorewall/modules</filename>. That file does not set <filename>/usr/share/shorewall/modules</filename>. That file does not set
<emphasis role="bold">sip_direct_media=0</emphasis>.</para> <emphasis role="bold">sip_direct_media=0</emphasis>.</para>
<important>
<para>In Shorewall 5.2.3, the LOAD_HELPERS_ONLY option was removed and
the behavior is the same as if LOAD_HELPERS_ONLY=Yes.</para>
</important>
<para>If you need to modify either <para>If you need to modify either
<filename>/usr/share/shorewall/helpers</filename> or <filename>/usr/share/shorewall/helpers</filename> or
<filename>/usr/share/shorewall/modules</filename> then copy the file to <filename>/usr/share/shorewall/modules</filename> then copy the file to

View File

@@ -799,6 +799,12 @@ root@lists:~# </programlisting>
<para><inlinegraphic fileref="images/BD21298_.gif" format="GIF"/></para> <para><inlinegraphic fileref="images/BD21298_.gif" format="GIF"/></para>
<para>Modify the setting of LOAD_HELPER_ONLY as necessary.</para> <para>Modify the setting of LOAD_HELPER_ONLY as necessary.</para>
<important>
<para>In Shorewall 5.2.3, the LOAD_HELPERS_ONLY option was removed, and
the behavior is the same as if LOAD_HELPERS_ONLY=Yes was
specified.</para>
</important>
</section> </section>
<section id="DNAT"> <section id="DNAT">

View File

@@ -751,6 +751,12 @@ root@lists:~# </programlisting>
<para><inlinegraphic fileref="images/BD21298_.gif" format="GIF"/></para> <para><inlinegraphic fileref="images/BD21298_.gif" format="GIF"/></para>
<para>Modify the setting of LOAD_HELPER_ONLY as necessary.</para> <para>Modify the setting of LOAD_HELPER_ONLY as necessary.</para>
<important>
<para>In Shorewall 5.2.3, the LOAD_HELPERS_ONLY option was removed, and
the behavior is the same as if LOAD_HELPERS_ONLY=Yes was
specified.</para>
</important>
</section> </section>
<section id="DNAT"> <section id="DNAT">

View File

@@ -10,7 +10,9 @@
<pubdate><?dbtimestamp format="Y/m/d"?></pubdate> <pubdate><?dbtimestamp format="Y/m/d"?></pubdate>
<copyright> <copyright>
<year>2003-2009</year> <year>2003-2013</year>
<year>2019</year>
<holder>Thomas M. Eastep</holder> <holder>Thomas M. Eastep</holder>
</copyright> </copyright>
@@ -79,7 +81,7 @@
<row rowsep="0" valign="middle"> <row rowsep="0" valign="middle">
<entry>Debian apt-get sources for Shorewall: <ulink <entry>Debian apt-get sources for Shorewall: <ulink
url="http://people.connexer.com/~roberto/debian/"></ulink>http://people.connexer.com/~roberto/debian/</entry> url="http://people.connexer.com/~roberto/debian/">http://people.connexer.com/~roberto/debian/</ulink></entry>
</row> </row>
<row rowsep="0" valign="middle"> <row rowsep="0" valign="middle">
@@ -88,45 +90,51 @@
</row> </row>
<row rowsep="0" valign="middle"> <row rowsep="0" valign="middle">
<entry>Tom's 2005 LinuxFest NW Presentation: <ulink <entry>Tom's 2005 LinuxFest NW Presentation - "Shorewall and Native
IPsec" : <ulink
url="http://www.shorewall.net/LinuxFest2005.pdf">http://www.shorewall.net/LinuxFest2005.pdf</ulink></entry> url="http://www.shorewall.net/LinuxFest2005.pdf">http://www.shorewall.net/LinuxFest2005.pdf</ulink></entry>
</row> </row>
<row> <row>
<entry>Tom's 2006 LinuxFest NW Presentation: <ulink <entry>Tom's 2006 LinuxFest NW Presentation - "OpenVPN" : <ulink
url="http://www.shorewall.net/LinuxFest2006.pdf">http://www.shorewall.net/LinuxFest2006.pdf</ulink></entry> url="http://www.shorewall.net/LinuxFest2006.pdf">http://www.shorewall.net/LinuxFest2006.pdf</ulink></entry>
</row> </row>
<row> <row>
<entry>Tom's 2007 LinuxFest NW Presentation: <ulink <entry>Tom's 2007 LinuxFest NW Presentation - "Xen and the Art of
Consolidation" : <ulink
url="http://www.shorewall.net/Linuxfest-2007.pdf">http://www.shorewall.net/Linuxfest-2007.pdf</ulink></entry> url="http://www.shorewall.net/Linuxfest-2007.pdf">http://www.shorewall.net/Linuxfest-2007.pdf</ulink></entry>
</row> </row>
<row> <row>
<entry>Tom's 2008 LinuxFest NW Presentation: <ulink <entry>Tom's 2008 LinuxFest NW Presentation - "Kernel-mode Virtual
Machine (KVM)" : <ulink
url="http://www.shorewall.net/Linuxfest-2008.pdf">http://www.shorewall.net/Linuxfest-2008.pdf</ulink></entry> url="http://www.shorewall.net/Linuxfest-2008.pdf">http://www.shorewall.net/Linuxfest-2008.pdf</ulink></entry>
</row> </row>
<row> <row>
<entry>Tom's 2009 LinuxFest NW Presentation: <ulink <entry>Tom's 2009 LinuxFest NW Presentation - "Introduction to IPv6"
: <ulink
url="http://www.shorewall.net/Linuxfest-2009.pdf">http://www.shorewall.net/LinuxFestNW-2009.pdf</ulink></entry> url="http://www.shorewall.net/Linuxfest-2009.pdf">http://www.shorewall.net/LinuxFestNW-2009.pdf</ulink></entry>
</row> </row>
<row> <row>
<entry>Tom's 2010 LinuxFest NW Presentation: <ulink <entry>Tom's 2010 LinuxFest NW Presentation - "Managing Multiple
Internet Connections with Shorewall" : <ulink
url="http://www.shorewall.net/LinuxfestNW-2010.pdf">http://www.shorewall.net/LinuxFestNW-2010.pdf</ulink></entry> url="http://www.shorewall.net/LinuxfestNW-2010.pdf">http://www.shorewall.net/LinuxFestNW-2010.pdf</ulink></entry>
</row> </row>
<row> <row>
<entry>Tom's 2011 LinuxFest NW Presentation: <ulink <entry>Tom's 2011 LinuxFest NW Presentation - "LXC - Linux
Containers" : <ulink
url="http://www.shorewall.net/Linuxfest2011.pdf">http://www.shorewall.net/LinuxFest2011.pdf</ulink></entry> url="http://www.shorewall.net/Linuxfest2011.pdf">http://www.shorewall.net/LinuxFest2011.pdf</ulink></entry>
</row> </row>
<row> <row>
<entry>Tom's 2013 SeaGL Presentation: <ulink <entry>Tom's 2013 SeaGL Presentation - "AN INTRODUCTION TO LINUX
POLICY ROUTING" : <ulink
url="http://www.shorewall.net/SeaGL2013.pdf">http://www.shorewall.net/SeaGL2013.pdf</ulink></entry> url="http://www.shorewall.net/SeaGL2013.pdf">http://www.shorewall.net/SeaGL2013.pdf</ulink></entry>
</row> </row>
</tbody> </tbody>
</tgroup> </tgroup>
</informaltable> </informaltable>