forked from extern/shorewall_code
Compare commits
76 Commits
5.1.3-Beta
...
5.1.4-base
Author | SHA1 | Date | |
---|---|---|---|
|
bb70a3637b | ||
|
6c20cc7c4f | ||
|
d4e05f6163 | ||
|
6201f37913 | ||
|
7ee44d6b4b | ||
|
363b8f9802 | ||
|
d365a9ff18 | ||
|
00d4724fd8 | ||
|
749c8047d8 | ||
|
a00f2e6365 | ||
|
a46f19899b | ||
|
d2392c3a9b | ||
|
0763b27b0b | ||
|
8b90827611 | ||
|
8507c97b5a | ||
|
a6306f2c08 | ||
|
a79dc194a4 | ||
|
ccf9d73c72 | ||
|
bdcf93f92c | ||
|
6b84727886 | ||
|
5f445d9c2b | ||
|
31bd10ffdd | ||
|
c3303067fc | ||
|
55cf06d0a8 | ||
|
c36a7cd35b | ||
|
561efa595c | ||
|
158f6305b1 | ||
|
6407520a35 | ||
|
54336eaa80 | ||
|
5b85627fb8 | ||
|
a00d7217e3 | ||
|
54ef4e4ced | ||
|
a447d726fa | ||
|
c6050f9fbb | ||
|
fe29adbd66 | ||
|
4dc6be6b3b | ||
|
6ebc8f4266 | ||
|
c5c4211081 | ||
|
4010f9bce4 | ||
|
02bb717d7d | ||
|
046998ed84 | ||
|
24a014655b | ||
|
0b8945da8e | ||
|
da363880a9 | ||
|
b049d1805d | ||
|
037fe490f3 | ||
|
a8d7675322 | ||
|
b13014c9ab | ||
|
76aef6cb04 | ||
|
4c72b3ee58 | ||
|
d9071c5308 | ||
|
5729be6431 | ||
|
1a381f717c | ||
|
c534c458dd | ||
|
61435936fe | ||
|
2d4c1411bd | ||
|
655f260cb6 | ||
|
85d571d013 | ||
|
fdb78898fc | ||
|
d4c016d9c5 | ||
|
3d8d5aa469 | ||
|
49811d24fa | ||
|
fe4aaee1b4 | ||
|
0ec7bc846e | ||
|
dbcd4d9d16 | ||
|
5a996cbda7 | ||
|
6019adaae5 | ||
|
4f869c3506 | ||
|
e3c2874b21 | ||
|
e8a0142480 | ||
|
a4768776f7 | ||
|
8e000b158e | ||
|
f1d1ab6411 | ||
|
cd103bb715 | ||
|
5f1370f1b4 | ||
|
dc53fa2665 |
@@ -4264,12 +4264,17 @@ usage() # $1 = exit status
|
|||||||
echo " reenable <interface>"
|
echo " reenable <interface>"
|
||||||
ecko " refresh [ -d ] [ -n ] [ -T ] [ -D <directory> ] [ <chain>... ]"
|
ecko " refresh [ -d ] [ -n ] [ -T ] [ -D <directory> ] [ <chain>... ]"
|
||||||
echo " reject <address> ..."
|
echo " reject <address> ..."
|
||||||
ecko " reload [ -s ] [ -c ] [ -r <root user> ] [ -T ] [ -i ] [ <directory> ] <system>"
|
|
||||||
|
if [ -n "$g_lite" ]; then
|
||||||
|
echo " reload [ -n ] [ -p ] [ -f ] [ -C ] [ <directory> ]"
|
||||||
|
else
|
||||||
|
echo " reload [ -n ] [ -p ] [-d] [ -f ] [ -c ] [ -T ] [ -i ] [ -C ] [ <directory> ]"
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -z "$g_lite" ]; then
|
if [ -z "$g_lite" ]; then
|
||||||
echo " remote-reload [ -s ] [ -c ] [ -r <root-name> ] [ -T ] [ -i ] [ <directory> ] <system>"
|
echo " remote-reload [ -n ] [ -s ] [ -c ] [ -r <root-name> ] [ -T ] [ -i ] [ <directory> ] <system>"
|
||||||
echo " remote-restart [ -s ] [ -c ] [ -r <root-name> ] [ -T ] [ -i ] [ <directory> ] <system>"
|
echo " remote-restart [ -n ] [ -s ] [ -c ] [ -r <root-name> ] [ -T ] [ -i ] [ <directory> ] <system>"
|
||||||
echo " remote-start [ -s ] [ -c ] [ -r <root-name> ] [ -T ] [ -i ] [ <directory> ] <system>"
|
echo " remote-start [ -n ] [ -s ] [ -c ] [ -r <root-name> ] [ -T ] [ -i ] [ <directory> ] <system>"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo " reset [ <chain> ... ]"
|
echo " reset [ <chain> ... ]"
|
||||||
|
@@ -432,6 +432,33 @@
|
|||||||
<arg choice="plain"><replaceable>address</replaceable></arg>
|
<arg choice="plain"><replaceable>address</replaceable></arg>
|
||||||
</cmdsynopsis>
|
</cmdsynopsis>
|
||||||
|
|
||||||
|
<cmdsynopsis>
|
||||||
|
<command>shorewall[6][-lite]</command>
|
||||||
|
|
||||||
|
<arg
|
||||||
|
choice="opt"><option>trace</option>|<option>debug</option><arg><option>nolock</option></arg></arg>
|
||||||
|
|
||||||
|
<arg>options</arg>
|
||||||
|
|
||||||
|
<arg choice="plain"><option>reload</option></arg>
|
||||||
|
|
||||||
|
<arg><option>-n</option></arg>
|
||||||
|
|
||||||
|
<arg><option>-p</option><arg><option>-d</option></arg></arg>
|
||||||
|
|
||||||
|
<arg><option>-f</option></arg>
|
||||||
|
|
||||||
|
<arg><option>-c</option></arg>
|
||||||
|
|
||||||
|
<arg><option>-T</option></arg>
|
||||||
|
|
||||||
|
<arg><option>-i</option></arg>
|
||||||
|
|
||||||
|
<arg><option>-C</option></arg>
|
||||||
|
|
||||||
|
<arg><replaceable>directory</replaceable></arg>
|
||||||
|
</cmdsynopsis>
|
||||||
|
|
||||||
<cmdsynopsis>
|
<cmdsynopsis>
|
||||||
<command>shorewall[6]</command>
|
<command>shorewall[6]</command>
|
||||||
|
|
||||||
@@ -1916,10 +1943,11 @@
|
|||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><emphasis role="bold">remote-start</emphasis>
|
<term><emphasis role="bold">remote-start</emphasis>
|
||||||
[-<option>s</option>] [-<option>c</option>] [-<option>r</option>
|
[-<option>n</option>] [-<option>s</option>] [-<option>c</option>]
|
||||||
<replaceable>root-user-name</replaceable>] [-<option>T</option>]
|
[-<option>r</option> <replaceable>root-user-name</replaceable>]
|
||||||
[-<option>i</option>] [ [ -D ] <replaceable>directory</replaceable> ]
|
[-<option>T</option>] [-<option>i</option>] [ [ -D ]
|
||||||
[ <replaceable>system</replaceable> ]</term>
|
<replaceable>directory</replaceable> ] [
|
||||||
|
<replaceable>system</replaceable> ]</term>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>This command was renamed from <command>load</command> in
|
<para>This command was renamed from <command>load</command> in
|
||||||
@@ -1955,6 +1983,9 @@
|
|||||||
<replaceable>directory</replaceable>, then the <option>-D</option>
|
<replaceable>directory</replaceable>, then the <option>-D</option>
|
||||||
option must be given.</para>
|
option must be given.</para>
|
||||||
|
|
||||||
|
<para>The <option>-n</option> option causes Shorewall to avoid
|
||||||
|
updating the routing table(s).</para>
|
||||||
|
|
||||||
<para>If <emphasis role="bold">-s</emphasis> is specified and the
|
<para>If <emphasis role="bold">-s</emphasis> is specified and the
|
||||||
<emphasis role="bold">start</emphasis> command succeeds, then the
|
<emphasis role="bold">start</emphasis> command succeeds, then the
|
||||||
remote Shorewall-lite configuration is saved by executing <emphasis
|
remote Shorewall-lite configuration is saved by executing <emphasis
|
||||||
|
@@ -16,7 +16,7 @@ RemainAfterExit=yes
|
|||||||
EnvironmentFile=-/etc/default/shorewall-lite
|
EnvironmentFile=-/etc/default/shorewall-lite
|
||||||
StandardOutput=syslog
|
StandardOutput=syslog
|
||||||
ExecStart=/sbin/shorewall-lite $OPTIONS start $STARTOPTIONS
|
ExecStart=/sbin/shorewall-lite $OPTIONS start $STARTOPTIONS
|
||||||
ExecStop=/sbin/shorewall-lite $OPTIONS stop
|
ExecStop=/sbin/shorewall-lite $OPTIONS clear
|
||||||
ExecReload=/sbin/shorewall-lite $OPTIONS reload $RELOADOPTIONS
|
ExecReload=/sbin/shorewall-lite $OPTIONS reload $RELOADOPTIONS
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
9
Shorewall/Actions/action.A_AllowICMPs.deprecated
Normal file
9
Shorewall/Actions/action.A_AllowICMPs.deprecated
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
#
|
||||||
|
# Shorewall6 -- /usr/share/shorewall/action.A_AllowICMPs
|
||||||
|
#
|
||||||
|
# This action A_ACCEPTs needed ICMP types
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
#ACTION SOURCE DEST PROTO DPORT
|
||||||
|
|
||||||
|
AllowICMPs(A_ACCEPT)
|
@@ -13,6 +13,7 @@
|
|||||||
# IF YOU ARE HAVING CONNECTION PROBLEMS, CHANGING THIS FILE WON'T HELP!!!!!!!!!
|
# IF YOU ARE HAVING CONNECTION PROBLEMS, CHANGING THIS FILE WON'T HELP!!!!!!!!!
|
||||||
#
|
#
|
||||||
?require AUDIT_TARGET
|
?require AUDIT_TARGET
|
||||||
|
?warning "You are using the deprecated A_Drop default action. Please see http://www.shorewall.net/Actions.html
|
||||||
###############################################################################
|
###############################################################################
|
||||||
#ACTION SOURCE DEST PROTO DPORT SPORT
|
#ACTION SOURCE DEST PROTO DPORT SPORT
|
||||||
#
|
#
|
||||||
@@ -31,9 +32,10 @@ Auth(A_DROP)
|
|||||||
#
|
#
|
||||||
A_AllowICMPs - - icmp
|
A_AllowICMPs - - icmp
|
||||||
#
|
#
|
||||||
# Don't log broadcasts
|
# Don't log broadcasts and multicasts
|
||||||
#
|
#
|
||||||
dropBcast(audit)
|
dropBcast(audit)
|
||||||
|
dropMcast(audit)
|
||||||
#
|
#
|
||||||
# Drop packets that are in the INVALID state -- these are usually ICMP packets
|
# Drop packets that are in the INVALID state -- these are usually ICMP packets
|
||||||
# and just confuse people when they appear in the log.
|
# and just confuse people when they appear in the log.
|
@@ -11,6 +11,8 @@
|
|||||||
# internet operation are always ACCEPTed.
|
# internet operation are always ACCEPTed.
|
||||||
#
|
#
|
||||||
# IF YOU ARE HAVING CONNECTION PROBLEMS, CHANGING THIS FILE WON'T HELP!!!!!!!!!
|
# IF YOU ARE HAVING CONNECTION PROBLEMS, CHANGING THIS FILE WON'T HELP!!!!!!!!!
|
||||||
|
?require AUDIT_TARGET
|
||||||
|
?warning "You are using the deprecated A_REJECT default action. Please see http://www.shorewall.net/Actions.html
|
||||||
###############################################################################
|
###############################################################################
|
||||||
#ACTION SOURCE DEST PROTO
|
#ACTION SOURCE DEST PROTO
|
||||||
#
|
#
|
||||||
@@ -25,10 +27,11 @@ COUNT
|
|||||||
#
|
#
|
||||||
A_AllowICMPs - - icmp
|
A_AllowICMPs - - icmp
|
||||||
#
|
#
|
||||||
# Drop Broadcasts so they don't clutter up the log
|
# Drop Broadcasts and multicasts so they don't clutter up the log
|
||||||
# (broadcasts must *not* be rejected).
|
# (these must *not* be rejected).
|
||||||
#
|
#
|
||||||
dropBcast(audit)
|
dropBcast(audit)
|
||||||
|
dropMcast(audit)
|
||||||
#
|
#
|
||||||
# Drop packets that are in the INVALID state -- these are usually ICMP packets
|
# Drop packets that are in the INVALID state -- these are usually ICMP packets
|
||||||
# and just confuse people when they appear in the log (these ICMPs cannot be
|
# and just confuse people when they appear in the log (these ICMPs cannot be
|
||||||
|
45
Shorewall/Actions/action.AllowICMPs
Normal file
45
Shorewall/Actions/action.AllowICMPs
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
#
|
||||||
|
# Shorewall -- /usr/share/shorewall/action.AllowICMPs
|
||||||
|
#
|
||||||
|
# This action ACCEPTs needed ICMP types.
|
||||||
|
#
|
||||||
|
###############################################################################
|
||||||
|
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER
|
||||||
|
|
||||||
|
DEFAULTS ACCEPT
|
||||||
|
|
||||||
|
?if __IPV4
|
||||||
|
@1 - - icmp fragmentation-needed {comment="Needed ICMP types"}
|
||||||
|
@1 - - icmp time-exceeded {comment="Needed ICMP types"}
|
||||||
|
?else
|
||||||
|
?COMMENT Needed ICMP types (RFC4890)
|
||||||
|
|
||||||
|
@1 - - ipv6-icmp destination-unreachable
|
||||||
|
@1 - - ipv6-icmp packet-too-big
|
||||||
|
@1 - - ipv6-icmp time-exceeded
|
||||||
|
@1 - - ipv6-icmp parameter-problem
|
||||||
|
|
||||||
|
# The following should have a ttl of 255 and must be allowed to transit a bridge
|
||||||
|
@1 - - ipv6-icmp router-solicitation
|
||||||
|
@1 - - ipv6-icmp router-advertisement
|
||||||
|
@1 - - ipv6-icmp neighbour-solicitation
|
||||||
|
@1 - - ipv6-icmp neighbour-advertisement
|
||||||
|
@1 - - ipv6-icmp 137 # Redirect
|
||||||
|
@1 - - ipv6-icmp 141 # Inverse neighbour discovery solicitation
|
||||||
|
@1 - - ipv6-icmp 142 # Inverse neighbour discovery advertisement
|
||||||
|
|
||||||
|
# The following should have a link local source address and must be allowed to transit a bridge
|
||||||
|
@1 fe80::/10 - ipv6-icmp 130 # Listener query
|
||||||
|
@1 fe80::/10 - ipv6-icmp 131 # Listener report
|
||||||
|
@1 fe80::/10 - ipv6-icmp 132 # Listener done
|
||||||
|
@1 fe80::/10 - ipv6-icmp 143 # Listener report v2
|
||||||
|
|
||||||
|
# The following should be received with a ttl of 255 and must be allowed to transit a bridge
|
||||||
|
@1 - - ipv6-icmp 148 # Certificate path solicitation
|
||||||
|
@1 - - ipv6-icmp 149 # Certificate path advertisement
|
||||||
|
|
||||||
|
# The following should have a link local source address and a ttl of 1 and must be allowed to transit abridge
|
||||||
|
@1 fe80::/10 - ipv6-icmp 151 # Multicast router advertisement
|
||||||
|
@1 fe80::/10 - ipv6-icmp 152 # Multicast router solicitation
|
||||||
|
@1 fe80::/10 - ipv6-icmp 153 # Multicast router termination
|
||||||
|
?endif
|
@@ -20,7 +20,7 @@
|
|||||||
# along with this program; if not, write to the Free Software
|
# along with this program; if not, write to the Free Software
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||||
#
|
#
|
||||||
# Broadcast[([<action>|-[,{audit|-}])]
|
# Broadcast[([<action>|[,{audit|-}])]
|
||||||
#
|
#
|
||||||
# Default action is DROP
|
# Default action is DROP
|
||||||
#
|
#
|
||||||
@@ -29,27 +29,37 @@
|
|||||||
DEFAULTS DROP,-
|
DEFAULTS DROP,-
|
||||||
|
|
||||||
?if __ADDRTYPE
|
?if __ADDRTYPE
|
||||||
@1 - - - ;; -m addrtype --dst-type BROADCAST
|
@1 - - - ;; -m addrtype --dst-type BROADCAST
|
||||||
@1 - - - ;; -m addrtype --dst-type ANYCAST
|
@1 - - - ;; -m addrtype --dst-type ANYCAST
|
||||||
?else
|
?else
|
||||||
?begin perl;
|
?begin perl;
|
||||||
|
|
||||||
use Shorewall::IPAddrs;
|
use strict;
|
||||||
use Shorewall::Config;
|
use Shorewall::IPAddrs;
|
||||||
use Shorewall::Chains;
|
use Shorewall::Config;
|
||||||
|
use Shorewall::Chains;
|
||||||
|
|
||||||
my ( $action ) = get_action_params( 1 );
|
my ( $action, $audit ) = get_action_params( 2 );
|
||||||
my $chainref = get_action_chain;
|
my $chainref = get_action_chain;
|
||||||
my ( $level, $tag ) = get_action_logging;
|
my ( $level, $tag ) = get_action_logging;
|
||||||
|
|
||||||
add_commands $chainref, 'for address in $ALL_BCASTS; do';
|
fatal_error "Invalid parameter to action Broadcast" if supplied $audit && $audit ne 'audit';
|
||||||
incr_cmd_level $chainref;
|
|
||||||
log_rule_limit $level, $chainref, 'Broadcast' , $action, '', $tag, 'add', ' -d $address ' if $level ne '';
|
|
||||||
add_jump $chainref, $action, 0, "-d \$address ";
|
|
||||||
decr_cmd_level $chainref;
|
|
||||||
add_commands $chainref, 'done';
|
|
||||||
|
|
||||||
1;
|
my $target = require_audit ( $action , $audit );
|
||||||
|
|
||||||
?end perl;
|
if ( $family == F_IPV4 ) {
|
||||||
|
add_commands $chainref, 'for address in $ALL_BCASTS; do';
|
||||||
|
} elsif ($family == F_IPV6 ) {
|
||||||
|
add_commands $chainref, 'for address in $ALL_ACASTS; do';
|
||||||
|
}
|
||||||
|
|
||||||
|
incr_cmd_level $chainref;
|
||||||
|
log_rule_limit $level, $chainref, 'Broadcast' , $action, '', $tag, 'add', ' -d $address ' if $level ne '';
|
||||||
|
add_jump $chainref, $target, 0, "-d \$address ";
|
||||||
|
decr_cmd_level $chainref;
|
||||||
|
add_commands $chainref, 'done';
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
?end perl;
|
||||||
?endif
|
?endif
|
||||||
|
@@ -13,9 +13,9 @@
|
|||||||
DEFAULTS 2,0
|
DEFAULTS 2,0
|
||||||
|
|
||||||
?if @1 !~ /^\d+/ || ! @1 || @1 > 1024
|
?if @1 !~ /^\d+/ || ! @1 || @1 > 1024
|
||||||
?error Invalid value for Bricks (@1)
|
?error Invalid value (@1) for the GlusterFS Bricks argument
|
||||||
?elsif @2 !~ /^[01]$/
|
?elsif @2 !~ /^[01]$/
|
||||||
?error Invalid value for IB (@2)
|
?error Invalid value (@2) for the GlusterFS IB argument
|
||||||
?endif
|
?endif
|
||||||
|
|
||||||
#ACTION SOURCE DEST PROTO DPORT
|
#ACTION SOURCE DEST PROTO DPORT
|
||||||
|
@@ -29,22 +29,28 @@
|
|||||||
DEFAULTS DROP,-
|
DEFAULTS DROP,-
|
||||||
|
|
||||||
?if __ADDRTYPE
|
?if __ADDRTYPE
|
||||||
@1 - - - ;; -m addrtype --dst-type MULTICAST
|
@1 - - - ;; -m addrtype --dst-type MULTICAST
|
||||||
?else
|
?else
|
||||||
?begin perl;
|
?begin perl;
|
||||||
|
|
||||||
use Shorewall::IPAddrs;
|
use strict;
|
||||||
use Shorewall::Config;
|
use Shorewall::IPAddrs;
|
||||||
use Shorewall::Chains;
|
use Shorewall::Config;
|
||||||
|
use Shorewall::Chains;
|
||||||
|
|
||||||
my ( $action ) = get_action_params( 1 );
|
my ( $action, $audit ) = get_action_params( 2 );
|
||||||
my $chainref = get_action_chain;
|
my $chainref = get_action_chain;
|
||||||
my ( $level, $tag ) = get_action_logging;
|
my ( $level, $tag ) = get_action_logging;
|
||||||
|
|
||||||
log_rule_limit $level, $chainref, 'Multicast' , $action, '', $tag, 'add', ' -d 224.0.0.0/4 ' if $level ne '';
|
fatal_error "Invalid parameter to action Multicast" if supplied $audit && $audit ne 'audit';
|
||||||
add_jump $chainref, $action, 0, '-d 224.0.0.0/4 ';
|
|
||||||
|
|
||||||
1;
|
my $target = require_audit ( $action , $audit );
|
||||||
|
my $dest = ( $family == F_IPV4 ) ? join( ' ', '-d', IPv4_MULTICAST . ' ' ) : join( ' ', '-d', IPv6_MULTICAST . ' ' );
|
||||||
|
|
||||||
?end perl;
|
log_rule_limit( $level, $chainref, 'Multicast' , $action, '', $tag, 'add', $dest ) if $level ne '';
|
||||||
|
add_jump $chainref, $target, 0, $dest;
|
||||||
|
|
||||||
|
1;
|
||||||
|
|
||||||
|
?end perl;
|
||||||
?endif
|
?endif
|
||||||
|
@@ -28,10 +28,10 @@ DEFAULTS -
|
|||||||
|
|
||||||
?if passed(@1)
|
?if passed(@1)
|
||||||
?if @1 eq 'audit'
|
?if @1 eq 'audit'
|
||||||
?require AUDIT_TARGET
|
?require AUDIT_TARGET
|
||||||
Broadcast(A_ACCEPT)
|
Broadcast(A_ACCEPT)
|
||||||
?else
|
?else
|
||||||
?error "Invalid argument (@1) to allowBcast"
|
?error "Invalid argument (@1) to allowBcast"
|
||||||
?endif
|
?endif
|
||||||
?else
|
?else
|
||||||
Broadcast(ACCEPT)
|
Broadcast(ACCEPT)
|
||||||
|
@@ -28,10 +28,10 @@ DEFAULTS -
|
|||||||
|
|
||||||
?if passed(@1)
|
?if passed(@1)
|
||||||
?if @1 eq 'audit'
|
?if @1 eq 'audit'
|
||||||
?require AUDIT_TARGET
|
?require AUDIT_TARGET
|
||||||
Multicast(A_ACCEPT)
|
Multicast(A_ACCEPT)
|
||||||
?else
|
?else
|
||||||
?error "Invalid argument (@1) to allowMcast"
|
?error "Invalid argument (@1) to allowMcast"
|
||||||
?endif
|
?endif
|
||||||
?else
|
?else
|
||||||
Multicast(ACCEPT)
|
Multicast(ACCEPT)
|
||||||
|
@@ -28,13 +28,13 @@ DEFAULTS -
|
|||||||
|
|
||||||
?if passed(@1)
|
?if passed(@1)
|
||||||
?if @1 eq 'audit'
|
?if @1 eq 'audit'
|
||||||
?require AUDIT_TARGET
|
?require AUDIT_TARGET
|
||||||
A_ACCEPT - - 17 1900
|
A_ACCEPT - - 17 1900
|
||||||
A_ACCEPT - - 6 49152
|
A_ACCEPT - - 6 49152
|
||||||
?else
|
?else
|
||||||
?error "Invalid argument (@1) to allowinUPnP"
|
?error "Invalid argument (@1) to allowinUPnP"
|
||||||
?endif
|
?endif
|
||||||
?else
|
?else
|
||||||
ACCEPT - - 17 1900
|
ACCEPT - - 17 1900
|
||||||
ACCEPT - - 6 49152
|
ACCEPT - - 6 49152
|
||||||
?endif
|
?endif
|
||||||
|
@@ -28,10 +28,10 @@ DEFAULTS -
|
|||||||
|
|
||||||
?if passed(@1)
|
?if passed(@1)
|
||||||
?if @1 eq 'audit'
|
?if @1 eq 'audit'
|
||||||
?require AUDIT_TARGET
|
?require AUDIT_TARGET
|
||||||
Broadcast(A_DROP)
|
Broadcast(A_DROP)
|
||||||
?else
|
?else
|
||||||
?error "Invalid argument (@1) to dropBcast"
|
?error "Invalid argument (@1) to dropBcast"
|
||||||
?endif
|
?endif
|
||||||
?else
|
?else
|
||||||
Broadcast(DROP)
|
Broadcast(DROP)
|
||||||
|
@@ -28,10 +28,10 @@ DEFAULTS -
|
|||||||
|
|
||||||
?if passed(@1)
|
?if passed(@1)
|
||||||
?if @1 eq 'audit'
|
?if @1 eq 'audit'
|
||||||
?require AUDIT_TARGET
|
?require AUDIT_TARGET
|
||||||
Multicast(A_DROP)
|
Multicast(A_DROP)
|
||||||
?else
|
?else
|
||||||
?error "Invalid argument (@1) to dropMcast"
|
?error "Invalid argument (@1) to dropMcast"
|
||||||
?endif
|
?endif
|
||||||
?else
|
?else
|
||||||
Multicast(DROP)
|
Multicast(DROP)
|
||||||
|
@@ -28,11 +28,11 @@ DEFAULTS -
|
|||||||
|
|
||||||
?if passed(@1)
|
?if passed(@1)
|
||||||
?if @1 eq 'audit'
|
?if @1 eq 'audit'
|
||||||
?require AUDIT_TARGET
|
?require AUDIT_TARGET
|
||||||
A_DROP ;; -p 6 ! --syn
|
A_DROP {proto=6:!syn}
|
||||||
?else
|
?else
|
||||||
?error "Invalid argument (@1) to dropNotSyn"
|
?error "Invalid argument (@1) to dropNotSyn"
|
||||||
?endif
|
?endif
|
||||||
?else
|
?else
|
||||||
DROP ;; -p 6 ! --syn
|
DROP {proto=6:!syn}
|
||||||
?endif
|
?endif
|
||||||
|
@@ -28,12 +28,12 @@ DEFAULTS -
|
|||||||
|
|
||||||
?if passed(@1)
|
?if passed(@1)
|
||||||
?if @1 eq 'audit'
|
?if @1 eq 'audit'
|
||||||
?require AUDIT_TARGET
|
?require AUDIT_TARGET
|
||||||
A_REJECT ;; -p 6 ! --syn
|
A_REJECT {proto=6:!syn}
|
||||||
?else
|
?else
|
||||||
?error "Invalid argument (@1) to rejNotSyn"
|
?error "Invalid argument (@1) to rejNotSyn"
|
||||||
?endif
|
?endif
|
||||||
?else
|
?else
|
||||||
REJECT(--reject-with tcp-reset) ;; -p 6 ! --syn
|
REJECT(tcp-reset) {proto=6:!syn}
|
||||||
?endif
|
?endif
|
||||||
|
|
||||||
|
@@ -1,13 +0,0 @@
|
|||||||
#
|
|
||||||
# Shorewall -- /usr/share/shorewall/macro.AllowICMPs
|
|
||||||
#
|
|
||||||
# This macro ACCEPTs needed ICMP types.
|
|
||||||
#
|
|
||||||
###############################################################################
|
|
||||||
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER
|
|
||||||
|
|
||||||
?COMMENT Needed ICMP types
|
|
||||||
|
|
||||||
DEFAULT ACCEPT
|
|
||||||
PARAM - - icmp fragmentation-needed
|
|
||||||
PARAM - - icmp time-exceeded
|
|
@@ -405,14 +405,14 @@ our $VERSION = 'MODULEVERSION';
|
|||||||
# Provider Chains for provider <p>
|
# Provider Chains for provider <p>
|
||||||
# Load Balance - ~<p>
|
# Load Balance - ~<p>
|
||||||
#
|
#
|
||||||
# Zone-pair chains for rules chain <z12z2>
|
# Zone-pair chains for rules chain <z1-z2>
|
||||||
#
|
#
|
||||||
# Syn Flood - @<z12z2>
|
# Syn Flood - @<z1-z2>
|
||||||
# Blacklist - <z12z2>~
|
# Blacklist - <z1-z2>~
|
||||||
# Established - ^<z12z2>
|
# Established - ^<z1-z2>
|
||||||
# Related - +<z12z2>
|
# Related - +<z1-z2>
|
||||||
# Invalid - _<z12z2>
|
# Invalid - _<z1-z2>
|
||||||
# Untracked - &<z12z2>
|
# Untracked - &<z1-z2>
|
||||||
#
|
#
|
||||||
our %chain_table;
|
our %chain_table;
|
||||||
our $raw_table;
|
our $raw_table;
|
||||||
@@ -434,7 +434,7 @@ use constant { STANDARD => 0x1, #defined by Netfilter
|
|||||||
REDIRECT => 0x20, #'REDIRECT'
|
REDIRECT => 0x20, #'REDIRECT'
|
||||||
ACTION => 0x40, #An action (may be built-in)
|
ACTION => 0x40, #An action (may be built-in)
|
||||||
MACRO => 0x80, #A Macro
|
MACRO => 0x80, #A Macro
|
||||||
LOGRULE => 0x100, #'LOG','NFLOG'
|
LOGRULE => 0x100, #'LOG','ULOG','NFLOG'
|
||||||
NFQ => 0x200, #'NFQUEUE'
|
NFQ => 0x200, #'NFQUEUE'
|
||||||
CHAIN => 0x400, #Manual Chain
|
CHAIN => 0x400, #Manual Chain
|
||||||
SET => 0x800, #SET
|
SET => 0x800, #SET
|
||||||
@@ -1081,11 +1081,11 @@ sub format_option( $$ ) {
|
|||||||
|
|
||||||
assert( ! reftype $value );
|
assert( ! reftype $value );
|
||||||
|
|
||||||
my $rule = '';
|
my $rule;
|
||||||
|
|
||||||
$value =~ s/\s*$//;
|
$value =~ s/\s*$//;
|
||||||
|
|
||||||
$rule .= join( ' ' , ' -m', $option, $value );
|
$rule = join( ' ' , ' -m', $option, $value );
|
||||||
|
|
||||||
$rule;
|
$rule;
|
||||||
}
|
}
|
||||||
@@ -4556,7 +4556,8 @@ sub do_proto( $$$;$ )
|
|||||||
|
|
||||||
if ( $proto ne '' ) {
|
if ( $proto ne '' ) {
|
||||||
|
|
||||||
my $synonly = ( $proto =~ s/:syn$//i );
|
my $synonly = ( $proto =~ s/:(!)?syn$//i );
|
||||||
|
my $notsyn = $1;
|
||||||
my $invert = ( $proto =~ s/^!// ? '! ' : '' );
|
my $invert = ( $proto =~ s/^!// ? '! ' : '' );
|
||||||
my $protonum = resolve_proto $proto;
|
my $protonum = resolve_proto $proto;
|
||||||
|
|
||||||
@@ -4574,7 +4575,7 @@ sub do_proto( $$$;$ )
|
|||||||
$output = "${invert}-p ${proto} ";
|
$output = "${invert}-p ${proto} ";
|
||||||
} else {
|
} else {
|
||||||
fatal_error '":syn" is only allowed with tcp' unless $proto == TCP && ! $invert;
|
fatal_error '":syn" is only allowed with tcp' unless $proto == TCP && ! $invert;
|
||||||
$output = "-p $proto --syn ";
|
$output = $notsyn ? "-p $proto ! --syn " : "-p $proto --syn ";
|
||||||
}
|
}
|
||||||
|
|
||||||
fatal_error "SOURCE/DEST PORT(S) not allowed with PROTO !$pname" if $invert && ($ports ne '' || $sports ne '');
|
fatal_error "SOURCE/DEST PORT(S) not allowed with PROTO !$pname" if $invert && ($ports ne '' || $sports ne '');
|
||||||
|
@@ -86,6 +86,9 @@ our @EXPORT = qw(
|
|||||||
kernel_version
|
kernel_version
|
||||||
|
|
||||||
compiletime
|
compiletime
|
||||||
|
|
||||||
|
F_IPV4
|
||||||
|
F_IPV6
|
||||||
);
|
);
|
||||||
|
|
||||||
our @EXPORT_OK = qw( $shorewall_dir initialize shorewall);
|
our @EXPORT_OK = qw( $shorewall_dir initialize shorewall);
|
||||||
@@ -196,9 +199,6 @@ our %EXPORT_TAGS = ( internal => [ qw( create_temp_script
|
|||||||
|
|
||||||
PARMSMODIFIED
|
PARMSMODIFIED
|
||||||
USEDCALLER
|
USEDCALLER
|
||||||
|
|
||||||
F_IPV4
|
|
||||||
F_IPV6
|
|
||||||
|
|
||||||
TCP
|
TCP
|
||||||
UDP
|
UDP
|
||||||
@@ -748,7 +748,7 @@ sub initialize( $;$$) {
|
|||||||
TC_SCRIPT => '',
|
TC_SCRIPT => '',
|
||||||
EXPORT => 0,
|
EXPORT => 0,
|
||||||
KLUDGEFREE => '',
|
KLUDGEFREE => '',
|
||||||
VERSION => "5.1.1-RC1",
|
VERSION => "5.1.4-Beta1",
|
||||||
CAPVERSION => 50100 ,
|
CAPVERSION => 50100 ,
|
||||||
BLACKLIST_LOG_TAG => '',
|
BLACKLIST_LOG_TAG => '',
|
||||||
RELATED_LOG_TAG => '',
|
RELATED_LOG_TAG => '',
|
||||||
@@ -907,6 +907,7 @@ sub initialize( $;$$) {
|
|||||||
ZERO_MARKS => undef ,
|
ZERO_MARKS => undef ,
|
||||||
FIREWALL => undef ,
|
FIREWALL => undef ,
|
||||||
BALANCE_PROVIDERS => undef ,
|
BALANCE_PROVIDERS => undef ,
|
||||||
|
PERL_HASH_SEED => undef ,
|
||||||
#
|
#
|
||||||
# Packet Disposition
|
# Packet Disposition
|
||||||
#
|
#
|
||||||
@@ -1092,7 +1093,7 @@ sub initialize( $;$$) {
|
|||||||
|
|
||||||
%compiler_params = ();
|
%compiler_params = ();
|
||||||
|
|
||||||
%actparams = ( 0 => 0, loglevel => '', logtag => '', chain => '', disposition => '', caller => '' );
|
%actparams = ( 0 => 0, loglevel => '', logtag => '', chain => '', disposition => '', caller => '', callfile => '', callline => '' );
|
||||||
$parmsmodified = 0;
|
$parmsmodified = 0;
|
||||||
$usedcaller = 0;
|
$usedcaller = 0;
|
||||||
%ipsets = ();
|
%ipsets = ();
|
||||||
@@ -1218,7 +1219,7 @@ sub compiletime() {
|
|||||||
sub currentlineinfo() {
|
sub currentlineinfo() {
|
||||||
my $linenumber = $currentlinenumber || 1;
|
my $linenumber = $currentlinenumber || 1;
|
||||||
|
|
||||||
if ( $currentfile ) {
|
if ( $currentfilename ) {
|
||||||
my $lineinfo = " $currentfilename ";
|
my $lineinfo = " $currentfilename ";
|
||||||
|
|
||||||
if ( $linenumber eq 'EOF' ) {
|
if ( $linenumber eq 'EOF' ) {
|
||||||
@@ -2177,7 +2178,7 @@ sub split_list3( $$ ) {
|
|||||||
$element = join ',', $element , $_;
|
$element = join ',', $element , $_;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unless ( $opencount == 0 ) {
|
unless ( $opencount == 0 ) {
|
||||||
fatal_error "Invalid $type ($list)";
|
fatal_error "Invalid $type ($list)";
|
||||||
}
|
}
|
||||||
@@ -2232,7 +2233,7 @@ sub split_list4( $ ) {
|
|||||||
sub split_columns( $ ) {
|
sub split_columns( $ ) {
|
||||||
my ($list) = @_;
|
my ($list) = @_;
|
||||||
|
|
||||||
return split ' ', $list unless $list =~ /\(/;
|
return split ' ', $list unless $list =~ /[()]/;
|
||||||
|
|
||||||
my @list1 = split ' ', $list;
|
my @list1 = split ' ', $list;
|
||||||
my @list2;
|
my @list2;
|
||||||
@@ -2273,9 +2274,7 @@ sub split_columns( $ ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unless ( $opencount == 0 ) {
|
fatal_error "Mismatched parentheses ($list)" unless $opencount == 0;
|
||||||
fatal_error "Mismatched parentheses ($list)";
|
|
||||||
}
|
|
||||||
|
|
||||||
@list2;
|
@list2;
|
||||||
}
|
}
|
||||||
@@ -2288,7 +2287,7 @@ sub clear_comment();
|
|||||||
# ensure that it has an appropriate number of columns.
|
# ensure that it has an appropriate number of columns.
|
||||||
# supply '-' in omitted trailing columns.
|
# supply '-' in omitted trailing columns.
|
||||||
# Handles all of the supported forms of column/pair specification
|
# Handles all of the supported forms of column/pair specification
|
||||||
# Handles segragating raw iptables input in INLINE rules
|
# Handles segragating raw iptables input in rules
|
||||||
#
|
#
|
||||||
sub split_line2( $$;$$$ ) {
|
sub split_line2( $$;$$$ ) {
|
||||||
my ( $description, $columnsref, $nopad, $maxcolumns, $inline ) = @_;
|
my ( $description, $columnsref, $nopad, $maxcolumns, $inline ) = @_;
|
||||||
@@ -2437,12 +2436,12 @@ sub split_line2( $$;$$$ ) {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
fatal_error "Unknown column ($1)" unless exists $columnsref->{$column};
|
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 = $1 if $value =~ /^"([^"]+)"$/;
|
||||||
$value =~ s/\\"/"/g;
|
$value =~ s/\\"/"/g;
|
||||||
fatal_error "Non-ASCII gunk in the value of the $column column" if $columns =~ /[^\s[:print:]]/;
|
fatal_error "Non-ASCII gunk in the value of the $column column" if $value =~ /[^\s[:print:]]/;
|
||||||
$line[$column] = $value;
|
my $colnum = $columnsref->{$column};
|
||||||
|
warning_message qq(Replacing "$line[$colnum]" with "$value" in the ) . uc( $column ) . ' column' if $line[$colnum] ne '-';
|
||||||
|
$line[$colnum] = $value;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -2782,7 +2781,7 @@ sub evaluate_expression( $$$$ ) {
|
|||||||
my ( $first, $var, $rest ) = ( $1, $3, $4);
|
my ( $first, $var, $rest ) = ( $1, $3, $4);
|
||||||
$var = numeric_value( $var ) if $var =~ /^\d/;
|
$var = numeric_value( $var ) if $var =~ /^\d/;
|
||||||
$val = $var ? $actparams{$var} : $chain;
|
$val = $var ? $actparams{$var} : $chain;
|
||||||
$usedcaller = USEDCALLER if $var eq 'caller';
|
$usedcaller = USEDCALLER if $var =~ /^(?:caller|callfile|callline)$/;
|
||||||
$expression = join_parts( $first, $val, $rest , $just_expand );
|
$expression = join_parts( $first, $val, $rest , $just_expand );
|
||||||
directive_error( "Variable Expansion Loop" , $filename, $linenumber ) if ++$count > 100;
|
directive_error( "Variable Expansion Loop" , $filename, $linenumber ) if ++$count > 100;
|
||||||
}
|
}
|
||||||
@@ -2818,7 +2817,6 @@ sub evaluate_expression( $$$$ ) {
|
|||||||
#
|
#
|
||||||
# Not a simple one-term expression -- compile it
|
# Not a simple one-term expression -- compile it
|
||||||
#
|
#
|
||||||
|
|
||||||
declare_passed unless $evals++;
|
declare_passed unless $evals++;
|
||||||
|
|
||||||
$val = eval qq(package Shorewall::User;
|
$val = eval qq(package Shorewall::User;
|
||||||
@@ -2835,6 +2833,7 @@ sub evaluate_expression( $$$$ ) {
|
|||||||
$val;
|
$val;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub pop_open();
|
||||||
#
|
#
|
||||||
# Set callback
|
# Set callback
|
||||||
#
|
#
|
||||||
@@ -2842,6 +2841,40 @@ sub directive_callback( $ ) {
|
|||||||
$directive_callback = shift;
|
$directive_callback = shift;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub directive_message( \&$$$$ ) {
|
||||||
|
my ( $functptr, $verbose, $expression, $filename, $linenumber ) = @_;
|
||||||
|
|
||||||
|
unless ( $omitting ) {
|
||||||
|
if ( $actparams{0} ) {
|
||||||
|
#
|
||||||
|
# When issuing a message from an action, report the action invocation
|
||||||
|
# site rather than the action file and line number.
|
||||||
|
#
|
||||||
|
# Avoid double-reporting by temporarily removing the invocation site
|
||||||
|
# from the open stack.
|
||||||
|
#
|
||||||
|
my $saveopens = pop @openstack;
|
||||||
|
|
||||||
|
$functptr->( $verbose ,
|
||||||
|
evaluate_expression( $expression ,
|
||||||
|
$filename ,
|
||||||
|
$linenumber ,
|
||||||
|
1 ),
|
||||||
|
$actparams{callfile} ,
|
||||||
|
$actparams{callline} );
|
||||||
|
push @openstack, $saveopens;
|
||||||
|
} else {
|
||||||
|
$functptr->( $verbose ,
|
||||||
|
evaluate_expression( $expression ,
|
||||||
|
$filename ,
|
||||||
|
$linenumber ,
|
||||||
|
1 ),
|
||||||
|
$filename ,
|
||||||
|
$linenumber );
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
# Each entry in @ifstack consists of a 4-tupple
|
# Each entry in @ifstack consists of a 4-tupple
|
||||||
#
|
#
|
||||||
@@ -2855,7 +2888,8 @@ sub process_compiler_directive( $$$$ ) {
|
|||||||
|
|
||||||
print "CD===> $line\n" if $debug;
|
print "CD===> $line\n" if $debug;
|
||||||
|
|
||||||
directive_error( "Invalid compiler directive ($line)" , $filename, $linenumber ) unless $line =~ /^\s*\?(IF\s+|ELSE|ELSIF\s+|ENDIF|SET\s+|RESET\s+|FORMAT\s+|COMMENT\s*|ERROR\s+|WARNING\s+|INFO\s+|WARNING!\s+|INFO!\s+|REQUIRE\s+)(.*)$/i;
|
directive_error( "Invalid compiler directive ($line)" , $filename, $linenumber )
|
||||||
|
unless $line =~ /^\s*\?(IF\s+|ELSE|ELSIF\s+|ENDIF|SET\s+|RESET\s+|FORMAT\s+|COMMENT\s*|ERROR\s+|WARNING\s+|INFO\s+|WARNING!\s+|INFO!\s+|REQUIRE\s+)(.*)$/i;
|
||||||
|
|
||||||
my ($keyword, $expression) = ( uc $1, $2 );
|
my ($keyword, $expression) = ( uc $1, $2 );
|
||||||
|
|
||||||
@@ -2957,15 +2991,16 @@ sub process_compiler_directive( $$$$ ) {
|
|||||||
$var = $2 || 'chain';
|
$var = $2 || 'chain';
|
||||||
directive_error( "Shorewall variables may only be RESET in the body of an action", $filename, $linenumber ) unless $actparams{0};
|
directive_error( "Shorewall variables may only be RESET in the body of an action", $filename, $linenumber ) unless $actparams{0};
|
||||||
if ( exists $actparams{$var} ) {
|
if ( exists $actparams{$var} ) {
|
||||||
if ( $var =~ /^loglevel|logtag|chain|disposition|caller$/ ) {
|
if ( $var =~ /^(?:loglevel|logtag|chain|disposition|caller|callfile|callline)$/ ) {
|
||||||
$actparams{$var} = '';
|
$actparams{$var} = '';
|
||||||
} else {
|
} else {
|
||||||
delete $actparams{$var}
|
delete $actparams{$var}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$parmsmodified = PARMSMODIFIED if @ifstack > $ifstack;
|
||||||
} else {
|
} else {
|
||||||
directive_warning( 'Yes', "Shorewall variable $2 does not exist", $filename, $linenumber );
|
directive_warning( 'Yes', "Shorewall variable $2 does not exist", $filename, $linenumber );
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if ( exists $variables{$2} ) {
|
if ( exists $variables{$2} ) {
|
||||||
delete $variables{$2};
|
delete $variables{$2};
|
||||||
@@ -2996,68 +3031,85 @@ sub process_compiler_directive( $$$$ ) {
|
|||||||
|
|
||||||
ERROR => sub() {
|
ERROR => sub() {
|
||||||
unless ( $omitting ) {
|
unless ( $omitting ) {
|
||||||
directive_error( evaluate_expression( $expression ,
|
if ( $actparams{0} ) {
|
||||||
$filename ,
|
close $currentfile;
|
||||||
$linenumber ,
|
#
|
||||||
1 ) ,
|
# Avoid 'missing ?ENDIF' error in pop_open'
|
||||||
$actparams{callfile} ,
|
#
|
||||||
$actparams{callline} ) unless $omitting;
|
@ifstack = ();
|
||||||
|
#
|
||||||
|
# Avoid double-reporting the action invocation site
|
||||||
|
#
|
||||||
|
pop_open;
|
||||||
|
|
||||||
|
directive_error( evaluate_expression( $expression ,
|
||||||
|
$filename ,
|
||||||
|
$linenumber ,
|
||||||
|
1 ) ,
|
||||||
|
$actparams{callfile} ,
|
||||||
|
$actparams{callline} );
|
||||||
|
} else {
|
||||||
|
directive_error( evaluate_expression( $expression ,
|
||||||
|
$filename ,
|
||||||
|
$linenumber ,
|
||||||
|
1 ) ,
|
||||||
|
$filename ,
|
||||||
|
$linenumber ) unless $omitting;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} ,
|
} ,
|
||||||
|
|
||||||
WARNING => sub() {
|
WARNING => sub() {
|
||||||
unless ( $omitting ) {
|
directive_message( &directive_warning ,
|
||||||
directive_warning( $config{VERBOSE_MESSAGES} ,
|
$config{VERBOSE_MESSAGES},
|
||||||
evaluate_expression( $expression ,
|
$expression ,
|
||||||
$filename ,
|
$filename ,
|
||||||
$linenumber ,
|
$linenumber );
|
||||||
1 ),
|
|
||||||
$actparams{callfile} ,
|
|
||||||
$actparams{callline} ) unless $omitting;
|
|
||||||
}
|
|
||||||
} ,
|
} ,
|
||||||
|
|
||||||
INFO => sub() {
|
INFO => sub() {
|
||||||
unless ( $omitting ) {
|
directive_message( &directive_info,
|
||||||
directive_info( $config{VERBOSE_MESSAGES} ,
|
$config{VERBOSE_MESSAGES} ,
|
||||||
evaluate_expression( $expression ,
|
$expression ,
|
||||||
$filename ,
|
$filename ,
|
||||||
$linenumber ,
|
$linenumber );
|
||||||
1 ),
|
|
||||||
$actparams{callfile} ,
|
|
||||||
$actparams{callline} ) unless $omitting;
|
|
||||||
}
|
|
||||||
} ,
|
} ,
|
||||||
|
|
||||||
'WARNING!' => sub() {
|
'WARNING!' => sub() {
|
||||||
unless ( $omitting ) {
|
directive_message( &directive_warning ,
|
||||||
directive_warning( ! $config{VERBOSE_MESSAGES} ,
|
! $config{VERBOSE_MESSAGES} ,
|
||||||
evaluate_expression( $expression ,
|
$expression ,
|
||||||
$filename ,
|
$filename ,
|
||||||
$linenumber ,
|
$linenumber );
|
||||||
1 ),
|
|
||||||
$actparams{callfile} ,
|
|
||||||
$actparams{callline} ) unless $omitting;
|
|
||||||
}
|
|
||||||
} ,
|
} ,
|
||||||
|
|
||||||
'INFO!' => sub() {
|
'INFO!' => sub() {
|
||||||
unless ( $omitting ) {
|
directive_message( &directive_info ,
|
||||||
directive_info( ! $config{VERBOSE_MESSAGES} ,
|
! $config{VERBOSE_MESSAGES} ,
|
||||||
evaluate_expression( $expression ,
|
$expression ,
|
||||||
$filename ,
|
$filename ,
|
||||||
$linenumber ,
|
$linenumber );
|
||||||
1 ),
|
|
||||||
$actparams{callfile} ,
|
|
||||||
$actparams{callline} ) unless $omitting;
|
|
||||||
}
|
|
||||||
} ,
|
} ,
|
||||||
|
|
||||||
REQUIRE => sub() {
|
REQUIRE => sub() {
|
||||||
unless ( $omitting ) {
|
unless ( $omitting ) {
|
||||||
fatal_error "?REQUIRE may only be used within action files" unless $actparams{0};
|
fatal_error "?REQUIRE may only be used within action files" unless $actparams{0};
|
||||||
fatal_error "Unknown capability ($expression)" unless $capdesc{$expression};
|
fatal_error "Unknown capability ($expression)" unless ( my $capdesc = $capdesc{$expression} );
|
||||||
require_capability( $expression, "The $actparams{action} action", 's' );
|
unless ( have_capability( $expression ) ) {
|
||||||
|
close $currentfile;
|
||||||
|
#
|
||||||
|
# Avoid 'missing ?ENDIF' error in pop_open'
|
||||||
|
#
|
||||||
|
@ifstack = ();
|
||||||
|
#
|
||||||
|
# Avoid double-reporting the action call site
|
||||||
|
#
|
||||||
|
pop_open;
|
||||||
|
|
||||||
|
directive_error( "The $actparams{action} action requires the $capdesc capability",
|
||||||
|
$actparams{callfile} ,
|
||||||
|
$actparams{callline} );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
} ,
|
} ,
|
||||||
|
|
||||||
@@ -3559,9 +3611,9 @@ sub push_action_params( $$$$$$ ) {
|
|||||||
$actparams{loglevel} = $loglevel;
|
$actparams{loglevel} = $loglevel;
|
||||||
$actparams{logtag} = $logtag;
|
$actparams{logtag} = $logtag;
|
||||||
$actparams{caller} = $caller;
|
$actparams{caller} = $caller;
|
||||||
$actparams{disposition} = '' if $chainref->{action};
|
|
||||||
$actparams{callfile} = $currentfilename;
|
$actparams{callfile} = $currentfilename;
|
||||||
$actparams{callline} = $currentlinenumber;
|
$actparams{callline} = $currentlinenumber;
|
||||||
|
$actparams{disposition} = '' if $chainref->{action};
|
||||||
#
|
#
|
||||||
# The Shorewall variable '@chain' has non-word characters other than hyphen removed
|
# The Shorewall variable '@chain' has non-word characters other than hyphen removed
|
||||||
#
|
#
|
||||||
@@ -3691,6 +3743,7 @@ sub expand_variables( \$ ) {
|
|||||||
$usedcaller = USEDCALLER if $var eq 'caller';
|
$usedcaller = USEDCALLER if $var eq 'caller';
|
||||||
} else {
|
} else {
|
||||||
fatal_error "Undefined shell variable (\$$var)" unless $config{IGNOREUNKNOWNVARIABLES} || exists $config{$var};
|
fatal_error "Undefined shell variable (\$$var)" unless $config{IGNOREUNKNOWNVARIABLES} || exists $config{$var};
|
||||||
|
$val = $config{$var};
|
||||||
}
|
}
|
||||||
|
|
||||||
$val = '' unless defined $val;
|
$val = '' unless defined $val;
|
||||||
@@ -5370,8 +5423,12 @@ sub update_config_file( $ ) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
if ( supplied $val ) {
|
||||||
$val = conditional_quote $val;
|
#
|
||||||
|
# Log LEVEL and DEFAULT settings often contain parens
|
||||||
|
#
|
||||||
|
$val = ($var =~ /(?:LEVEL|DEFAULT)$/) ? qq("$val") : conditional_quote $val;
|
||||||
|
}
|
||||||
|
|
||||||
$_ = "$var=$val\n";
|
$_ = "$var=$val\n";
|
||||||
}
|
}
|
||||||
@@ -5434,6 +5491,7 @@ EOF
|
|||||||
sub process_shorewall_conf( $$ ) {
|
sub process_shorewall_conf( $$ ) {
|
||||||
my ( $update, $annotate ) = @_;
|
my ( $update, $annotate ) = @_;
|
||||||
my $file = find_file "$product.conf";
|
my $file = find_file "$product.conf";
|
||||||
|
my @vars;
|
||||||
|
|
||||||
if ( -f $file ) {
|
if ( -f $file ) {
|
||||||
$globals{CONFIGDIR} = $configfile = $file;
|
$globals{CONFIGDIR} = $configfile = $file;
|
||||||
@@ -5447,7 +5505,7 @@ sub process_shorewall_conf( $$ ) {
|
|||||||
# Don't expand shell variables or allow embedded scripting
|
# Don't expand shell variables or allow embedded scripting
|
||||||
#
|
#
|
||||||
while ( read_a_line( STRIP_COMMENTS | SUPPRESS_WHITESPACE | CHECK_GUNK ) ) {
|
while ( read_a_line( STRIP_COMMENTS | SUPPRESS_WHITESPACE | CHECK_GUNK ) ) {
|
||||||
if ( $currentline =~ /^\s*([a-zA-Z]\w*)=(.*?)\s*$/ ) {
|
if ( $currentline =~ /^\s*([a-zA-Z]\w*)=(.*)$/ ) {
|
||||||
my ($var, $val) = ($1, $2);
|
my ($var, $val) = ($1, $2);
|
||||||
|
|
||||||
if ( exists $config{$var} ) {
|
if ( exists $config{$var} ) {
|
||||||
@@ -5466,6 +5524,12 @@ sub process_shorewall_conf( $$ ) {
|
|||||||
next;
|
next;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( $update ) {
|
||||||
|
push @vars, $var;
|
||||||
|
} else {
|
||||||
|
expand_variables( $val ) unless $val =~ /^'.*'$/;
|
||||||
|
}
|
||||||
|
|
||||||
$config{$var} = ( $val =~ /\"([^\"]*)\"$/ ? $1 : $val );
|
$config{$var} = ( $val =~ /\"([^\"]*)\"$/ ? $1 : $val );
|
||||||
|
|
||||||
warning_message "Option $var=$val is deprecated"
|
warning_message "Option $var=$val is deprecated"
|
||||||
@@ -5486,14 +5550,19 @@ sub process_shorewall_conf( $$ ) {
|
|||||||
#
|
#
|
||||||
# Now update the config file if asked
|
# Now update the config file if asked
|
||||||
#
|
#
|
||||||
update_config_file( $annotate ) if $update;
|
if ( $update ) {
|
||||||
#
|
update_config_file( $annotate );
|
||||||
# Config file update requires that the option values not have
|
#
|
||||||
# Shell variables expanded. We do that now.
|
# Config file update requires that the option values not have
|
||||||
#
|
# Shell variables expanded. We do that now.
|
||||||
for ( values %config ) {
|
#
|
||||||
if ( supplied $_ ) {
|
# To handle options like LOG_LEVEL, we process the options
|
||||||
expand_variables( $_ ) unless /^'(.+)'$/;
|
# in the order in which they appear in the .conf file.
|
||||||
|
#
|
||||||
|
for ( @vars ) {
|
||||||
|
if ( supplied( my $val = $config{$_} ) ) {
|
||||||
|
expand_variables( $config{$_} ) unless $val =~ /^'.*'$/;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -389,6 +389,8 @@ sub resolve_proto( $ ) {
|
|||||||
my $proto = $_[0];
|
my $proto = $_[0];
|
||||||
my $number;
|
my $number;
|
||||||
|
|
||||||
|
$proto =~ s/:.*//;
|
||||||
|
|
||||||
if ( $proto =~ /^\d+$/ || $proto =~ /^0x/ ) {
|
if ( $proto =~ /^\d+$/ || $proto =~ /^0x/ ) {
|
||||||
$number = numeric_value ( $proto );
|
$number = numeric_value ( $proto );
|
||||||
defined $number && $number <= 255 ? $number : undef;
|
defined $number && $number <= 255 ? $number : undef;
|
||||||
|
@@ -1213,55 +1213,53 @@ sub add_common_rules ( $ ) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( $family == F_IPV4 ) {
|
my $announced = 0;
|
||||||
my $announced = 0;
|
|
||||||
|
|
||||||
$list = find_interfaces_by_option 'upnp';
|
$list = find_interfaces_by_option 'upnp';
|
||||||
|
|
||||||
if ( @$list ) {
|
if ( @$list ) {
|
||||||
progress_message2 "$doing UPnP";
|
progress_message2 "$doing UPnP";
|
||||||
|
|
||||||
$chainref = set_optflags( new_nat_chain( 'UPnP' ), DONT_OPTIMIZE );
|
$chainref = set_optflags( new_nat_chain( 'UPnP' ), DONT_OPTIMIZE );
|
||||||
|
|
||||||
add_commands( $chainref, '[ -s /${VARDIR}/.UPnP ] && cat ${VARDIR}/.UPnP >&3' );
|
add_commands( $chainref, '[ -s /${VARDIR}/.UPnP ] && cat ${VARDIR}/.UPnP >&3' );
|
||||||
|
|
||||||
my $chainref1;
|
my $chainref1;
|
||||||
|
|
||||||
if ( $config{MINIUPNPD} ) {
|
if ( $config{MINIUPNPD} ) {
|
||||||
$chainref1 = set_optflags( new_nat_chain( 'MINIUPNPD-POSTROUTING' ), DONT_OPTIMIZE );
|
$chainref1 = set_optflags( new_nat_chain( 'MINIUPNPD-POSTROUTING' ), DONT_OPTIMIZE );
|
||||||
add_commands( $chainref, '[ -s /${VARDIR}/.MINIUPNPD-POSTROUTING ] && cat ${VARDIR}/.MINIUPNPD-POSTROUTING >&3' );
|
add_commands( $chainref, '[ -s /${VARDIR}/.MINIUPNPD-POSTROUTING ] && cat ${VARDIR}/.MINIUPNPD-POSTROUTING >&3' );
|
||||||
}
|
|
||||||
|
|
||||||
$announced = 1;
|
|
||||||
|
|
||||||
for $interface ( @$list ) {
|
|
||||||
add_ijump_extended $nat_table->{PREROUTING} , j => 'UPnP', get_interface_origin($interface), imatch_source_dev ( $interface );
|
|
||||||
add_ijump_extended $nat_table->{$globals{POSTROUTING}} , j => 'MINIUPNPD-POSTROUTING' , $origin{MINIUPNPD} , imatch_dest_dev ( $interface ) if $chainref1;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
$list = find_interfaces_by_option 'upnpclient';
|
$announced = 1;
|
||||||
|
|
||||||
if ( @$list ) {
|
for $interface ( @$list ) {
|
||||||
progress_message2 "$doing UPnP" unless $announced;
|
add_ijump_extended $nat_table->{PREROUTING} , j => 'UPnP', get_interface_origin($interface), imatch_source_dev ( $interface );
|
||||||
|
add_ijump_extended $nat_table->{$globals{POSTROUTING}} , j => 'MINIUPNPD-POSTROUTING' , $origin{MINIUPNPD} , imatch_dest_dev ( $interface ) if $chainref1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
for $interface ( @$list ) {
|
$list = find_interfaces_by_option 'upnpclient';
|
||||||
my $chainref = $filter_table->{input_option_chain $interface};
|
|
||||||
my $base = uc var_base get_physical $interface;
|
|
||||||
my $optional = interface_is_optional( $interface );
|
|
||||||
my $variable = get_interface_gateway( $interface, ! $optional );
|
|
||||||
my $origin = get_interface_origin( $interface );
|
|
||||||
|
|
||||||
if ( $optional ) {
|
if ( @$list ) {
|
||||||
add_commands( $chainref,
|
progress_message2 "$doing UPnP" unless $announced;
|
||||||
qq(if [ -n "SW_\$${base}_IS_USABLE" -a -n "$variable" ]; then) );
|
|
||||||
incr_cmd_level( $chainref );
|
for $interface ( @$list ) {
|
||||||
add_ijump_extended( $chainref, j => 'ACCEPT', $origin, imatch_source_dev( $interface ), s => $variable, p => 'udp' );
|
my $chainref = $filter_table->{input_option_chain $interface};
|
||||||
decr_cmd_level( $chainref );
|
my $base = uc var_base get_physical $interface;
|
||||||
add_commands( $chainref, 'fi' );
|
my $optional = interface_is_optional( $interface );
|
||||||
} else {
|
my $variable = get_interface_gateway( $interface, ! $optional );
|
||||||
add_ijump_extended( $chainref, j => 'ACCEPT', $origin, imatch_source_dev( $interface ), s => $variable, p => 'udp' );
|
my $origin = get_interface_origin( $interface );
|
||||||
}
|
|
||||||
|
if ( $optional ) {
|
||||||
|
add_commands( $chainref,
|
||||||
|
qq(if [ -n "SW_\$${base}_IS_USABLE" -a -n "$variable" ]; then) );
|
||||||
|
incr_cmd_level( $chainref );
|
||||||
|
add_ijump_extended( $chainref, j => 'ACCEPT', $origin, imatch_source_dev( $interface ), s => $variable, p => 'udp' );
|
||||||
|
decr_cmd_level( $chainref );
|
||||||
|
add_commands( $chainref, 'fi' );
|
||||||
|
} else {
|
||||||
|
add_ijump_extended( $chainref, j => 'ACCEPT', $origin, imatch_source_dev( $interface ), s => $variable, p => 'udp' );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@@ -369,6 +369,7 @@ sub initialize( $ ) {
|
|||||||
'icmp-host-prohibited' => 1,
|
'icmp-host-prohibited' => 1,
|
||||||
'icmp-admin-prohibited' => 1,
|
'icmp-admin-prohibited' => 1,
|
||||||
'icmp-tcp-reset' => 2,
|
'icmp-tcp-reset' => 2,
|
||||||
|
'tcp-reset' => 2,
|
||||||
);
|
);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
@@ -746,22 +747,21 @@ sub process_a_policy1($$$$$$$) {
|
|||||||
if ( $serverwild ) {
|
if ( $serverwild ) {
|
||||||
for my $zone ( @zonelist ) {
|
for my $zone ( @zonelist ) {
|
||||||
for my $zone1 ( @zonelist ) {
|
for my $zone1 ( @zonelist ) {
|
||||||
set_policy_chain rules_chain( ${zone}, ${zone1} ), $client, $server, $chainref, $policy, $intrazone;
|
set_policy_chain rules_chain( ${zone}, ${zone1} ), $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 ( all_zones ) {
|
||||||
set_policy_chain rules_chain( ${zone}, ${server} ), $client, $server, $chainref, $policy, $intrazone;
|
set_policy_chain rules_chain( ${zone}, ${server} ), $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 ( @zonelist ) {
|
||||||
set_policy_chain rules_chain( ${client}, ${zone} ), $client, $server, $chainref, $policy, $intrazone;
|
set_policy_chain rules_chain( ${client}, ${zone} ), $client, $zone, $chainref, $policy, $intrazone;
|
||||||
print_policy $client, $zone, $originalpolicy, $chain;
|
print_policy $client, $zone, $originalpolicy, $chain;
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
print_policy $client, $server, $originalpolicy, $chain;
|
print_policy $client, $server, $originalpolicy, $chain;
|
||||||
}
|
}
|
||||||
@@ -943,13 +943,14 @@ sub add_policy_rules( $$$$$ ) {
|
|||||||
#
|
#
|
||||||
# Default action is an inline
|
# Default action is an inline
|
||||||
#
|
#
|
||||||
|
( undef, my $level ) = split /:/, $paction, 2;
|
||||||
( $action, my $param ) = get_target_param( $action );
|
( $action, my $param ) = get_target_param( $action );
|
||||||
|
|
||||||
process_inline( $action, #Inline
|
process_inline( $action, #Inline
|
||||||
$chainref, #Chain
|
$chainref, #Chain
|
||||||
'', #Matches
|
'', #Matches
|
||||||
'', #Matches1
|
'', #Matches1
|
||||||
$loglevel, #Log Level and Tag
|
$level || '', #Log Level and Tag
|
||||||
$paction, #Target
|
$paction, #Target
|
||||||
$param || '', #Param
|
$param || '', #Param
|
||||||
'-', #Source
|
'-', #Source
|
||||||
@@ -1735,12 +1736,12 @@ sub process_action(\$\$$) {
|
|||||||
|
|
||||||
progress_message2 "$doing $actionfile for chain $chainref->{name}...";
|
progress_message2 "$doing $actionfile for chain $chainref->{name}...";
|
||||||
|
|
||||||
push_open $actionfile, 2, 1, undef, 2;
|
|
||||||
|
|
||||||
my $oldparms = push_action_params( $action, $chainref, $param, $level, $tag, $caller );
|
my $oldparms = push_action_params( $action, $chainref, $param, $level, $tag, $caller );
|
||||||
my $options = $actionref->{options};
|
my $options = $actionref->{options};
|
||||||
my $nolog = $options & ( NOLOG_OPT | LOGJUMP_OPT );
|
my $nolog = $options & ( NOLOG_OPT | LOGJUMP_OPT );
|
||||||
|
|
||||||
|
push_open $actionfile, 2, 1, undef, 2;
|
||||||
|
|
||||||
setup_audit_action( $action ) if $options & AUDIT_OPT;
|
setup_audit_action( $action ) if $options & AUDIT_OPT;
|
||||||
|
|
||||||
$active{$action}++;
|
$active{$action}++;
|
||||||
@@ -2717,6 +2718,8 @@ sub process_rule ( $$$$$$$$$$$$$$$$$$$$ ) {
|
|||||||
# tcp-reset
|
# tcp-reset
|
||||||
#
|
#
|
||||||
fatal_error "tcp-reset may only be used with PROTO tcp" unless ( resolve_proto( $proto ) || 0 ) == TCP;
|
fatal_error "tcp-reset may only be used with PROTO tcp" unless ( resolve_proto( $proto ) || 0 ) == TCP;
|
||||||
|
$exceptionrule = '-p 6 ';
|
||||||
|
$param = 'tcp-reset';
|
||||||
}
|
}
|
||||||
|
|
||||||
$action = "REJECT --reject-with $param";
|
$action = "REJECT --reject-with $param";
|
||||||
|
@@ -2312,9 +2312,10 @@ EOF
|
|||||||
EOF
|
EOF
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return ( $mangle, $fn1 );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return ( $mangle, $fn1 );
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@@ -108,24 +108,6 @@ our @EXPORT = ( qw( NOTHING
|
|||||||
|
|
||||||
our @EXPORT_OK = qw( initialize );
|
our @EXPORT_OK = qw( initialize );
|
||||||
our $VERSION = 'MODULEVERSION';
|
our $VERSION = 'MODULEVERSION';
|
||||||
|
|
||||||
#
|
|
||||||
# IPSEC Option types
|
|
||||||
#
|
|
||||||
use constant { NOTHING => 'NOTHING',
|
|
||||||
NUMERIC => '0x[\da-fA-F]+|\d+',
|
|
||||||
NETWORK => '\d+.\d+.\d+.\d+(\/\d+)?',
|
|
||||||
IPSECPROTO => 'ah|esp|ipcomp',
|
|
||||||
IPSECMODE => 'tunnel|transport'
|
|
||||||
};
|
|
||||||
|
|
||||||
#
|
|
||||||
# Option columns
|
|
||||||
#
|
|
||||||
use constant { IN_OUT => 1,
|
|
||||||
IN => 2,
|
|
||||||
OUT => 3 };
|
|
||||||
|
|
||||||
#
|
#
|
||||||
# Zone Table.
|
# Zone Table.
|
||||||
#
|
#
|
||||||
@@ -221,6 +203,26 @@ our $zonemarkincr;
|
|||||||
our $zonemarklimit;
|
our $zonemarklimit;
|
||||||
our $loopback_interface;
|
our $loopback_interface;
|
||||||
|
|
||||||
|
#
|
||||||
|
# IPSEC Option types
|
||||||
|
#
|
||||||
|
use constant { NOTHING => 'NOTHING',
|
||||||
|
NUMERIC => '0x[\da-fA-F]+|\d+',
|
||||||
|
IPSECPROTO => 'ah|esp|ipcomp',
|
||||||
|
IPSECMODE => 'tunnel|transport'
|
||||||
|
};
|
||||||
|
|
||||||
|
sub NETWORK() {
|
||||||
|
$family == F_IPV4 ? '\d+.\d+.\d+.\d+(\/\d+)?' : '(?:[0-9a-fA-F]{0,4}:){2,7}[0-9a-fA-F]{0,4}(?:\/d+)?';
|
||||||
|
}
|
||||||
|
|
||||||
|
#
|
||||||
|
# Option columns
|
||||||
|
#
|
||||||
|
use constant { IN_OUT => 1,
|
||||||
|
IN => 2,
|
||||||
|
OUT => 3 };
|
||||||
|
|
||||||
use constant { FIREWALL => 1,
|
use constant { FIREWALL => 1,
|
||||||
IP => 2,
|
IP => 2,
|
||||||
BPORT => 4,
|
BPORT => 4,
|
||||||
@@ -276,19 +278,7 @@ our %maxoptionvalue = ( routefilter => 2, mss => 100000 , wait => 120 , ignore =
|
|||||||
|
|
||||||
our %validhostoptions;
|
our %validhostoptions;
|
||||||
|
|
||||||
our %validzoneoptions = ( mss => NUMERIC,
|
our %validzoneoptions;
|
||||||
nomark => NOTHING,
|
|
||||||
blacklist => NOTHING,
|
|
||||||
dynamic_shared => NOTHING,
|
|
||||||
strict => NOTHING,
|
|
||||||
next => NOTHING,
|
|
||||||
reqid => NUMERIC,
|
|
||||||
spi => NUMERIC,
|
|
||||||
proto => IPSECPROTO,
|
|
||||||
mode => IPSECMODE,
|
|
||||||
"tunnel-src" => NETWORK,
|
|
||||||
"tunnel-dst" => NETWORK,
|
|
||||||
);
|
|
||||||
|
|
||||||
use constant { UNRESTRICTED => 1, NOFW => 2 , COMPLEX => 8, IN_OUT_ONLY => 16 };
|
use constant { UNRESTRICTED => 1, NOFW => 2 , COMPLEX => 8, IN_OUT_ONLY => 16 };
|
||||||
#
|
#
|
||||||
@@ -330,6 +320,20 @@ sub initialize( $$ ) {
|
|||||||
$minroot = 0;
|
$minroot = 0;
|
||||||
$loopback_interface = '';
|
$loopback_interface = '';
|
||||||
|
|
||||||
|
%validzoneoptions = ( mss => NUMERIC,
|
||||||
|
nomark => NOTHING,
|
||||||
|
blacklist => NOTHING,
|
||||||
|
dynamic_shared => NOTHING,
|
||||||
|
strict => NOTHING,
|
||||||
|
next => NOTHING,
|
||||||
|
reqid => NUMERIC,
|
||||||
|
spi => NUMERIC,
|
||||||
|
proto => IPSECPROTO,
|
||||||
|
mode => IPSECMODE,
|
||||||
|
"tunnel-src" => NETWORK,
|
||||||
|
"tunnel-dst" => NETWORK,
|
||||||
|
);
|
||||||
|
|
||||||
if ( $family == F_IPV4 ) {
|
if ( $family == F_IPV4 ) {
|
||||||
%validinterfaceoptions = (arp_filter => BINARY_IF_OPTION,
|
%validinterfaceoptions = (arp_filter => BINARY_IF_OPTION,
|
||||||
arp_ignore => ENUM_IF_OPTION,
|
arp_ignore => ENUM_IF_OPTION,
|
||||||
@@ -407,6 +411,8 @@ sub initialize( $$ ) {
|
|||||||
forward => BINARY_IF_OPTION,
|
forward => BINARY_IF_OPTION,
|
||||||
physical => STRING_IF_OPTION + IF_OPTION_HOST,
|
physical => STRING_IF_OPTION + IF_OPTION_HOST,
|
||||||
unmanaged => SIMPLE_IF_OPTION,
|
unmanaged => SIMPLE_IF_OPTION,
|
||||||
|
upnp => SIMPLE_IF_OPTION,
|
||||||
|
upnpclient => SIMPLE_IF_OPTION,
|
||||||
wait => NUMERIC_IF_OPTION + IF_OPTION_WILDOK,
|
wait => NUMERIC_IF_OPTION + IF_OPTION_WILDOK,
|
||||||
);
|
);
|
||||||
%validhostoptions = (
|
%validhostoptions = (
|
||||||
@@ -1313,7 +1319,7 @@ sub process_interface( $$ ) {
|
|||||||
assert(0);
|
assert(0);
|
||||||
}
|
}
|
||||||
} elsif ( $type == STRING_IF_OPTION ) {
|
} elsif ( $type == STRING_IF_OPTION ) {
|
||||||
fatal_error "The '$option' option requires a value" unless defined $value;
|
fatal_error "The '$option' option requires a value" unless supplied $value;
|
||||||
|
|
||||||
if ( $option eq 'physical' ) {
|
if ( $option eq 'physical' ) {
|
||||||
fatal_error "Invalid interface name ($interface)" if $interface =~ /[()\[\]\*\?%]/;
|
fatal_error "Invalid interface name ($interface)" if $interface =~ /[()\[\]\*\?%]/;
|
||||||
|
@@ -43,6 +43,8 @@
|
|||||||
# --inline # Update alternative column specifications
|
# --inline # Update alternative column specifications
|
||||||
# --update # Update configuration to current release
|
# --update # Update configuration to current release
|
||||||
#
|
#
|
||||||
|
# If the <filename> is omitted, then a 'check' operation is performed.
|
||||||
|
#
|
||||||
use strict;
|
use strict;
|
||||||
use FindBin;
|
use FindBin;
|
||||||
use lib "$FindBin::Bin";
|
use lib "$FindBin::Bin";
|
||||||
|
@@ -32,7 +32,7 @@
|
|||||||
# down Stop an optional interface
|
# down Stop an optional interface
|
||||||
# enable Enable an optional interface
|
# enable Enable an optional interface
|
||||||
# help Show command syntax
|
# help Show command syntax
|
||||||
# reenable Disable then nable an optional
|
# reenable Disable then enable an optional
|
||||||
# interface
|
# interface
|
||||||
# refresh Refresh the firewall
|
# refresh Refresh the firewall
|
||||||
# reload Reload the firewall
|
# reload Reload the firewall
|
||||||
|
@@ -33,7 +33,7 @@ FIREWALL=
|
|||||||
# L O G G I N G
|
# L O G G I N G
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
LOG_LEVEL=info
|
LOG_LEVEL="info"
|
||||||
|
|
||||||
BLACKLIST_LOG_LEVEL=
|
BLACKLIST_LOG_LEVEL=
|
||||||
|
|
||||||
@@ -55,19 +55,19 @@ LOGTAGONLY=No
|
|||||||
|
|
||||||
LOGLIMIT="s:1/sec:10"
|
LOGLIMIT="s:1/sec:10"
|
||||||
|
|
||||||
MACLIST_LOG_LEVEL=$LOG_LEVEL
|
MACLIST_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
RELATED_LOG_LEVEL=
|
RELATED_LOG_LEVEL=
|
||||||
|
|
||||||
RPFILTER_LOG_LEVEL=$LOG_LEVEL
|
RPFILTER_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
SFILTER_LOG_LEVEL=$LOG_LEVEL
|
SFILTER_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
SMURF_LOG_LEVEL=$LOG_LEVEL
|
SMURF_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
STARTUP_LOG=/var/log/shorewall-init.log
|
STARTUP_LOG=/var/log/shorewall-init.log
|
||||||
|
|
||||||
TCP_FLAGS_LOG_LEVEL=$LOG_LEVEL
|
TCP_FLAGS_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
UNTRACKED_LOG_LEVEL=
|
UNTRACKED_LOG_LEVEL=
|
||||||
|
|
||||||
@@ -109,11 +109,11 @@ TC=
|
|||||||
# D E F A U L T A C T I O N S / M A C R O S
|
# D E F A U L T A C T I O N S / M A C R O S
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
ACCEPT_DEFAULT=none
|
ACCEPT_DEFAULT="none"
|
||||||
BLACKLIST_DEFAULT="Broadcast(DROP),Multicast(DROP),dropNotSyn:$LOG_LEVEL,dropInvalid:$LOG_LEVEL,DropDNSrep:$LOG_LEVEL"
|
BLACKLIST_DEFAULT="Broadcast(DROP),Multicast(DROP),dropNotSyn:$LOG_LEVEL,dropInvalid:$LOG_LEVEL,DropDNSrep:$LOG_LEVEL"
|
||||||
DROP_DEFAULT="Broadcast(DROP),Multicast(DROP)"
|
DROP_DEFAULT="Broadcast(DROP),Multicast(DROP)"
|
||||||
NFQUEUE_DEFAULT=none
|
NFQUEUE_DEFAULT="none"
|
||||||
QUEUE_DEFAULT=none
|
QUEUE_DEFAULT="none"
|
||||||
REJECT_DEFAULT="Broadcast(DROP),Multicast(DROP)"
|
REJECT_DEFAULT="Broadcast(DROP),Multicast(DROP)"
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@@ -217,6 +217,8 @@ OPTIMIZE=All
|
|||||||
|
|
||||||
OPTIMIZE_ACCOUNTING=No
|
OPTIMIZE_ACCOUNTING=No
|
||||||
|
|
||||||
|
PERL_HASH_SEED=0
|
||||||
|
|
||||||
REJECT_ACTION=
|
REJECT_ACTION=
|
||||||
|
|
||||||
REQUIRE_INTERFACE=Yes
|
REQUIRE_INTERFACE=Yes
|
||||||
|
@@ -120,11 +120,11 @@ TC=
|
|||||||
# D E F A U L T A C T I O N S / M A C R O S
|
# D E F A U L T A C T I O N S / M A C R O S
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
ACCEPT_DEFAULT=none
|
ACCEPT_DEFAULT="none"
|
||||||
BLACKLIST_DEFAULT="Broadcast(DROP),Multicast(DROP),dropNotSyn:$LOG_LEVEL,dropInvalid:$LOG_LEVEL,DropDNSrep:$LOG_LEVEL"
|
BLACKLIST_DEFAULT="Broadcast(DROP),Multicast(DROP),dropNotSyn:$LOG_LEVEL,dropInvalid:$LOG_LEVEL,DropDNSrep:$LOG_LEVEL"
|
||||||
DROP_DEFAULT="Broadcast(DROP),Multicast(DROP)"
|
DROP_DEFAULT="Broadcast(DROP),Multicast(DROP)"
|
||||||
NFQUEUE_DEFAULT=none
|
NFQUEUE_DEFAULT="none"
|
||||||
QUEUE_DEFAULT=none
|
QUEUE_DEFAULT="none"
|
||||||
REJECT_DEFAULT="Broadcast(DROP),Multicast(DROP)"
|
REJECT_DEFAULT="Broadcast(DROP),Multicast(DROP)"
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@@ -228,6 +228,8 @@ OPTIMIZE=All
|
|||||||
|
|
||||||
OPTIMIZE_ACCOUNTING=No
|
OPTIMIZE_ACCOUNTING=No
|
||||||
|
|
||||||
|
PERL_HASH_SEED=0
|
||||||
|
|
||||||
REJECT_ACTION=
|
REJECT_ACTION=
|
||||||
|
|
||||||
REQUIRE_INTERFACE=No
|
REQUIRE_INTERFACE=No
|
||||||
|
@@ -41,7 +41,7 @@ FIREWALL=
|
|||||||
# L O G G I N G
|
# L O G G I N G
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
LOG_LEVEL=info
|
LOG_LEVEL="info"
|
||||||
|
|
||||||
BLACKLIST_LOG_LEVEL=
|
BLACKLIST_LOG_LEVEL=
|
||||||
|
|
||||||
@@ -63,19 +63,19 @@ LOGTAGONLY=No
|
|||||||
|
|
||||||
LOGLIMIT="s:1/sec:10"
|
LOGLIMIT="s:1/sec:10"
|
||||||
|
|
||||||
MACLIST_LOG_LEVEL=$LOG_LEVEL
|
MACLIST_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
RELATED_LOG_LEVEL=
|
RELATED_LOG_LEVEL=
|
||||||
|
|
||||||
RPFILTER_LOG_LEVEL=$LOG_LEVEL
|
RPFILTER_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
SFILTER_LOG_LEVEL=$LOG_LEVEL
|
SFILTER_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
SMURF_LOG_LEVEL=$LOG_LEVEL
|
SMURF_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
STARTUP_LOG=/var/log/shorewall-init.log
|
STARTUP_LOG=/var/log/shorewall-init.log
|
||||||
|
|
||||||
TCP_FLAGS_LOG_LEVEL=$LOG_LEVEL
|
TCP_FLAGS_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
UNTRACKED_LOG_LEVEL=
|
UNTRACKED_LOG_LEVEL=
|
||||||
|
|
||||||
@@ -117,11 +117,11 @@ TC=
|
|||||||
# D E F A U L T A C T I O N S / M A C R O S
|
# D E F A U L T A C T I O N S / M A C R O S
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
ACCEPT_DEFAULT=none
|
ACCEPT_DEFAULT="none"
|
||||||
BLACKLIST_DEFAULT="Broadcast(DROP),Multicast(DROP),dropNotSyn:$LOG_LEVEL,dropInvalid:$LOG_LEVEL,DropDNSrep:$LOG_LEVEL"
|
BLACKLIST_DEFAULT="Broadcast(DROP),Multicast(DROP),dropNotSyn:$LOG_LEVEL,dropInvalid:$LOG_LEVEL,DropDNSrep:$LOG_LEVEL"
|
||||||
DROP_DEFAULT="Broadcast(DROP),Multicast(DROP)"
|
DROP_DEFAULT="Broadcast(DROP),Multicast(DROP)"
|
||||||
NFQUEUE_DEFAULT=none
|
NFQUEUE_DEFAULT="none"
|
||||||
QUEUE_DEFAULT=none
|
QUEUE_DEFAULT="none"
|
||||||
REJECT_DEFAULT="Broadcast(DROP),Multicast(DROP)"
|
REJECT_DEFAULT="Broadcast(DROP),Multicast(DROP)"
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@@ -225,6 +225,8 @@ OPTIMIZE=All
|
|||||||
|
|
||||||
OPTIMIZE_ACCOUNTING=No
|
OPTIMIZE_ACCOUNTING=No
|
||||||
|
|
||||||
|
PERL_HASH_SEED=0
|
||||||
|
|
||||||
REJECT_ACTION=
|
REJECT_ACTION=
|
||||||
|
|
||||||
REQUIRE_INTERFACE=No
|
REQUIRE_INTERFACE=No
|
||||||
|
@@ -44,7 +44,7 @@ FIREWALL=
|
|||||||
# L O G G I N G
|
# L O G G I N G
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
LOG_LEVEL=info
|
LOG_LEVEL="info"
|
||||||
|
|
||||||
BLACKLIST_LOG_LEVEL=
|
BLACKLIST_LOG_LEVEL=
|
||||||
|
|
||||||
@@ -66,19 +66,19 @@ LOGTAGONLY=No
|
|||||||
|
|
||||||
LOGLIMIT="s:1/sec:10"
|
LOGLIMIT="s:1/sec:10"
|
||||||
|
|
||||||
MACLIST_LOG_LEVEL=$LOG_LEVEL
|
MACLIST_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
RELATED_LOG_LEVEL=
|
RELATED_LOG_LEVEL=
|
||||||
|
|
||||||
RPFILTER_LOG_LEVEL=$LOG_LEVEL
|
RPFILTER_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
SFILTER_LOG_LEVEL=$LOG_LEVEL
|
SFILTER_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
SMURF_LOG_LEVEL=$LOG_LEVEL
|
SMURF_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
STARTUP_LOG=/var/log/shorewall-init.log
|
STARTUP_LOG=/var/log/shorewall-init.log
|
||||||
|
|
||||||
TCP_FLAGS_LOG_LEVEL=$LOG_LEVEL
|
TCP_FLAGS_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
UNTRACKED_LOG_LEVEL=
|
UNTRACKED_LOG_LEVEL=
|
||||||
|
|
||||||
@@ -120,11 +120,11 @@ TC=
|
|||||||
# D E F A U L T A C T I O N S / M A C R O S
|
# D E F A U L T A C T I O N S / M A C R O S
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
ACCEPT_DEFAULT=none
|
ACCEPT_DEFAULT="none"
|
||||||
BLACKLIST_DEFAULT="Broadcast(DROP),Multicast(DROP),dropNotSyn:$LOG_LEVEL,dropInvalid:$LOG_LEVEL,DropDNSrep:$LOG_LEVEL"
|
BLACKLIST_DEFAULT="Broadcast(DROP),Multicast(DROP),dropNotSyn:$LOG_LEVEL,dropInvalid:$LOG_LEVEL,DropDNSrep:$LOG_LEVEL"
|
||||||
DROP_DEFAULT="Broadcast(DROP),Multicast(DROP)"
|
DROP_DEFAULT="Broadcast(DROP),Multicast(DROP)"
|
||||||
NFQUEUE_DEFAULT=none
|
NFQUEUE_DEFAULT="none"
|
||||||
QUEUE_DEFAULT=none
|
QUEUE_DEFAULT="none"
|
||||||
REJECT_DEFAULT="Broadcast(DROP),Multicast(DROP)"
|
REJECT_DEFAULT="Broadcast(DROP),Multicast(DROP)"
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@@ -228,6 +228,8 @@ OPTIMIZE=All
|
|||||||
|
|
||||||
OPTIMIZE_ACCOUNTING=No
|
OPTIMIZE_ACCOUNTING=No
|
||||||
|
|
||||||
|
PERL_HASH_SEED=0
|
||||||
|
|
||||||
REJECT_ACTION=
|
REJECT_ACTION=
|
||||||
|
|
||||||
REQUIRE_INTERFACE=No
|
REQUIRE_INTERFACE=No
|
||||||
|
@@ -20,4 +20,4 @@
|
|||||||
MASQUERADE 10.0.0.0/8,\
|
MASQUERADE 10.0.0.0/8,\
|
||||||
169.254.0.0/16,\
|
169.254.0.0/16,\
|
||||||
172.16.0.0/12,\
|
172.16.0.0/12,\
|
||||||
92.168.0.0/16 eth0
|
192.168.0.0/16 eth0
|
||||||
|
@@ -8,10 +8,12 @@
|
|||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
#ACTION
|
#ACTION
|
||||||
|
A_AllowICMPs inline # Audited version of AllowICMPs
|
||||||
A_Drop # Audited Default Action for DROP policy
|
A_Drop # Audited Default Action for DROP policy
|
||||||
A_REJECT noinline,logjump # Audits then rejects a connection request
|
A_REJECT noinline,logjump # Audits then rejects a connection request
|
||||||
A_REJECT! inline # Audits then rejects a connection request
|
A_REJECT! inline # Audits then rejects a connection request
|
||||||
A_Reject # Audited Default action for REJECT policy
|
A_Reject # Audited Default action for REJECT policy
|
||||||
|
AllowICMPs inline # Allow Required ICMP packets
|
||||||
allowBcast inline # Silently Allow Broadcast
|
allowBcast inline # Silently Allow Broadcast
|
||||||
allowinUPnP inline # Allow UPnP inbound (to firewall) traffic
|
allowinUPnP inline # Allow UPnP inbound (to firewall) traffic
|
||||||
allowInvalid inline # Accepts packets in the INVALID conntrack state
|
allowInvalid inline # Accepts packets in the INVALID conntrack state
|
||||||
|
@@ -33,7 +33,7 @@ FIREWALL=
|
|||||||
# L O G G I N G
|
# L O G G I N G
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
LOG_LEVEL=info
|
LOG_LEVEL="info"
|
||||||
|
|
||||||
BLACKLIST_LOG_LEVEL=
|
BLACKLIST_LOG_LEVEL=
|
||||||
|
|
||||||
@@ -55,19 +55,19 @@ LOGTAGONLY=No
|
|||||||
|
|
||||||
LOGLIMIT="s:1/sec:10"
|
LOGLIMIT="s:1/sec:10"
|
||||||
|
|
||||||
MACLIST_LOG_LEVEL=$LOG_LEVEL
|
MACLIST_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
RELATED_LOG_LEVEL=
|
RELATED_LOG_LEVEL=
|
||||||
|
|
||||||
RPFILTER_LOG_LEVEL=$LOG_LEVEL
|
RPFILTER_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
SFILTER_LOG_LEVEL=$LOG_LEVEL
|
SFILTER_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
SMURF_LOG_LEVEL=$LOG_LEVEL
|
SMURF_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
STARTUP_LOG=/var/log/shorewall-init.log
|
STARTUP_LOG=/var/log/shorewall-init.log
|
||||||
|
|
||||||
TCP_FLAGS_LOG_LEVEL=$LOG_LEVEL
|
TCP_FLAGS_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
UNTRACKED_LOG_LEVEL=
|
UNTRACKED_LOG_LEVEL=
|
||||||
|
|
||||||
@@ -109,11 +109,11 @@ TC=
|
|||||||
# D E F A U L T A C T I O N S / M A C R O S
|
# D E F A U L T A C T I O N S / M A C R O S
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
ACCEPT_DEFAULT=none
|
ACCEPT_DEFAULT="none"
|
||||||
BLACKLIST_DEFAULT="Broadcast(DROP),Multicast(DROP),dropNotSyn:$LOG_LEVEL,dropInvalid:$LOG_LEVEL,DropDNSrep:$LOG_LEVEL"
|
BLACKLIST_DEFAULT="Broadcast(DROP),Multicast(DROP),dropNotSyn:$LOG_LEVEL,dropInvalid:$LOG_LEVEL,DropDNSrep:$LOG_LEVEL"
|
||||||
DROP_DEFAULT="Broadcast(DROP),Multicast(DROP)"
|
DROP_DEFAULT="Broadcast(DROP),Multicast(DROP)"
|
||||||
NFQUEUE_DEFAULT=none
|
NFQUEUE_DEFAULT="none"
|
||||||
QUEUE_DEFAULT=none
|
QUEUE_DEFAULT="none"
|
||||||
REJECT_DEFAULT="Broadcast(DROP),Multicast(DROP)"
|
REJECT_DEFAULT="Broadcast(DROP),Multicast(DROP)"
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@@ -217,6 +217,8 @@ OPTIMIZE=All
|
|||||||
|
|
||||||
OPTIMIZE_ACCOUNTING=No
|
OPTIMIZE_ACCOUNTING=No
|
||||||
|
|
||||||
|
PERL_HASH_SEED=0
|
||||||
|
|
||||||
REJECT_ACTION=
|
REJECT_ACTION=
|
||||||
|
|
||||||
REQUIRE_INTERFACE=No
|
REQUIRE_INTERFACE=No
|
||||||
|
@@ -442,6 +442,14 @@ if [ -z "$first_install" ]; then
|
|||||||
delete_file ${DESTDIR}${SHAREDIR}/shorewall/action.A_REJECT
|
delete_file ${DESTDIR}${SHAREDIR}/shorewall/action.A_REJECT
|
||||||
delete_file ${DESTDIR}${SHAREDIR}/shorewall/action.Drop
|
delete_file ${DESTDIR}${SHAREDIR}/shorewall/action.Drop
|
||||||
delete_file ${DESTDIR}${SHAREDIR}/shorewall/action.Reject
|
delete_file ${DESTDIR}${SHAREDIR}/shorewall/action.Reject
|
||||||
|
delete_file ${DESTDIR}${SHAREDIR}/shorewall/action.A_Drop
|
||||||
|
delete_file ${DESTDIR}${SHAREDIR}/shorewall/action.A_Reject
|
||||||
|
delete_file ${DESTDIR}${SHAREDIR}/shorewall/action.A_AllowICMPs
|
||||||
|
else
|
||||||
|
delete_file ${DESTDIR}${SHAREDIR}/shorewall6/action.A_AllowICMPs
|
||||||
|
delete_file ${DESTDIR}${SHAREDIR}/shorewall6/action.AllowICMPs
|
||||||
|
delete_file ${DESTDIR}${SHAREDIR}/shorewall6/action.Broadcast
|
||||||
|
delete_file ${DESTDIR}${SHAREDIR}/shorewall6/action.Multicast
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@@ -341,6 +341,18 @@ get_config() {
|
|||||||
setup_dbl
|
setup_dbl
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ -z "$PERL_HASH_SEED" ]; then
|
||||||
|
PERL_HASH_SEED=0
|
||||||
|
else
|
||||||
|
case $PERL_HASH_SEED in
|
||||||
|
[0-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]|random)
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
fatal_error "Invalid setting ($PERL_HASH_SEED) for PERL_HASH_SEED"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
lib=$(find_file lib.cli-user)
|
lib=$(find_file lib.cli-user)
|
||||||
|
|
||||||
[ -f $lib ] && . $lib
|
[ -f $lib ] && . $lib
|
||||||
@@ -484,8 +496,17 @@ compiler() {
|
|||||||
#
|
#
|
||||||
[ "$g_debugging" != trace -a -z "$g_preview" ] || [ -n "$g_debug" ] && g_pager=
|
[ "$g_debugging" != trace -a -z "$g_preview" ] || [ -n "$g_debug" ] && g_pager=
|
||||||
|
|
||||||
PERL_HASH_SEED=0
|
case $PERL_HASH_SEED in
|
||||||
export PERL_HASH_SEED
|
random)
|
||||||
|
unset PERL_HASH_SEED
|
||||||
|
unset PERL_PERTURB_KEYS
|
||||||
|
;;
|
||||||
|
*)
|
||||||
|
export PERL_HASH_SEED
|
||||||
|
PERL_PERTURB_KEYS=0
|
||||||
|
export PERL_PERTURB_KEYS
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
if [ ${PERLLIBDIR} = ${LIBEXECDIR}/shorewall ]; then
|
if [ ${PERLLIBDIR} = ${LIBEXECDIR}/shorewall ]; then
|
||||||
eval $PERL $debugflags $pc $options $@ $g_pager
|
eval $PERL $debugflags $pc $options $@ $g_pager
|
||||||
@@ -513,28 +534,6 @@ start_command() {
|
|||||||
local rc
|
local rc
|
||||||
rc=0
|
rc=0
|
||||||
|
|
||||||
do_it() {
|
|
||||||
if [ -n "$AUTOMAKE" ]; then
|
|
||||||
[ -n "$nolock" ] || mutex_on
|
|
||||||
run_it ${VARDIR}/firewall $g_debugging start
|
|
||||||
rc=$?
|
|
||||||
[ -n "$nolock" ] || mutex_off
|
|
||||||
else
|
|
||||||
g_file="${VARDIR}/.start"
|
|
||||||
if compiler $g_debugging $nolock compile "$g_file"; then
|
|
||||||
[ -n "$nolock" ] || mutex_on
|
|
||||||
run_it ${VARDIR}/.start $g_debugging start
|
|
||||||
rc=$?
|
|
||||||
[ -n "$nolock" ] || mutex_off
|
|
||||||
else
|
|
||||||
rc=$?
|
|
||||||
mylogger kern.err "ERROR:$g_product start failed"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
exit $rc
|
|
||||||
}
|
|
||||||
|
|
||||||
if product_is_started; then
|
if product_is_started; then
|
||||||
error_message "Shorewall is already running"
|
error_message "Shorewall is already running"
|
||||||
exit 0
|
exit 0
|
||||||
@@ -626,7 +625,25 @@ start_command() {
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
do_it
|
if [ -n "$AUTOMAKE" ]; then
|
||||||
|
[ -n "$nolock" ] || mutex_on
|
||||||
|
run_it ${VARDIR}/firewall $g_debugging start
|
||||||
|
rc=$?
|
||||||
|
[ -n "$nolock" ] || mutex_off
|
||||||
|
else
|
||||||
|
g_file="${VARDIR}/.start"
|
||||||
|
if compiler $g_debugging $nolock compile "$g_file"; then
|
||||||
|
[ -n "$nolock" ] || mutex_on
|
||||||
|
run_it ${VARDIR}/.start $g_debugging start
|
||||||
|
rc=$?
|
||||||
|
[ -n "$nolock" ] || mutex_off
|
||||||
|
else
|
||||||
|
rc=$?
|
||||||
|
mylogger kern.err "ERROR:$g_product start failed"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit $rc
|
||||||
}
|
}
|
||||||
|
|
||||||
#
|
#
|
||||||
|
@@ -864,7 +864,7 @@ Normal-Service => 0x00</programlisting>
|
|||||||
on the firewall and whose source IP address matches one of the
|
on the firewall and whose source IP address matches one of the
|
||||||
listed addresses and does not match any address listed in the
|
listed addresses and does not match any address listed in the
|
||||||
<replaceable>exclusion</replaceable>. May not be used with a
|
<replaceable>exclusion</replaceable>. May not be used with a
|
||||||
chain qualifier (:P, :F, etc.) in the ACTION column. </para>
|
chain qualifier (:P, :F, etc.) in the ACTION column.</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
@@ -1028,15 +1028,16 @@ Normal-Service => 0x00</programlisting>
|
|||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><emphasis role="bold">PROTO</emphasis> - {<emphasis
|
<term><emphasis role="bold">PROTO</emphasis> - {<emphasis
|
||||||
role="bold">-</emphasis>|<emphasis
|
role="bold">-</emphasis>|<emphasis
|
||||||
role="bold">{tcp:syn</emphasis>|<emphasis
|
role="bold">{tcp:[!]syn</emphasis>|<emphasis
|
||||||
role="bold">ipp2p</emphasis>|<emphasis
|
role="bold">ipp2p</emphasis>|<emphasis
|
||||||
role="bold">ipp2p:udp</emphasis>|<emphasis
|
role="bold">ipp2p:udp</emphasis>|<emphasis
|
||||||
role="bold">ipp2p:all</emphasis>|<emphasis>protocol-number</emphasis>|<emphasis>protocol-name</emphasis>|<emphasis
|
role="bold">ipp2p:all</emphasis>|<emphasis>protocol-number</emphasis>|<emphasis>protocol-name</emphasis>|<emphasis
|
||||||
role="bold">all}[,...]}</emphasis></term>
|
role="bold">all}[,...]}</emphasis></term>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Protocol - <emphasis role="bold">ipp2p</emphasis> requires
|
<para>See <ulink
|
||||||
ipp2p match support in your kernel and iptables.</para>
|
url="shorewall-rules.html">shorewall-rules(5)</ulink> for
|
||||||
|
details.</para>
|
||||||
|
|
||||||
<para>Beginning with Shorewall 4.5.12, this column can accept a
|
<para>Beginning with Shorewall 4.5.12, this column can accept a
|
||||||
comma-separated list of protocols.</para>
|
comma-separated list of protocols.</para>
|
||||||
|
@@ -594,7 +594,7 @@
|
|||||||
<para>Added in Shorewall 4.5.9.3. Queues matching packets to a
|
<para>Added in Shorewall 4.5.9.3. Queues matching packets to a
|
||||||
back end logging daemon via a netlink socket then continues to
|
back end logging daemon via a netlink socket then continues to
|
||||||
the next rule. See <ulink
|
the next rule. 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>.</para>
|
||||||
|
|
||||||
<para>The <replaceable>nflog-parameters</replaceable> are a
|
<para>The <replaceable>nflog-parameters</replaceable> are a
|
||||||
comma-separated list of up to 3 numbers:</para>
|
comma-separated list of up to 3 numbers:</para>
|
||||||
@@ -729,7 +729,9 @@
|
|||||||
<member><option>icmp-admin-prohibited</option></member>
|
<member><option>icmp-admin-prohibited</option></member>
|
||||||
|
|
||||||
<member><option>icmp-tcp-reset</option> (the PROTO column
|
<member><option>icmp-tcp-reset</option> (the PROTO column
|
||||||
must specify TCP)</member>
|
must specify TCP). Beginning with Shorewall 5.1.3, this
|
||||||
|
option may also be specified as
|
||||||
|
<option>tcp-reset</option>.</member>
|
||||||
</simplelist>
|
</simplelist>
|
||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
@@ -845,7 +847,7 @@
|
|||||||
<para>Added in Shorewall 4.5.10. Queues matching packets to a
|
<para>Added in Shorewall 4.5.10. Queues matching packets to a
|
||||||
back end logging daemon via a netlink socket then continues to
|
back end logging daemon via a netlink socket then continues to
|
||||||
the next rule. See <ulink
|
the next rule. 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>.</para>
|
||||||
|
|
||||||
<para>Similar to<emphasis role="bold">
|
<para>Similar to<emphasis role="bold">
|
||||||
LOG:ULOG</emphasis>[(<replaceable>ulog-parameters</replaceable>)],
|
LOG:ULOG</emphasis>[(<replaceable>ulog-parameters</replaceable>)],
|
||||||
@@ -1592,7 +1594,7 @@
|
|||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><emphasis role="bold">PROTO</emphasis>- {<emphasis
|
<term><emphasis role="bold">PROTO</emphasis>- {<emphasis
|
||||||
role="bold">-</emphasis>|<emphasis
|
role="bold">-</emphasis>|<emphasis
|
||||||
role="bold">tcp:syn</emphasis>|<emphasis
|
role="bold">tcp:[!]syn</emphasis>|<emphasis
|
||||||
role="bold">ipp2p</emphasis>|<emphasis
|
role="bold">ipp2p</emphasis>|<emphasis
|
||||||
role="bold">ipp2p:udp</emphasis>|<emphasis
|
role="bold">ipp2p:udp</emphasis>|<emphasis
|
||||||
role="bold">ipp2p:all</emphasis>|<emphasis>protocol-number</emphasis>|<emphasis>protocol-name</emphasis>|<emphasis
|
role="bold">ipp2p:all</emphasis>|<emphasis>protocol-number</emphasis>|<emphasis>protocol-name</emphasis>|<emphasis
|
||||||
@@ -1603,7 +1605,10 @@
|
|||||||
requires ipp2p match support in your kernel and iptables. <emphasis
|
requires ipp2p match support in your kernel and iptables. <emphasis
|
||||||
role="bold">tcp:syn</emphasis> implies <emphasis
|
role="bold">tcp:syn</emphasis> implies <emphasis
|
||||||
role="bold">tcp</emphasis> plus the SYN flag must be set and the
|
role="bold">tcp</emphasis> plus the SYN flag must be set and the
|
||||||
RST,ACK and FIN flags must be reset.</para>
|
RST, ACK and FIN flags must be reset. Beginning with Shorewall
|
||||||
|
5.1.3, you may also specify <emphasis
|
||||||
|
role="bold">tcp:!syn</emphasis>, which matches if SYN is not set or
|
||||||
|
if RST, ACK or FIN is set.</para>
|
||||||
|
|
||||||
<para>Beginning with Shorewall 4.4.19, this column can contain a
|
<para>Beginning with Shorewall 4.4.19, this column can contain a
|
||||||
comma-separated list of protocol-numbers and/or protocol
|
comma-separated list of protocol-numbers and/or protocol
|
||||||
|
@@ -229,8 +229,9 @@
|
|||||||
role="bold">all}[,...]</emphasis></term>
|
role="bold">all}[,...]</emphasis></term>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Protocol - <emphasis role="bold">ipp2p</emphasis> requires
|
<para> See <ulink
|
||||||
ipp2p match support in your kernel and iptables.</para>
|
url="shorewall-rules.html">shorewall-rules(5)</ulink> for
|
||||||
|
details.</para>
|
||||||
|
|
||||||
<para>Beginning with Shorewall 4.5.12, this column can accept a
|
<para>Beginning with Shorewall 4.5.12, this column can accept a
|
||||||
comma-separated list of protocols.</para>
|
comma-separated list of protocols.</para>
|
||||||
|
@@ -256,8 +256,9 @@
|
|||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>If you wish to restrict this entry to a particular protocol
|
<para>If you wish to restrict this entry to a particular protocol
|
||||||
then enter the protocol name (from protocols(5)) or number
|
then enter the protocol name (from protocols(5)) or number here. See
|
||||||
here.</para>
|
<ulink url="shorewall-rules.html">shorewall-rules(5)</ulink> for
|
||||||
|
details.</para>
|
||||||
|
|
||||||
<para>Beginning with Shorewall 4.5.12, this column can accept a
|
<para>Beginning with Shorewall 4.5.12, this column can accept a
|
||||||
comma-separated list of protocols.</para>
|
comma-separated list of protocols.</para>
|
||||||
|
@@ -2153,6 +2153,21 @@ LOG:info:,bar net fw</programlisting>
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><emphasis role="bold">PERL_HASH_SEED=</emphasis><emphasis
|
||||||
|
role="bold"><replaceable>seed</replaceable><emphasis
|
||||||
|
role="bold">|random</emphasis></emphasis></term>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>Added in Shorewall 5.1.4. Sets the Perl hash
|
||||||
|
<replaceable>seed</replaceable> (an integer in the range 0-99999)
|
||||||
|
when running the Shorewall rules compiler. If not specified, the
|
||||||
|
value 0 is assumed. If <option>random</option> is specified, a
|
||||||
|
random seed will be chosed by Perl. See perlsec(1) for additional
|
||||||
|
information.</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><emphasis
|
<term><emphasis
|
||||||
role="bold">PROVIDER_BITS</emphasis>=[<replaceable>number</replaceable>]</term>
|
role="bold">PROVIDER_BITS</emphasis>=[<replaceable>number</replaceable>]</term>
|
||||||
|
@@ -16,7 +16,7 @@ RemainAfterExit=yes
|
|||||||
EnvironmentFile=-/etc/default/shorewall
|
EnvironmentFile=-/etc/default/shorewall
|
||||||
StandardOutput=syslog
|
StandardOutput=syslog
|
||||||
ExecStart=/sbin/shorewall $OPTIONS start $STARTOPTIONS
|
ExecStart=/sbin/shorewall $OPTIONS start $STARTOPTIONS
|
||||||
ExecStop=/sbin/shorewall $OPTIONS stop
|
ExecStop=/sbin/shorewall $OPTIONS clear
|
||||||
ExecReload=/sbin/shorewall $OPTIONS reload $RELOADOPTIONS
|
ExecReload=/sbin/shorewall $OPTIONS reload $RELOADOPTIONS
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
@@ -15,7 +15,7 @@ RemainAfterExit=yes
|
|||||||
EnvironmentFile=-/etc/default/shorewall6-lite
|
EnvironmentFile=-/etc/default/shorewall6-lite
|
||||||
StandardOutput=syslog
|
StandardOutput=syslog
|
||||||
ExecStart=/sbin/shorewall6-lite $OPTIONS start
|
ExecStart=/sbin/shorewall6-lite $OPTIONS start
|
||||||
ExecStop=/sbin/shorewall6-lite $OPTIONS stop
|
ExecStop=/sbin/shorewall6-lite $OPTIONS clear
|
||||||
ExecReload=/sbin/shorewall6-lite $OPTIONS reload
|
ExecReload=/sbin/shorewall6-lite $OPTIONS reload
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
@@ -1,38 +0,0 @@
|
|||||||
#
|
|
||||||
# Shorewall6 -- /usr/share/shorewall6/action.A_AllowICMPs
|
|
||||||
#
|
|
||||||
# This action A_ACCEPTs needed ICMP types
|
|
||||||
#
|
|
||||||
###############################################################################
|
|
||||||
#ACTION SOURCE DEST PROTO DPORT
|
|
||||||
|
|
||||||
?comment Needed ICMP types (RFC4890)
|
|
||||||
|
|
||||||
A_ACCEPT - - ipv6-icmp destination-unreachable
|
|
||||||
A_ACCEPT - - ipv6-icmp packet-too-big
|
|
||||||
A_ACCEPT - - ipv6-icmp time-exceeded
|
|
||||||
A_ACCEPT - - ipv6-icmp parameter-problem
|
|
||||||
|
|
||||||
# The following should have a ttl of 255 and must be allowed to transit a bridge
|
|
||||||
A_ACCEPT - - ipv6-icmp router-solicitation
|
|
||||||
A_ACCEPT - - ipv6-icmp router-advertisement
|
|
||||||
A_ACCEPT - - ipv6-icmp neighbour-solicitation
|
|
||||||
A_ACCEPT - - ipv6-icmp neighbour-advertisement
|
|
||||||
A_ACCEPT - - ipv6-icmp 137 # Redirect
|
|
||||||
A_ACCEPT - - ipv6-icmp 141 # Inverse neighbour discovery solicitation
|
|
||||||
A_ACCEPT - - ipv6-icmp 142 # Inverse neighbour discovery advertisement
|
|
||||||
|
|
||||||
# The following should have a link local source address and must be allowed to transit a bridge
|
|
||||||
A_ACCEPT fe80::/10 - ipv6-icmp 130 # Listener query
|
|
||||||
A_ACCEPT fe80::/10 - ipv6-icmp 131 # Listener report
|
|
||||||
A_ACCEPT fe80::/10 - ipv6-icmp 132 # Listener done
|
|
||||||
A_ACCEPT fe80::/10 - ipv6-icmp 143 # Listener report v2
|
|
||||||
|
|
||||||
# The following should be received with a ttl of 255 and must be allowed to transit a bridge
|
|
||||||
A_ACCEPT - - ipv6-icmp 148 # Certificate path solicitation
|
|
||||||
A_ACCEPT - - ipv6-icmp 149 # Certificate path advertisement
|
|
||||||
|
|
||||||
# The following should have a link local source address and a ttl of 1 and must be allowed to transit abridge
|
|
||||||
A_ACCEPT fe80::/10 - ipv6-icmp 151 # Multicast router advertisement
|
|
||||||
A_ACCEPT fe80::/10 - ipv6-icmp 152 # Multicast router solicitation
|
|
||||||
A_ACCEPT fe80::/10 - ipv6-icmp 153 # Multicast router termination
|
|
@@ -1,40 +0,0 @@
|
|||||||
#
|
|
||||||
# Shorewall6 -- /usr/share/shorewall6/action.AllowICMPs
|
|
||||||
#
|
|
||||||
# This action ACCEPTs needed ICMP types
|
|
||||||
#
|
|
||||||
###############################################################################
|
|
||||||
#ACTION SOURCE DEST PROTO DPORT
|
|
||||||
|
|
||||||
DEFAULTS ACCEPT
|
|
||||||
|
|
||||||
?COMMENT Needed ICMP types (RFC4890)
|
|
||||||
|
|
||||||
$1 - - ipv6-icmp destination-unreachable
|
|
||||||
$1 - - ipv6-icmp packet-too-big
|
|
||||||
$1 - - ipv6-icmp time-exceeded
|
|
||||||
$1 - - ipv6-icmp parameter-problem
|
|
||||||
|
|
||||||
# The following should have a ttl of 255 and must be allowed to transit a bridge
|
|
||||||
$1 - - ipv6-icmp router-solicitation
|
|
||||||
$1 - - ipv6-icmp router-advertisement
|
|
||||||
$1 - - ipv6-icmp neighbour-solicitation
|
|
||||||
$1 - - ipv6-icmp neighbour-advertisement
|
|
||||||
$1 - - ipv6-icmp 137 # Redirect
|
|
||||||
$1 - - ipv6-icmp 141 # Inverse neighbour discovery solicitation
|
|
||||||
$1 - - ipv6-icmp 142 # Inverse neighbour discovery advertisement
|
|
||||||
|
|
||||||
# The following should have a link local source address and must be allowed to transit a bridge
|
|
||||||
$1 fe80::/10 - ipv6-icmp 130 # Listener query
|
|
||||||
$1 fe80::/10 - ipv6-icmp 131 # Listener report
|
|
||||||
$1 fe80::/10 - ipv6-icmp 132 # Listener done
|
|
||||||
$1 fe80::/10 - ipv6-icmp 143 # Listener report v2
|
|
||||||
|
|
||||||
# The following should be received with a ttl of 255 and must be allowed to transit a bridge
|
|
||||||
$1 - - ipv6-icmp 148 # Certificate path solicitation
|
|
||||||
$1 - - ipv6-icmp 149 # Certificate path advertisement
|
|
||||||
|
|
||||||
# The following should have a link local source address and a ttl of 1 and must be allowed to transit abridge
|
|
||||||
$1 fe80::/10 - ipv6-icmp 151 # Multicast router advertisement
|
|
||||||
$1 fe80::/10 - ipv6-icmp 152 # Multicast router solicitation
|
|
||||||
$1 fe80::/10 - ipv6-icmp 153 # Multicast router termination
|
|
@@ -1,65 +0,0 @@
|
|||||||
#
|
|
||||||
# Shorewall6 -- /usr/share/shorewall6/action.Broadcast
|
|
||||||
#
|
|
||||||
# Multicast/Anycast IPv6 Action
|
|
||||||
#
|
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
|
||||||
#
|
|
||||||
# (c) 2011-2016 Tom Eastep (teastep@shorewall.net)
|
|
||||||
#
|
|
||||||
# Complete documentation is available at http://shorewall.net
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
|
||||||
# as published by the Free Software Foundation.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
#
|
|
||||||
# Broadcast[([<action>|-[,{audit|-}])]
|
|
||||||
#
|
|
||||||
# Default action is DROP
|
|
||||||
#
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
DEFAULTS DROP,-
|
|
||||||
|
|
||||||
?begin perl;
|
|
||||||
|
|
||||||
use Shorewall::IPAddrs;
|
|
||||||
use Shorewall::Config;
|
|
||||||
use Shorewall::Chains;
|
|
||||||
|
|
||||||
my $chainref = get_action_chain;
|
|
||||||
my ( $action, $audit ) = get_action_params( 2 );
|
|
||||||
my ( $level, $tag ) = get_action_logging;
|
|
||||||
my $target = require_audit ( $action , $audit );
|
|
||||||
|
|
||||||
fatal_error "Invalid parameter to action Broadcast" if supplied $audit && $audit ne 'audit';
|
|
||||||
|
|
||||||
if ( have_capability( 'ADDRTYPE' ) ) {
|
|
||||||
if ( $level ne '' ) {
|
|
||||||
log_rule_limit $level, $chainref, 'Broadcast' , $action, '', $tag, 'add', ' -m addrtype --dst-type BROADCAST ';
|
|
||||||
log_rule_limit $level, $chainref, 'Broadcast' , $action, '', $tag, 'add', ' -m addrtype --dst-type ANYCAST ';
|
|
||||||
}
|
|
||||||
|
|
||||||
add_jump $chainref, $target, 0, '-m addrtype --dst-type BROADCAST ';
|
|
||||||
add_jump $chainref, $target, 0, '-m addrtype --dst-type ANYCAST ';
|
|
||||||
} else {
|
|
||||||
add_commands $chainref, 'for address in $ALL_ACASTS; do';
|
|
||||||
incr_cmd_level $chainref;
|
|
||||||
log_rule_limit $level, $chainref, 'Broadcast' , $action, '', $tag, 'add', ' -d $address ' if $level ne '';
|
|
||||||
add_jump $chainref, $target, 0, "-d \$address ";
|
|
||||||
decr_cmd_level $chainref;
|
|
||||||
add_commands $chainref, 'done';
|
|
||||||
}
|
|
||||||
|
|
||||||
1;
|
|
||||||
|
|
||||||
?end perl;
|
|
@@ -1,59 +0,0 @@
|
|||||||
#
|
|
||||||
# Shorewall6 -- /usr/share/shorewall6/action.Multicast
|
|
||||||
#
|
|
||||||
# Multicast/Anycast IPv6 Action
|
|
||||||
#
|
|
||||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
|
||||||
#
|
|
||||||
# (c) 2011-2016 Tom Eastep (teastep@shorewall.net)
|
|
||||||
#
|
|
||||||
# Complete documentation is available at http://shorewall.net
|
|
||||||
#
|
|
||||||
# This program is free software; you can redistribute it and/or modify
|
|
||||||
# it under the terms of Version 2 of the GNU General Public License
|
|
||||||
# as published by the Free Software Foundation.
|
|
||||||
#
|
|
||||||
# This program is distributed in the hope that it will be useful,
|
|
||||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
# GNU General Public License for more details.
|
|
||||||
#
|
|
||||||
# You should have received a copy of the GNU General Public License
|
|
||||||
# along with this program; if not, write to the Free Software
|
|
||||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
|
||||||
#
|
|
||||||
# Multicast[([<action>|-[,{audit|-}])]
|
|
||||||
#
|
|
||||||
# Default action is DROP
|
|
||||||
#
|
|
||||||
###############################################################################
|
|
||||||
|
|
||||||
DEFAULTS DROP,-
|
|
||||||
|
|
||||||
?begin perl;
|
|
||||||
|
|
||||||
use Shorewall::IPAddrs;
|
|
||||||
use Shorewall::Config;
|
|
||||||
use Shorewall::Chains;
|
|
||||||
|
|
||||||
my $chainref = get_action_chain;
|
|
||||||
my ( $action, $audit ) = get_action_params( 2 );
|
|
||||||
my ( $level, $tag ) = get_action_logging;
|
|
||||||
my $target = require_audit ( $action , $audit );
|
|
||||||
|
|
||||||
fatal_error "Invalid parameter to action Broadcast" if supplied $audit && $audit ne 'audit';
|
|
||||||
|
|
||||||
if ( have_capability( 'ADDRTYPE' ) ) {
|
|
||||||
if ( $level ne '' ) {
|
|
||||||
log_rule_limit $level, $chainref, 'Multicast' , $action, '', $tag, 'add', ' -m addrtype --dst-type MULTICAST ';
|
|
||||||
}
|
|
||||||
|
|
||||||
add_jump $chainref, $target, 0, '-m addrtype --dst-type MULTICAST ';
|
|
||||||
} else {
|
|
||||||
log_rule_limit( $level, $chainref, 'Broadcast' , $action, '', $tag, 'add', join( ' ', '-d', IPv6_MULTICAST . ' ' ) ) if $level ne '';
|
|
||||||
add_jump $chainref, $target, 0, join( ' ', '-d', IPv6_MULTICAST . ' ' );
|
|
||||||
}
|
|
||||||
|
|
||||||
1;
|
|
||||||
|
|
||||||
?end perl;
|
|
@@ -34,7 +34,7 @@ FIREWALL=
|
|||||||
# L O G G I N G
|
# L O G G I N G
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
LOG_LEVEL=info
|
LOG_LEVEL="info"
|
||||||
|
|
||||||
BLACKLIST_LOG_LEVEL=
|
BLACKLIST_LOG_LEVEL=
|
||||||
|
|
||||||
@@ -54,19 +54,19 @@ LOGLIMIT="s:1/sec:10"
|
|||||||
|
|
||||||
LOGTAGONLY=No
|
LOGTAGONLY=No
|
||||||
|
|
||||||
MACLIST_LOG_LEVEL=info
|
MACLIST_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
RELATED_LOG_LEVEL=
|
RELATED_LOG_LEVEL=
|
||||||
|
|
||||||
RPFILTER_LOG_LEVEL=info
|
RPFILTER_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
SFILTER_LOG_LEVEL=info
|
SFILTER_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
SMURF_LOG_LEVEL=info
|
SMURF_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
STARTUP_LOG=/var/log/shorewall6-init.log
|
STARTUP_LOG=/var/log/shorewall6-init.log
|
||||||
|
|
||||||
TCP_FLAGS_LOG_LEVEL=info
|
TCP_FLAGS_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
UNTRACKED_LOG_LEVEL=
|
UNTRACKED_LOG_LEVEL=
|
||||||
|
|
||||||
@@ -74,7 +74,7 @@ UNTRACKED_LOG_LEVEL=
|
|||||||
# L O C A T I O N O F F I L E S A N D D I R E C T O R I E S
|
# L O C A T I O N O F F I L E S A N D D I R E C T O R I E S
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
CONFIG_PATH=${SHAREDIR}/shorewall6:${SHAREDIR}/shorewall
|
CONFIG_PATH=${CONFDIR}/shorewall6:${SHAREDIR}/shorewall6:${SHAREDIR}/shorewall
|
||||||
|
|
||||||
GEOIPDIR=/usr/share/xt_geoip/LE
|
GEOIPDIR=/usr/share/xt_geoip/LE
|
||||||
|
|
||||||
@@ -106,11 +106,11 @@ TC=
|
|||||||
# D E F A U L T A C T I O N S / M A C R O S
|
# D E F A U L T A C T I O N S / M A C R O S
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
ACCEPT_DEFAULT=none
|
ACCEPT_DEFAULT="none"
|
||||||
BLACKLIST_DEFAULT="AllowICMPs,Broadcast(DROP),Multicast(DROP),dropNotSyn:$LOG_LEVEL,DropDNSrep:$LOG_LEVEL"
|
BLACKLIST_DEFAULT="AllowICMPs,Broadcast(DROP),Multicast(DROP),dropNotSyn:$LOG_LEVEL,dropInvalid:$LOG_LEVEL,DropDNSrep:$LOG_LEVEL"
|
||||||
DROP_DEFAULT="AllowICMPs,Broadcast(DROP),Multicast(DROP)"
|
DROP_DEFAULT="AllowICMPs,Broadcast(DROP),Multicast(DROP)"
|
||||||
NFQUEUE_DEFAULT=none
|
NFQUEUE_DEFAULT="none"
|
||||||
QUEUE_DEFAULT=none
|
QUEUE_DEFAULT="none"
|
||||||
REJECT_DEFAULT="AllowICMPs,Broadcast(DROP),Multicast(DROP)"
|
REJECT_DEFAULT="AllowICMPs,Broadcast(DROP),Multicast(DROP)"
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@@ -188,6 +188,8 @@ MANGLE_ENABLED=Yes
|
|||||||
|
|
||||||
MARK_IN_FORWARD_CHAIN=No
|
MARK_IN_FORWARD_CHAIN=No
|
||||||
|
|
||||||
|
MINIUPNPD=No
|
||||||
|
|
||||||
MODULE_SUFFIX="ko ko.xz"
|
MODULE_SUFFIX="ko ko.xz"
|
||||||
|
|
||||||
MUTEX_TIMEOUT=60
|
MUTEX_TIMEOUT=60
|
||||||
@@ -196,6 +198,8 @@ OPTIMIZE=All
|
|||||||
|
|
||||||
OPTIMIZE_ACCOUNTING=No
|
OPTIMIZE_ACCOUNTING=No
|
||||||
|
|
||||||
|
PERL_HASH_SEED=0
|
||||||
|
|
||||||
REJECT_ACTION=
|
REJECT_ACTION=
|
||||||
|
|
||||||
REQUIRE_INTERFACE=Yes
|
REQUIRE_INTERFACE=Yes
|
||||||
@@ -206,7 +210,7 @@ RESTORE_ROUTEMARKS=Yes
|
|||||||
|
|
||||||
SAVE_IPSETS=No
|
SAVE_IPSETS=No
|
||||||
|
|
||||||
TC_ENABLED=No
|
TC_ENABLED=Shared
|
||||||
|
|
||||||
TC_EXPERT=No
|
TC_EXPERT=No
|
||||||
|
|
||||||
|
@@ -35,7 +35,7 @@ FIREWALL=
|
|||||||
# L O G G I N G
|
# L O G G I N G
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
LOG_LEVEL=info
|
LOG_LEVEL="info"
|
||||||
|
|
||||||
BLACKLIST_LOG_LEVEL=
|
BLACKLIST_LOG_LEVEL=
|
||||||
|
|
||||||
@@ -55,19 +55,19 @@ LOGLIMIT="s:1/sec:10"
|
|||||||
|
|
||||||
LOGTAGONLY=No
|
LOGTAGONLY=No
|
||||||
|
|
||||||
MACLIST_LOG_LEVEL=info
|
MACLIST_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
RELATED_LOG_LEVEL=
|
RELATED_LOG_LEVEL=
|
||||||
|
|
||||||
RPFILTER_LOG_LEVEL=info
|
RPFILTER_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
SFILTER_LOG_LEVEL=info
|
SFILTER_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
SMURF_LOG_LEVEL=info
|
SMURF_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
STARTUP_LOG=/var/log/shorewall6-init.log
|
STARTUP_LOG=/var/log/shorewall6-init.log
|
||||||
|
|
||||||
TCP_FLAGS_LOG_LEVEL=info
|
TCP_FLAGS_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
UNTRACKED_LOG_LEVEL=
|
UNTRACKED_LOG_LEVEL=
|
||||||
|
|
||||||
@@ -107,11 +107,11 @@ TC=
|
|||||||
# D E F A U L T A C T I O N S / M A C R O S
|
# D E F A U L T A C T I O N S / M A C R O S
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
ACCEPT_DEFAULT=none
|
ACCEPT_DEFAULT="none"
|
||||||
BLACKLIST_DEFAULT="AllowICMPs,Broadcast(DROP),Multicast(DROP),dropNotSyn:$LOG_LEVEL,DropDNSrep:$LOG_LEVEL"
|
BLACKLIST_DEFAULT="AllowICMPs,Broadcast(DROP),Multicast(DROP),dropNotSyn:$LOG_LEVEL,dropInvalid:$LOG_LEVEL,DropDNSrep:$LOG_LEVEL"
|
||||||
DROP_DEFAULT="AllowICMPs,Broadcast(DROP),Multicast(DROP)"
|
DROP_DEFAULT="AllowICMPs,Broadcast(DROP),Multicast(DROP)"
|
||||||
NFQUEUE_DEFAULT=none
|
NFQUEUE_DEFAULT="none"
|
||||||
QUEUE_DEFAULT=none
|
QUEUE_DEFAULT="none"
|
||||||
REJECT_DEFAULT="AllowICMPs,Broadcast(DROP),Multicast(DROP)"
|
REJECT_DEFAULT="AllowICMPs,Broadcast(DROP),Multicast(DROP)"
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@@ -189,6 +189,8 @@ MANGLE_ENABLED=Yes
|
|||||||
|
|
||||||
MARK_IN_FORWARD_CHAIN=No
|
MARK_IN_FORWARD_CHAIN=No
|
||||||
|
|
||||||
|
MINIUPNPD=No
|
||||||
|
|
||||||
MODULE_SUFFIX="ko ko.xz"
|
MODULE_SUFFIX="ko ko.xz"
|
||||||
|
|
||||||
MUTEX_TIMEOUT=60
|
MUTEX_TIMEOUT=60
|
||||||
@@ -197,6 +199,8 @@ OPTIMIZE=All
|
|||||||
|
|
||||||
OPTIMIZE_ACCOUNTING=No
|
OPTIMIZE_ACCOUNTING=No
|
||||||
|
|
||||||
|
PERL_HASH_SEED=0
|
||||||
|
|
||||||
REJECT_ACTION=
|
REJECT_ACTION=
|
||||||
|
|
||||||
REQUIRE_INTERFACE=No
|
REQUIRE_INTERFACE=No
|
||||||
@@ -207,7 +211,7 @@ RESTORE_ROUTEMARKS=Yes
|
|||||||
|
|
||||||
SAVE_IPSETS=No
|
SAVE_IPSETS=No
|
||||||
|
|
||||||
TC_ENABLED=No
|
TC_ENABLED=Shared
|
||||||
|
|
||||||
TC_EXPERT=No
|
TC_EXPERT=No
|
||||||
|
|
||||||
|
@@ -34,7 +34,7 @@ FIREWALL=
|
|||||||
# L O G G I N G
|
# L O G G I N G
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
LOG_LEVEL=info
|
LOG_LEVEL="info"
|
||||||
|
|
||||||
BLACKLIST_LOG_LEVEL=
|
BLACKLIST_LOG_LEVEL=
|
||||||
|
|
||||||
@@ -54,19 +54,19 @@ LOGLIMIT="s:1/sec:10"
|
|||||||
|
|
||||||
LOGTAGONLY=No
|
LOGTAGONLY=No
|
||||||
|
|
||||||
MACLIST_LOG_LEVEL=info
|
MACLIST_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
RELATED_LOG_LEVEL=
|
RELATED_LOG_LEVEL=
|
||||||
|
|
||||||
RPFILTER_LOG_LEVEL=info
|
RPFILTER_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
SFILTER_LOG_LEVEL=info
|
SFILTER_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
SMURF_LOG_LEVEL=info
|
SMURF_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
STARTUP_LOG=/var/log/shorewall6-init.log
|
STARTUP_LOG=/var/log/shorewall6-init.log
|
||||||
|
|
||||||
TCP_FLAGS_LOG_LEVEL=info
|
TCP_FLAGS_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
UNTRACKED_LOG_LEVEL=
|
UNTRACKED_LOG_LEVEL=
|
||||||
|
|
||||||
@@ -106,11 +106,11 @@ TC=
|
|||||||
# D E F A U L T A C T I O N S / M A C R O S
|
# D E F A U L T A C T I O N S / M A C R O S
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
ACCEPT_DEFAULT=none
|
ACCEPT_DEFAULT="none"
|
||||||
BLACKLIST_DEFAULT="AllowICMPs,Broadcast(DROP),Multicast(DROP),dropNotSyn:$LOG_LEVEL,DropDNSrep:$LOG_LEVEL"
|
BLACKLIST_DEFAULT="AllowICMPs,Broadcast(DROP),Multicast(DROP),dropNotSyn:$LOG_LEVEL,dropInvalid:$LOG_LEVEL,DropDNSrep:$LOG_LEVEL"
|
||||||
DROP_DEFAULT="AllowICMPs,Broadcast(DROP),Multicast(DROP)"
|
DROP_DEFAULT="AllowICMPs,Broadcast(DROP),Multicast(DROP)"
|
||||||
NFQUEUE_DEFAULT=none
|
NFQUEUE_DEFAULT="none"
|
||||||
QUEUE_DEFAULT=none
|
QUEUE_DEFAULT="none"
|
||||||
REJECT_DEFAULT="AllowICMPs,Broadcast(DROP),Multicast(DROP)"
|
REJECT_DEFAULT="AllowICMPs,Broadcast(DROP),Multicast(DROP)"
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@@ -188,6 +188,8 @@ MANGLE_ENABLED=Yes
|
|||||||
|
|
||||||
MARK_IN_FORWARD_CHAIN=No
|
MARK_IN_FORWARD_CHAIN=No
|
||||||
|
|
||||||
|
MINIUPNPD=No
|
||||||
|
|
||||||
MODULE_SUFFIX="ko ko.xz"
|
MODULE_SUFFIX="ko ko.xz"
|
||||||
|
|
||||||
MUTEX_TIMEOUT=60
|
MUTEX_TIMEOUT=60
|
||||||
@@ -196,6 +198,8 @@ OPTIMIZE=All
|
|||||||
|
|
||||||
OPTIMIZE_ACCOUNTING=No
|
OPTIMIZE_ACCOUNTING=No
|
||||||
|
|
||||||
|
PERL_HASH_SEED=0
|
||||||
|
|
||||||
REJECT_ACTION=
|
REJECT_ACTION=
|
||||||
|
|
||||||
REQUIRE_INTERFACE=No
|
REQUIRE_INTERFACE=No
|
||||||
@@ -206,7 +210,7 @@ RESTORE_ROUTEMARKS=Yes
|
|||||||
|
|
||||||
SAVE_IPSETS=No
|
SAVE_IPSETS=No
|
||||||
|
|
||||||
TC_ENABLED=No
|
TC_ENABLED=Shared
|
||||||
|
|
||||||
TC_EXPERT=No
|
TC_EXPERT=No
|
||||||
|
|
||||||
|
@@ -34,7 +34,7 @@ FIREWALL=
|
|||||||
# L O G G I N G
|
# L O G G I N G
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
LOG_LEVEL=info
|
LOG_LEVEL="info"
|
||||||
|
|
||||||
BLACKLIST_LOG_LEVEL=
|
BLACKLIST_LOG_LEVEL=
|
||||||
|
|
||||||
@@ -54,19 +54,19 @@ LOGLIMIT="s:1/sec:10"
|
|||||||
|
|
||||||
LOGTAGONLY=No
|
LOGTAGONLY=No
|
||||||
|
|
||||||
MACLIST_LOG_LEVEL=info
|
MACLIST_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
RELATED_LOG_LEVEL=
|
RELATED_LOG_LEVEL=
|
||||||
|
|
||||||
RPFILTER_LOG_LEVEL=info
|
RPFILTER_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
SFILTER_LOG_LEVEL=info
|
SFILTER_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
SMURF_LOG_LEVEL=info
|
SMURF_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
STARTUP_LOG=/var/log/shorewall6-init.log
|
STARTUP_LOG=/var/log/shorewall6-init.log
|
||||||
|
|
||||||
TCP_FLAGS_LOG_LEVEL=info
|
TCP_FLAGS_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
UNTRACKED_LOG_LEVEL=
|
UNTRACKED_LOG_LEVEL=
|
||||||
|
|
||||||
@@ -106,11 +106,11 @@ TC=
|
|||||||
# D E F A U L T A C T I O N S / M A C R O S
|
# D E F A U L T A C T I O N S / M A C R O S
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
ACCEPT_DEFAULT=none
|
ACCEPT_DEFAULT="none"
|
||||||
BLACKLIST_DEFAULT="AllowICMPs,Broadcast(DROP),Multicast(DROP),dropNotSyn:$LOG_LEVEL,DropDNSrep:$LOG_LEVEL"
|
BLACKLIST_DEFAULT="AllowICMPs,Broadcast(DROP),Multicast(DROP),dropNotSyn:$LOG_LEVEL,dropInvalid:$LOG_LEVEL,DropDNSrep:$LOG_LEVEL"
|
||||||
DROP_DEFAULT="AllowICMPs,Broadcast(DROP),Multicast(DROP)"
|
DROP_DEFAULT="AllowICMPs,Broadcast(DROP),Multicast(DROP)"
|
||||||
NFQUEUE_DEFAULT=none
|
NFQUEUE_DEFAULT="none"
|
||||||
QUEUE_DEFAULT=none
|
QUEUE_DEFAULT="none"
|
||||||
REJECT_DEFAULT="AllowICMPs,Broadcast(DROP),Multicast(DROP)"
|
REJECT_DEFAULT="AllowICMPs,Broadcast(DROP),Multicast(DROP)"
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@@ -188,6 +188,8 @@ MANGLE_ENABLED=Yes
|
|||||||
|
|
||||||
MARK_IN_FORWARD_CHAIN=No
|
MARK_IN_FORWARD_CHAIN=No
|
||||||
|
|
||||||
|
MINIUPNPD=No
|
||||||
|
|
||||||
MODULE_SUFFIX="ko ko.xz"
|
MODULE_SUFFIX="ko ko.xz"
|
||||||
|
|
||||||
MUTEX_TIMEOUT=60
|
MUTEX_TIMEOUT=60
|
||||||
@@ -196,6 +198,8 @@ OPTIMIZE=All
|
|||||||
|
|
||||||
OPTIMIZE_ACCOUNTING=No
|
OPTIMIZE_ACCOUNTING=No
|
||||||
|
|
||||||
|
PERL_HASH_SEED=0
|
||||||
|
|
||||||
REJECT_ACTION=
|
REJECT_ACTION=
|
||||||
|
|
||||||
REQUIRE_INTERFACE=No
|
REQUIRE_INTERFACE=No
|
||||||
@@ -206,7 +210,7 @@ RESTORE_ROUTEMARKS=Yes
|
|||||||
|
|
||||||
SAVE_IPSETS=No
|
SAVE_IPSETS=No
|
||||||
|
|
||||||
TC_ENABLED=No
|
TC_ENABLED=Shared
|
||||||
|
|
||||||
TC_EXPERT=No
|
TC_EXPERT=No
|
||||||
|
|
||||||
|
@@ -27,6 +27,7 @@ DropDNSrep inline # Drops DNS replies
|
|||||||
DropSmurfs noinline # Handles packets with a broadcast source address
|
DropSmurfs noinline # Handles packets with a broadcast source address
|
||||||
Established inline,\ # Handles packets in the ESTABLISHED state
|
Established inline,\ # Handles packets in the ESTABLISHED state
|
||||||
state=ESTABLISHED
|
state=ESTABLISHED
|
||||||
|
forwardUPnP noinline # Allow traffic that upnpd has redirected from 'upnp' interfaces.
|
||||||
IfEvent noinline # Perform an action based on an event
|
IfEvent noinline # Perform an action based on an event
|
||||||
Invalid inline,audit,\ # Handles packets in the INVALID conntrack state
|
Invalid inline,audit,\ # Handles packets in the INVALID conntrack state
|
||||||
state=INVALID
|
state=INVALID
|
||||||
|
@@ -34,7 +34,7 @@ FIREWALL=
|
|||||||
# L O G G I N G
|
# L O G G I N G
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
LOG_LEVEL=info
|
LOG_LEVEL="info"
|
||||||
|
|
||||||
BLACKLIST_LOG_LEVEL=
|
BLACKLIST_LOG_LEVEL=
|
||||||
|
|
||||||
@@ -54,19 +54,19 @@ LOGLIMIT="s:1/sec:10"
|
|||||||
|
|
||||||
LOGTAGONLY=No
|
LOGTAGONLY=No
|
||||||
|
|
||||||
MACLIST_LOG_LEVEL=$LOG_LEVEL
|
MACLIST_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
RELATED_LOG_LEVEL=
|
RELATED_LOG_LEVEL=
|
||||||
|
|
||||||
RPFILTER_LOG_LEVEL=$LOG_LEVEL
|
RPFILTER_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
SFILTER_LOG_LEVEL=$LOG_LEVEL
|
SFILTER_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
SMURF_LOG_LEVEL=$LOG_LEVEL
|
SMURF_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
STARTUP_LOG=/var/log/shorewall6-init.log
|
STARTUP_LOG=/var/log/shorewall6-init.log
|
||||||
|
|
||||||
TCP_FLAGS_LOG_LEVEL=$LOG_LEVEL
|
TCP_FLAGS_LOG_LEVEL="$LOG_LEVEL"
|
||||||
|
|
||||||
UNTRACKED_LOG_LEVEL=
|
UNTRACKED_LOG_LEVEL=
|
||||||
|
|
||||||
@@ -106,11 +106,11 @@ TC=
|
|||||||
# D E F A U L T A C T I O N S / M A C R O S
|
# D E F A U L T A C T I O N S / M A C R O S
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
ACCEPT_DEFAULT=none
|
ACCEPT_DEFAULT="none"
|
||||||
BLACKLIST_DEFAULT="AllowICMPs,Broadcast(DROP),Multicast(DROP),dropNotSyn:$LOG_LEVEL,DropDNSrep:$LOG_LEVEL"
|
BLACKLIST_DEFAULT="AllowICMPs,Broadcast(DROP),Multicast(DROP),dropNotSyn:$LOG_LEVEL,dropInvalid:$LOG_LEVEL,DropDNSrep:$LOG_LEVEL"
|
||||||
DROP_DEFAULT="AllowICMPs,Broadcast(DROP),Multicast(DROP)"
|
DROP_DEFAULT="AllowICMPs,Broadcast(DROP),Multicast(DROP)"
|
||||||
NFQUEUE_DEFAULT=none
|
NFQUEUE_DEFAULT="none"
|
||||||
QUEUE_DEFAULT=none
|
QUEUE_DEFAULT="none"
|
||||||
REJECT_DEFAULT="AllowICMPs,Broadcast(DROP),Multicast(DROP)"
|
REJECT_DEFAULT="AllowICMPs,Broadcast(DROP),Multicast(DROP)"
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
@@ -188,6 +188,8 @@ MANGLE_ENABLED=Yes
|
|||||||
|
|
||||||
MARK_IN_FORWARD_CHAIN=No
|
MARK_IN_FORWARD_CHAIN=No
|
||||||
|
|
||||||
|
MINIUPNPD=No
|
||||||
|
|
||||||
MODULE_SUFFIX=ko
|
MODULE_SUFFIX=ko
|
||||||
|
|
||||||
MUTEX_TIMEOUT=60
|
MUTEX_TIMEOUT=60
|
||||||
@@ -196,6 +198,8 @@ OPTIMIZE=All
|
|||||||
|
|
||||||
OPTIMIZE_ACCOUNTING=No
|
OPTIMIZE_ACCOUNTING=No
|
||||||
|
|
||||||
|
PERL_HASH_SEED=0
|
||||||
|
|
||||||
REJECT_ACTION=
|
REJECT_ACTION=
|
||||||
|
|
||||||
REQUIRE_INTERFACE=No
|
REQUIRE_INTERFACE=No
|
||||||
@@ -206,7 +210,7 @@ RESTORE_ROUTEMARKS=Yes
|
|||||||
|
|
||||||
SAVE_IPSETS=No
|
SAVE_IPSETS=No
|
||||||
|
|
||||||
TC_ENABLED=No
|
TC_ENABLED=Shared
|
||||||
|
|
||||||
TC_EXPERT=No
|
TC_EXPERT=No
|
||||||
|
|
||||||
|
@@ -1026,8 +1026,9 @@ Normal-Service => 0x00</programlisting>
|
|||||||
role="bold">all}[,...]}</emphasis></term>
|
role="bold">all}[,...]}</emphasis></term>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Protocol - <emphasis role="bold">ipp2p</emphasis> requires
|
<para>See <ulink
|
||||||
ipp2p match support in your kernel and iptables.</para>
|
url="shorewall-rules.html">shorewall6-rules(5)</ulink> for
|
||||||
|
details.</para>
|
||||||
|
|
||||||
<para>Beginning with Shorewall 4.5.12, this column can accept a
|
<para>Beginning with Shorewall 4.5.12, this column can accept a
|
||||||
comma-separated list of protocols.</para>
|
comma-separated list of protocols.</para>
|
||||||
|
@@ -1392,7 +1392,7 @@
|
|||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><emphasis role="bold">PROTO</emphasis> - {<emphasis
|
<term><emphasis role="bold">PROTO</emphasis> - {<emphasis
|
||||||
role="bold">-</emphasis>|<emphasis
|
role="bold">-</emphasis>|<emphasis
|
||||||
role="bold">tcp:syn</emphasis>|<emphasis
|
role="bold">tcp:[!]syn</emphasis>|<emphasis
|
||||||
role="bold">ipp2p</emphasis>|<emphasis
|
role="bold">ipp2p</emphasis>|<emphasis
|
||||||
role="bold">ipp2p:udp</emphasis>|<emphasis
|
role="bold">ipp2p:udp</emphasis>|<emphasis
|
||||||
role="bold">ipp2p:all</emphasis>|<emphasis>protocol-number</emphasis>|<emphasis>protocol-name</emphasis>|<emphasis
|
role="bold">ipp2p:all</emphasis>|<emphasis>protocol-number</emphasis>|<emphasis>protocol-name</emphasis>|<emphasis
|
||||||
@@ -1403,7 +1403,9 @@
|
|||||||
requires ipp2p match support in your kernel and ip6tables. <emphasis
|
requires ipp2p match support in your kernel and ip6tables. <emphasis
|
||||||
role="bold">tcp:syn</emphasis> implies <emphasis
|
role="bold">tcp:syn</emphasis> implies <emphasis
|
||||||
role="bold">tcp</emphasis> plus the SYN flag must be set and the
|
role="bold">tcp</emphasis> plus the SYN flag must be set and the
|
||||||
RST,ACK and FIN flags must be reset.</para>
|
RST,ACK and FIN flags must be reset. Beginning with Shorewall 5.1.3,
|
||||||
|
you may also specify <emphasis role="bold">tcp:!syn</emphasis>,
|
||||||
|
which matches if SYN is not set or if RST, ACK or FIN is set.</para>
|
||||||
|
|
||||||
<para>Beginning with Shorewall6 4.4.19, this column can contain a
|
<para>Beginning with Shorewall6 4.4.19, this column can contain a
|
||||||
comma-separated list of protocol-numbers and/or protocol names
|
comma-separated list of protocol-numbers and/or protocol names
|
||||||
|
@@ -222,8 +222,9 @@
|
|||||||
role="bold">all}</emphasis></term>
|
role="bold">all}</emphasis></term>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>Protocol - <emphasis role="bold">ipp2p</emphasis> requires
|
<para>See <ulink
|
||||||
ipp2p match support in your kernel and iptables.</para>
|
url="shorewall-rules.html">shorewall6-rules(5)</ulink> for
|
||||||
|
details.</para>
|
||||||
|
|
||||||
<para>Beginning with Shorewall 4.5.12, this column can accept a
|
<para>Beginning with Shorewall 4.5.12, this column can accept a
|
||||||
comma-separated list of protocols.</para>
|
comma-separated list of protocols.</para>
|
||||||
|
@@ -234,8 +234,9 @@
|
|||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>If you wish to restrict this entry to a particular protocol
|
<para>If you wish to restrict this entry to a particular protocol
|
||||||
then enter the protocol name (from protocols(5)) or number
|
then enter the protocol name (from protocols(5)) or number here. See
|
||||||
here.</para>
|
<ulink url="shorewall-rules.html">shorewall6-rules(5)</ulink> for
|
||||||
|
details.</para>
|
||||||
|
|
||||||
<para>Beginning with Shorewall 4.5.12, this column can accept a
|
<para>Beginning with Shorewall 4.5.12, this column can accept a
|
||||||
comma-separated list of protocols.</para>
|
comma-separated list of protocols.</para>
|
||||||
|
@@ -1555,6 +1555,28 @@ LOG:info:,bar net fw</programlisting>
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><emphasis role="bold">MINIUPNPD=</emphasis>[<emphasis
|
||||||
|
role="bold">Yes</emphasis>|<emphasis role="bold">No</emphasis>]</term>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>Added in Shorewall 5.1.4. If set to Yes, Shorewall will create
|
||||||
|
a chain in the nat table named MINIUPNPD-POSTROUTING and will add
|
||||||
|
jumps from POSTROUTING to that chain for each interface with the
|
||||||
|
<option>upnpd</option> option specified. Default is No.</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><emphasis
|
||||||
|
role="bold">MARK_IN_FORWARD_CHAIN=</emphasis>[<emphasis
|
||||||
|
role="bold">Yes</emphasis>|<emphasis role="bold">No</emphasis>]</term>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para/>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><emphasis role="bold">MODULE_SUFFIX=</emphasis>[<emphasis
|
<term><emphasis role="bold">MODULE_SUFFIX=</emphasis>[<emphasis
|
||||||
role="bold">"</emphasis><emphasis>extension</emphasis> ...<emphasis
|
role="bold">"</emphasis><emphasis>extension</emphasis> ...<emphasis
|
||||||
@@ -1868,6 +1890,21 @@ LOG:info:,bar net fw</programlisting>
|
|||||||
</listitem>
|
</listitem>
|
||||||
</varlistentry>
|
</varlistentry>
|
||||||
|
|
||||||
|
<varlistentry>
|
||||||
|
<term><emphasis role="bold">PERL_HASH_SEED=</emphasis><emphasis
|
||||||
|
role="bold"><replaceable>seed</replaceable><emphasis
|
||||||
|
role="bold">|random</emphasis></emphasis></term>
|
||||||
|
|
||||||
|
<listitem>
|
||||||
|
<para>Added in Shorewall 5.1.4. Sets the Perl hash
|
||||||
|
<replaceable>seed</replaceable> (an integer in the range 0-99999)
|
||||||
|
when running the Shorewall rules compiler. If not specified, the
|
||||||
|
value 0 is assumed. If <option>random</option> is specified, a
|
||||||
|
random seed will be chosed by Perl. See perlsec(1) for additional
|
||||||
|
information.</para>
|
||||||
|
</listitem>
|
||||||
|
</varlistentry>
|
||||||
|
|
||||||
<varlistentry>
|
<varlistentry>
|
||||||
<term><emphasis
|
<term><emphasis
|
||||||
role="bold">PROVIDER_BITS</emphasis>=[<replaceable>number</replaceable>]</term>
|
role="bold">PROVIDER_BITS</emphasis>=[<replaceable>number</replaceable>]</term>
|
||||||
|
@@ -16,7 +16,7 @@ RemainAfterExit=yes
|
|||||||
EnvironmentFile=-/etc/default/shorewall6
|
EnvironmentFile=-/etc/default/shorewall6
|
||||||
StandardOutput=syslog
|
StandardOutput=syslog
|
||||||
ExecStart=/sbin/shorewall -6 $OPTIONS start $STARTOPTIONS
|
ExecStart=/sbin/shorewall -6 $OPTIONS start $STARTOPTIONS
|
||||||
ExecStop=/sbin/shorewall -6 $OPTIONS stop
|
ExecStop=/sbin/shorewall -6 $OPTIONS clear
|
||||||
ExecReload=/sbin/shorewall -6 $OPTIONS reload $RELOADOPTIONS
|
ExecReload=/sbin/shorewall -6 $OPTIONS reload $RELOADOPTIONS
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
@@ -351,8 +351,8 @@ ACCEPT - - tcp 135,139,445</programlisting>
|
|||||||
</varlistentry>
|
</varlistentry>
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
<para>The recommended settings for the 6 policy actions for IPv4 are:
|
<para>The recommended settings for the 6 policy actions for IPv4
|
||||||
</para>
|
are:</para>
|
||||||
|
|
||||||
<programlisting> ACCEPT_DEFAULT=none
|
<programlisting> ACCEPT_DEFAULT=none
|
||||||
BLACKLIST_DEFAULT="Broadcast(DROP),Multicast(DROP),dropNotSyn:$LOG_LEVEL,dropInvalid:$LOG_LEVEL,DropDNSrep:$LOG_LEVEL"
|
BLACKLIST_DEFAULT="Broadcast(DROP),Multicast(DROP),dropNotSyn:$LOG_LEVEL,dropInvalid:$LOG_LEVEL,DropDNSrep:$LOG_LEVEL"
|
||||||
@@ -365,7 +365,7 @@ ACCEPT - - tcp 135,139,445</programlisting>
|
|||||||
<para>The recommended settings for IPv6 are:</para>
|
<para>The recommended settings for IPv6 are:</para>
|
||||||
|
|
||||||
<programlisting> ACCEPT_DEFAULT=none
|
<programlisting> ACCEPT_DEFAULT=none
|
||||||
BLACKLIST_DEFAULT="AllowICMPs,Broadcast(DROP),Multicast(DROP),dropNotSyn:$LOG_LEVEL,DropDNSrep:$LOG_LEVEL"
|
BLACKLIST_DEFAULT="AllowICMPs,Broadcast(DROP),Multicast(DROP),dropNotSyn:$LOG_LEVEL,dropInvalid:$LOG_LEVEL,DropDNSrep:$LOG_LEVEL"
|
||||||
DROP_DEFAULT="AllowICMPs,Broadcast(DROP),Multicast(DROP)"
|
DROP_DEFAULT="AllowICMPs,Broadcast(DROP),Multicast(DROP)"
|
||||||
NFQUEUE_DEFAULT=none
|
NFQUEUE_DEFAULT=none
|
||||||
QUEUE_DEFAULT=none
|
QUEUE_DEFAULT=none
|
||||||
|
@@ -18,7 +18,7 @@
|
|||||||
<pubdate><?dbtimestamp format="Y/m/d"?></pubdate>
|
<pubdate><?dbtimestamp format="Y/m/d"?></pubdate>
|
||||||
|
|
||||||
<copyright>
|
<copyright>
|
||||||
<year>2001-2016</year>
|
<year>2001-2017</year>
|
||||||
|
|
||||||
<holder>Thomas M. Eastep</holder>
|
<holder>Thomas M. Eastep</holder>
|
||||||
</copyright>
|
</copyright>
|
||||||
|
21
docs/KVM.xml
21
docs/KVM.xml
@@ -50,7 +50,7 @@
|
|||||||
Linux Distributions. The following diagram shows the entire
|
Linux Distributions. The following diagram shows the entire
|
||||||
network.</para>
|
network.</para>
|
||||||
|
|
||||||
<graphic align="center" fileref="images/Network2008a.png" />
|
<graphic align="center" fileref="images/Network2008a.png"/>
|
||||||
|
|
||||||
<para>My personal laptop (Ursa) hosts the virtual machines. As shown in
|
<para>My personal laptop (Ursa) hosts the virtual machines. As shown in
|
||||||
the diagram, Ursa has routes to the Internet through both the
|
the diagram, Ursa has routes to the Internet through both the
|
||||||
@@ -66,12 +66,12 @@
|
|||||||
<section>
|
<section>
|
||||||
<title>Networking Configuration</title>
|
<title>Networking Configuration</title>
|
||||||
|
|
||||||
<para>I use a network configuration where each VM has its own VNET and
|
<para>I use a network configuration where each VM has its own VNET and tap
|
||||||
tap device and the tap devices are all configured as ports on a Linux
|
device and the tap devices are all configured as ports on a Linux Bridge.
|
||||||
Bridge. For clarity, I've only shown four of the virtual machines
|
For clarity, I've only shown four of the virtual machines available on the
|
||||||
available on the system.</para>
|
system.</para>
|
||||||
|
|
||||||
<graphic align="center" fileref="images/KVM1.png" />
|
<graphic align="center" fileref="images/KVM1.png"/>
|
||||||
|
|
||||||
<para>I run <ulink url="???">dmsmasq</ulink> to act as a DHCP server and
|
<para>I run <ulink url="???">dmsmasq</ulink> to act as a DHCP server and
|
||||||
name server for the VMs.</para>
|
name server for the VMs.</para>
|
||||||
@@ -82,11 +82,10 @@
|
|||||||
|
|
||||||
<para>With this configuration, and with only a single network interface on
|
<para>With this configuration, and with only a single network interface on
|
||||||
the laptop, this is just a simple <ulink
|
the laptop, this is just a simple <ulink
|
||||||
url="two-interface.html">two-interface masquerading setup</ulink> where
|
url="two-interface.htm">two-interface masquerading setup</ulink> where the
|
||||||
the local network interface is <filename
|
local network interface is <filename class="devicefile">br0</filename>. As
|
||||||
class="devicefile">br0</filename>. As with all bridges, <filename
|
with all bridges, <filename class="devicefile">br0</filename> must be
|
||||||
class="devicefile">br0</filename> must be configured with the
|
configured with the <option>routeback</option> option in <ulink
|
||||||
<option>routeback</option> option in <ulink
|
|
||||||
url="manpages/shorewall-interfaces.html">shorewall-interfaces</ulink>(5).</para>
|
url="manpages/shorewall-interfaces.html">shorewall-interfaces</ulink>(5).</para>
|
||||||
|
|
||||||
<para>For additional information about this setup, including the Shorewall
|
<para>For additional information about this setup, including the Shorewall
|
||||||
|
@@ -446,40 +446,42 @@ br0 - routeback</programlisting></para>
|
|||||||
backslash (<quote>\</quote>) followed immediately by a new line character
|
backslash (<quote>\</quote>) followed immediately by a new line character
|
||||||
(Enter key).</para>
|
(Enter key).</para>
|
||||||
|
|
||||||
<example id="continuation">
|
<programlisting>ACCEPT net $FW tcp \↵
|
||||||
<title>Line Continuation</title>
|
|
||||||
|
|
||||||
<programlisting>ACCEPT net $FW tcp \↵
|
|
||||||
smtp,www,pop3,imap #Services running on the firewall</programlisting>
|
smtp,www,pop3,imap #Services running on the firewall</programlisting>
|
||||||
|
|
||||||
<para>In certain cases, leading white space is ignored in continuation
|
<para>In certain cases, leading white space is ignored in continuation
|
||||||
lines:</para>
|
lines:</para>
|
||||||
|
|
||||||
<itemizedlist>
|
<orderedlist>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>The continued line ends with a colon (":")</para>
|
<para>The continued line ends with a colon (":")</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>The continued line ends with a comma (",")</para>
|
<para>The continued line ends with a comma (",")</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
</itemizedlist>
|
</orderedlist>
|
||||||
|
|
||||||
<para>Example (<filename>/etc/shorewall/rules</filename>):</para>
|
<important>
|
||||||
|
<para>What follows does NOT apply to <ulink
|
||||||
|
url="manpages/shorewall-params.html">shorewall-params(5)</ulink> and
|
||||||
|
<ulink url="shorewall.conf.html">shorewall.conf(5)</ulink>.</para>
|
||||||
|
</important>
|
||||||
|
|
||||||
<programlisting>#ACTION SOURCE DEST PROTO DPORT
|
<para>Example (<filename>/etc/shorewall/rules</filename>):</para>
|
||||||
|
|
||||||
|
<programlisting>#ACTION SOURCE DEST PROTO DPORT
|
||||||
ACCEPT net:\
|
ACCEPT net:\
|
||||||
206.124.146.177,\
|
206.124.146.177,\
|
||||||
206.124.146.178,\
|
206.124.146.178,\
|
||||||
206.124.146.180\
|
206.124.146.180\
|
||||||
dmz tcp 873</programlisting>
|
dmz tcp 873</programlisting>
|
||||||
|
|
||||||
<para>The leading white space on the first through third continuation
|
<para>The leading white space on the first through third continuation
|
||||||
lines is ignored so the SOURCE column effectively contains
|
lines is ignored so the SOURCE column effectively contains
|
||||||
"net:206.124.146.177,206.124.147.178,206.124.146.180". Because the third
|
"net:206.124.146.177,206.124.147.178,206.124.146.180". Because the third
|
||||||
continuation line does not end with a comma or colon, the leading white
|
continuation line does not end with a comma or colon, the leading white
|
||||||
space in the last line is not ignored.</para>
|
space in the last line is not ignored.</para>
|
||||||
</example>
|
|
||||||
|
|
||||||
<important>
|
<important>
|
||||||
<para>A trailing backslash is not ignored in a comment. So the continued
|
<para>A trailing backslash is not ignored in a comment. So the continued
|
||||||
@@ -2273,6 +2275,18 @@ SSH(ACCEPT) net:$MYIP $FW
|
|||||||
<command>restart</command>, <command>reload</command>,
|
<command>restart</command>, <command>reload</command>,
|
||||||
<command>refresh</command>, or one of the <command>safe</command>-*
|
<command>refresh</command>, or one of the <command>safe</command>-*
|
||||||
commands.</para>
|
commands.</para>
|
||||||
|
|
||||||
|
<para>See the VERBOSE_MESSAGES option in <ulink
|
||||||
|
url="manpages/shorewall.conf.html">shorewall.conf(5)</ulink> for
|
||||||
|
additional information.</para>
|
||||||
|
|
||||||
|
<para>In Shorewall 5.1.4, the behavior of ?ERROR, ?WARNING and ?INFO was
|
||||||
|
changed when they appear in an action file. Rather than reporting the
|
||||||
|
action filename and line number, the generated message reports where the
|
||||||
|
action was invoked. For example, the GlusterFS message above was changed
|
||||||
|
to:</para>
|
||||||
|
|
||||||
|
<programlisting> ERROR: Invalid value (2000) for the GlusterFS Bricks argument /etc/shorewall/rules (line 45)</programlisting>
|
||||||
</section>
|
</section>
|
||||||
|
|
||||||
<section id="Embedded">
|
<section id="Embedded">
|
||||||
|
@@ -26,6 +26,8 @@
|
|||||||
|
|
||||||
<year>2015</year>
|
<year>2015</year>
|
||||||
|
|
||||||
|
<year>2017</year>
|
||||||
|
|
||||||
<holder>Thomas M. Eastep</holder>
|
<holder>Thomas M. Eastep</holder>
|
||||||
</copyright>
|
</copyright>
|
||||||
|
|
||||||
@@ -54,7 +56,12 @@
|
|||||||
<ulink url="http://xtables-addons.sourceforge.net/">xtables-addons</ulink>
|
<ulink url="http://xtables-addons.sourceforge.net/">xtables-addons</ulink>
|
||||||
if they are not available in your current distribution. Instructions for
|
if they are not available in your current distribution. Instructions for
|
||||||
installing xtables-addons may be found in the <ulink
|
installing xtables-addons may be found in the <ulink
|
||||||
url="Dynamic.html">Dynamic Zones article</ulink>.</para>
|
url="Dynamic.html">Dynamic Zones article</ulink>.
|
||||||
|
Note that xtables-addons might not be required
|
||||||
|
with the 'ipset' package provided by your distribution.
|
||||||
|
See also the section <ulink url="configuration_file_basics.htm#capabilities">capabilities</ulink>
|
||||||
|
in the <ulink url="configuration_file_basics.htm">configuration file basics article</ulink>
|
||||||
|
and the <ulink url="Shorewall-Lite.html#Shorecap">Shorecap program</ulink>.</para>
|
||||||
|
|
||||||
<para>Ipset allows you to create one or more named sets of addresses then
|
<para>Ipset allows you to create one or more named sets of addresses then
|
||||||
use those sets to define Netfilter/iptables rules. Possible uses of ipsets
|
use those sets to define Netfilter/iptables rules. Possible uses of ipsets
|
||||||
|
Reference in New Issue
Block a user