forked from extern/shorewall_code
Compare commits
115 Commits
5.2.2-Beta
...
5.2.4-base
Author | SHA1 | Date | |
---|---|---|---|
|
6f484da821 | ||
|
82d2863b29 | ||
|
e855d03332 | ||
|
09712254e8 | ||
|
de39f7d3aa | ||
|
54a70e4632 | ||
|
c80462c283 | ||
|
a2e56492df | ||
|
3222a380c3 | ||
|
e82307f61e | ||
|
ae4f86a1e5 | ||
|
c33a72594c | ||
|
8496bf0ff3 | ||
|
a6c1cd6d7b | ||
|
2604378646 | ||
|
d24179173f | ||
|
803853c719 | ||
|
57f1f8658f | ||
|
0a34e4e685 | ||
|
b52a330f41 | ||
|
de761ac657 | ||
|
d3de75dd12 | ||
|
ca59556d44 | ||
|
639dc86e1b | ||
|
fa1aa4b481 | ||
|
3e2d7cf990 | ||
|
95d3486788 | ||
|
657673927c | ||
|
a345be20fb | ||
|
9f3534dc1f | ||
|
f63f0bb2f1 | ||
|
646f01a3a4 | ||
|
65e101f306 | ||
|
000f120c61 | ||
|
f221ca290f | ||
|
8b99f8caac | ||
|
8b2c79e5ce | ||
|
dcde2bfa4a | ||
|
1ec81b7d7b | ||
|
387b861759 | ||
|
f4e6d2fa56 | ||
|
6798c2f2b0 | ||
|
caa7475483 | ||
|
3f5e1b5b60 | ||
|
e8f49bc9c7 | ||
|
5021154867 | ||
|
f831d9a988 | ||
|
31b558b7f9 | ||
|
367a5f7d97 | ||
|
4efac2fda1 | ||
|
5f50b70618 | ||
|
b437f609e5 | ||
|
b897fe2b9d | ||
|
802ff1da4e | ||
|
f05bd969af | ||
|
7aaa04149e | ||
|
093e55083c | ||
|
c9eb443574 | ||
|
0aabb81c03 | ||
|
c763525e78 | ||
|
533e2472da | ||
|
08da235896 | ||
|
77cad81ba7 | ||
|
9213d7e707 | ||
|
157abcbd37 | ||
|
6da498510c | ||
|
2b7a37e42a | ||
|
84a220a651 | ||
|
51b9589c48 | ||
|
762df5e18c | ||
|
cb56991fee | ||
|
54c7e1a607 | ||
|
c4d5bb904b | ||
|
40f6192e19 | ||
|
7051daeb08 | ||
|
a9c42e1eaa | ||
|
8df70406df | ||
|
8b0cfdf779 | ||
|
c127cec76c | ||
|
6b21135ade | ||
|
2f66381a4a | ||
|
aa97b1b283 | ||
|
53495ec0a8 | ||
|
2f3f6ffa15 | ||
|
60f2f3b0d0 | ||
|
e626b77097 | ||
|
15dd14e167 | ||
|
83b586c192 | ||
|
d3fcb29f0d | ||
|
a4ed419aba | ||
|
e548043e96 | ||
|
443a4223c2 | ||
|
8f42a6a72b | ||
|
0982fec513 | ||
|
f5262dd050 | ||
|
8dcfd86f3a | ||
|
edc9e25f25 | ||
|
ef11ae834d | ||
|
9f423412d8 | ||
|
7f7fef3a4e | ||
|
b9d0821acb | ||
|
857539c8b1 | ||
|
429070d107 | ||
|
89725c530f | ||
|
8e5f67797a | ||
|
0eb0bace9a | ||
|
fab8cc055b | ||
|
bef8ec09b3 | ||
|
cf330afbd9 | ||
|
49731da807 | ||
|
f3ecbc185c | ||
|
a71a44346e | ||
|
4d278f4c20 | ||
|
45ec24ea42 | ||
|
bf3880ae59 |
@@ -18,7 +18,7 @@ Shoreline Firewall (Shorewall) Version 5
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Please see http://www.shorewall.net/Install.htm for installation
|
||||
Please see http://www.shorewall.org/Install.htm for installation
|
||||
instructions.
|
||||
|
||||
|
||||
|
1
Shorewall-core/Shorewall-core-targetname
Normal file
1
Shorewall-core/Shorewall-core-targetname
Normal file
@@ -0,0 +1 @@
|
||||
5.2.4-Beta1
|
2
Shorewall-core/configure
vendored
2
Shorewall-core/configure
vendored
@@ -4,7 +4,7 @@
|
||||
#
|
||||
# (c) 2012,2014,2017 - Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Shorewall documentation is available at http://www.shorewall.net
|
||||
# Shorewall documentation is available at http://www.shorewall.org
|
||||
#
|
||||
# This program is part of Shorewall.
|
||||
#
|
||||
|
@@ -4,7 +4,7 @@
|
||||
#
|
||||
# (c) 2012, 2014 - Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Shorewall documentation is available at http://www.shorewall.net
|
||||
# Shorewall documentation is available at http://www.shorewall.org
|
||||
#
|
||||
# This program is part of Shorewall.
|
||||
#
|
||||
|
@@ -4,7 +4,7 @@
|
||||
#
|
||||
# (c) 2000-2018 - Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Shorewall documentation is available at http://shorewall.net
|
||||
# Shorewall documentation is available at http://shorewall.org
|
||||
#
|
||||
# This program is part of Shorewall.
|
||||
#
|
||||
|
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# (c) 1999-2017 - Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# This program is part of Shorewall.
|
||||
#
|
||||
|
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# (c) 1999-2018 - Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# This program is part of Shorewall.
|
||||
#
|
||||
@@ -4120,9 +4120,9 @@ start_command() {
|
||||
|
||||
if [ -x $g_firewall ]; then
|
||||
if [ -n "$g_fast" -a -x ${VARDIR}/${RESTOREFILE} -a ! $g_firewall -nt ${VARDIR}/${RESTOREFILE} ]; then
|
||||
run_it ${VARDIR}/${RESTOREFILE} $g_debugging restore
|
||||
run_it ${VARDIR}/${RESTOREFILE} restore
|
||||
else
|
||||
run_it $g_firewall $g_debugging start
|
||||
run_it $g_firewall start
|
||||
fi
|
||||
rc=$?
|
||||
else
|
||||
@@ -4256,7 +4256,7 @@ restart_command() {
|
||||
[ -n "$g_nolock" ] || mutex_on
|
||||
|
||||
if [ -x $g_firewall ]; then
|
||||
run_it $g_firewall $g_debugging $COMMAND
|
||||
run_it $g_firewall $COMMAND
|
||||
rc=$?
|
||||
else
|
||||
error_message "$g_firewall is missing or is not executable"
|
||||
@@ -4270,7 +4270,7 @@ restart_command() {
|
||||
|
||||
run_command() {
|
||||
if [ -x $g_firewall ] ; then
|
||||
run_it $g_firewall $g_debugging $@
|
||||
run_it $g_firewall $@
|
||||
else
|
||||
fatal_error "$g_firewall does not exist or is not executable"
|
||||
fi
|
||||
@@ -4287,7 +4287,13 @@ ecko() {
|
||||
#
|
||||
usage() # $1 = exit status
|
||||
{
|
||||
echo "Usage: $(basename $0) [debug|trace] [nolock] [ -q ] [ -v[-1|{0-2}] ] [ -t ] <command>"
|
||||
echo "Usage: $(basename $0) [ -T ] [ -D ] [ -N ] [ -q ] [ -v[-1|{0-2}] ] [ -t ] <command>"
|
||||
echo " -T : Direct the generated script to produce a shell trace to standard error"
|
||||
echo " -D : Debug iptables commands"
|
||||
echo " -N : Don't take the master shorewall lock"
|
||||
echo " -q : Standard Shorewall verbosity control"
|
||||
echo " -v : Standard Shorewall verbosity control"
|
||||
echo " -t : Timestamp all messages"
|
||||
echo "where <command> is one of:"
|
||||
echo " add <interface>[:<host-list>] ... <zone>"
|
||||
echo " allow <address> ..."
|
||||
@@ -4317,7 +4323,6 @@ usage() # $1 = exit status
|
||||
echo " iptrace <ip6tables match expression>"
|
||||
fi
|
||||
|
||||
ecko " load [ -s ] [ -c ] [ -r <root user> ] [ -T ] [ -i ] [ <directory> ] <system>"
|
||||
echo " logdrop <address> ..."
|
||||
echo " logreject <address> ..."
|
||||
echo " logwatch [<refresh interval>]"
|
||||
@@ -4415,20 +4420,16 @@ usage() # $1 = exit status
|
||||
# here if that lib is loaded below.
|
||||
#
|
||||
shorewall_cli() {
|
||||
g_debugging=
|
||||
|
||||
if [ $# -gt 0 ] && [ "x$1" = "xdebug" -o "x$1" = "xtrace" ]; then
|
||||
g_debugging=$1
|
||||
shift
|
||||
fi
|
||||
|
||||
g_nolock=
|
||||
|
||||
#
|
||||
# We'll keep this around for a while so we don't break people's started scripts
|
||||
#
|
||||
if [ $# -gt 0 ] && [ "$1" = "nolock" ]; then
|
||||
g_nolock=nolock
|
||||
shift
|
||||
fi
|
||||
|
||||
g_debugging=
|
||||
g_noroutes=
|
||||
g_purge=
|
||||
g_ipt_options="-nv"
|
||||
@@ -4456,6 +4457,7 @@ shorewall_cli() {
|
||||
g_blacklistipset=
|
||||
g_disconnect=
|
||||
g_havemutex=
|
||||
g_trace=
|
||||
|
||||
VERBOSE=
|
||||
VERBOSITY=1
|
||||
@@ -4587,6 +4589,17 @@ shorewall_cli() {
|
||||
finished=1
|
||||
option=
|
||||
;;
|
||||
T*)
|
||||
g_debugging=trace
|
||||
option=${option#T}
|
||||
;;
|
||||
D*)
|
||||
g_debugging=debug
|
||||
option=${option#D}
|
||||
;;
|
||||
N*)
|
||||
g_nolock=nolock
|
||||
;;
|
||||
*)
|
||||
option_error $option
|
||||
;;
|
||||
@@ -4639,7 +4652,7 @@ shorewall_cli() {
|
||||
get_config
|
||||
[ -x $g_firewall ] || fatal_error "$g_product has never been started"
|
||||
[ -n "$g_nolock" ] || mutex_on
|
||||
run_it $g_firewall $g_debugging $COMMAND
|
||||
run_it $g_firewall $COMMAND
|
||||
[ -n "$g_nolock" ] || mutex_off
|
||||
;;
|
||||
reset)
|
||||
@@ -4648,7 +4661,7 @@ shorewall_cli() {
|
||||
shift
|
||||
[ -n "$g_nolock" ] || mutex_on
|
||||
[ -x $g_firewall ] || fatal_error "$g_product has never been started"
|
||||
run_it $g_firewall $g_debugging reset $@
|
||||
run_it $g_firewall reset $@
|
||||
[ -n "$g_nolock" ] || mutex_off
|
||||
;;
|
||||
reload|restart)
|
||||
@@ -4661,7 +4674,7 @@ shorewall_cli() {
|
||||
only_root
|
||||
get_config Yes
|
||||
if product_is_started; then
|
||||
run_it $g_firewall $g_debugging $@
|
||||
run_it $g_firewall $@
|
||||
else
|
||||
fatal_error "$g_product is not running"
|
||||
fi
|
||||
@@ -4816,7 +4829,7 @@ shorewall_cli() {
|
||||
# It isn't a function visible to this script -- try
|
||||
# the compiled firewall
|
||||
#
|
||||
run_it $g_firewall $g_debugging call $@
|
||||
run_it $g_firewall call $@
|
||||
fi
|
||||
else
|
||||
missing_argument
|
||||
|
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# (c) 2010-2018 - Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# This program is part of Shorewall.
|
||||
#
|
||||
@@ -92,18 +92,20 @@ startup_error() # $* = Error Message
|
||||
#
|
||||
run_it() {
|
||||
local script
|
||||
local options
|
||||
local options='-'
|
||||
|
||||
export VARDIR
|
||||
|
||||
script=$1
|
||||
shift
|
||||
|
||||
if [ x$1 = xtrace -o x$1 = xdebug ]; then
|
||||
options="$1 -"
|
||||
shift;
|
||||
|
||||
if [ "$g_debugging" = debug ]; then
|
||||
options='-D'
|
||||
elif [ "$g_debugging" = trace ]; then
|
||||
options='-T'
|
||||
else
|
||||
options='-'
|
||||
options='-';
|
||||
fi
|
||||
|
||||
[ -n "$g_noroutes" ] && options=${options}n
|
||||
@@ -411,7 +413,7 @@ load_kernel_modules() # $1 = Yes, if we are to save moduleinfo in $VARDIR
|
||||
[ -d $directory ] && moduledirectories="$moduledirectories $directory"
|
||||
done
|
||||
|
||||
[ -n "$LOAD_HELPERS_ONLY" ] && modules=$(find_file helpers) || modules=$(find_file modules)
|
||||
modules=$(find_file helpers)
|
||||
|
||||
if [ -f $modules -a -n "$moduledirectories" ]; then
|
||||
[ -d /sys/module/ ] || MODULES=$(lsmod | cut -d ' ' -f1)
|
||||
@@ -736,8 +738,8 @@ truncate() # $1 = length
|
||||
|
||||
#
|
||||
# Call this function to assert mutual exclusion with Shorewall. If you invoke the
|
||||
# /sbin/shorewall program while holding mutual exclusion, you should pass "nolock" as
|
||||
# the first argument. Example "shorewall nolock refresh"
|
||||
# /sbin/shorewall program while holding mutual exclusion, you should pass -N as
|
||||
# the first argument. Example "shorewall -N refresh"
|
||||
#
|
||||
# This function uses the lockfile utility from procmail if it exists.
|
||||
# Otherwise, it uses a somewhat race-prone algorithm to attempt to simulate the
|
||||
|
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# (c) 1999-2017 - Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# This program is part of Shorewall.
|
||||
#
|
||||
|
@@ -4,7 +4,7 @@
|
||||
# (c) 2017 - Tom Eastep (teastep@shorewall.net)
|
||||
# (c) 2017 - Matt Darfeuille (matdarf@gmail.com)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# This program is part of Shorewall.
|
||||
#
|
||||
|
@@ -4,7 +4,7 @@
|
||||
# (c) 2017 - Tom Eastep (teastep@shorewall.net)
|
||||
# (c) 2017 - Matt Darfeuille (matdarf@gmail.com)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# This program is part of Shorewall.
|
||||
#
|
||||
|
@@ -21,9 +21,6 @@
|
||||
<cmdsynopsis>
|
||||
<command>shorewall[6][-lite]</command>
|
||||
|
||||
<arg
|
||||
choice="opt"><option>trace</option>|<option>debug</option><arg><option>nolock</option></arg></arg>
|
||||
|
||||
<arg rep="norepeat">options</arg>
|
||||
|
||||
<arg choice="plain"><option>add {</option></arg>
|
||||
@@ -39,9 +36,6 @@
|
||||
<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>allow</option></arg>
|
||||
@@ -52,9 +46,6 @@
|
||||
<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>blacklist</option></arg>
|
||||
@@ -67,9 +58,6 @@
|
||||
<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>call</option></arg>
|
||||
@@ -106,9 +94,6 @@
|
||||
<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
|
||||
@@ -118,9 +103,6 @@
|
||||
<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>close</option><arg choice="req">
|
||||
@@ -159,9 +141,6 @@
|
||||
<cmdsynopsis>
|
||||
<command>shorewall[6][-lite]</command>
|
||||
|
||||
<arg
|
||||
choice="opt"><option>trace</option>|<option>debug</option><arg><option>nolock</option></arg></arg>
|
||||
|
||||
<arg rep="norepeat">options</arg>
|
||||
|
||||
<arg choice="plain"><option>delete {</option></arg>
|
||||
@@ -177,9 +156,6 @@
|
||||
<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>disable</option></arg>
|
||||
@@ -191,9 +167,6 @@
|
||||
<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>drop</option></arg>
|
||||
@@ -204,8 +177,6 @@
|
||||
<cmdsynopsis>
|
||||
<command>shorewall[6][-lite]</command>
|
||||
|
||||
<arg choice="opt"><option>trace</option>|<option>debug</option></arg>
|
||||
|
||||
<arg>options</arg>
|
||||
|
||||
<arg choice="plain"><option>dump</option></arg>
|
||||
@@ -222,9 +193,6 @@
|
||||
<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>enable</option></arg>
|
||||
@@ -236,9 +204,6 @@
|
||||
<cmdsynopsis>
|
||||
<command>shorewall[6]</command>
|
||||
|
||||
<arg
|
||||
choice="opt"><option>trace</option>|<option>debug</option><arg><option>nolock</option></arg></arg>
|
||||
|
||||
<arg>options</arg>
|
||||
|
||||
<arg choice="plain"><option>export</option></arg>
|
||||
@@ -252,9 +217,6 @@
|
||||
<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>forget</option></arg>
|
||||
@@ -265,8 +227,6 @@
|
||||
<cmdsynopsis>
|
||||
<command>shorewall[6][-lite]</command>
|
||||
|
||||
<arg choice="opt"><option>trace</option>|<option>debug</option></arg>
|
||||
|
||||
<arg>options</arg>
|
||||
|
||||
<arg choice="plain"><option>help</option></arg>
|
||||
@@ -275,8 +235,6 @@
|
||||
<cmdsynopsis>
|
||||
<command>shorewall[-lite]</command>
|
||||
|
||||
<arg choice="opt"><option>trace</option>|<option>debug</option></arg>
|
||||
|
||||
<arg>options</arg>
|
||||
|
||||
<arg
|
||||
@@ -286,8 +244,6 @@
|
||||
<cmdsynopsis>
|
||||
<command>shorewall[-lite]</command>
|
||||
|
||||
<arg choice="opt"><option>trace</option>|<option>debug</option></arg>
|
||||
|
||||
<arg>options</arg>
|
||||
|
||||
<arg choice="plain"><option>ipcalc</option></arg>
|
||||
@@ -304,8 +260,6 @@
|
||||
<cmdsynopsis>
|
||||
<command>shorewall[-lite]</command>
|
||||
|
||||
<arg choice="opt"><option>trace</option>|<option>debug</option></arg>
|
||||
|
||||
<arg>options</arg>
|
||||
|
||||
<arg choice="plain"><option>iprange</option></arg>
|
||||
@@ -317,8 +271,6 @@
|
||||
<cmdsynopsis>
|
||||
<command>shorewall[6][-lite]</command>
|
||||
|
||||
<arg choice="opt"><option>trace</option>|<option>debug</option></arg>
|
||||
|
||||
<arg>options</arg>
|
||||
|
||||
<arg choice="plain"><option>iptrace</option></arg>
|
||||
@@ -330,9 +282,6 @@
|
||||
<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>logdrop</option></arg>
|
||||
@@ -343,8 +292,6 @@
|
||||
<cmdsynopsis>
|
||||
<command>shorewall[6][-lite]</command>
|
||||
|
||||
<arg choice="opt"><option>trace</option>|<option>debug</option></arg>
|
||||
|
||||
<arg>options</arg>
|
||||
|
||||
<arg choice="plain"><option>logwatch</option></arg>
|
||||
@@ -357,9 +304,6 @@
|
||||
<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>logreject</option></arg>
|
||||
@@ -370,8 +314,6 @@
|
||||
<cmdsynopsis>
|
||||
<command>shorewall[6][-lite]</command>
|
||||
|
||||
<arg choice="opt"><option>trace</option>|<option>debug</option></arg>
|
||||
|
||||
<arg>options</arg>
|
||||
|
||||
<arg choice="plain"><option>noiptrace</option></arg>
|
||||
@@ -394,9 +336,6 @@
|
||||
<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>reenable</option></arg>
|
||||
@@ -408,9 +347,6 @@
|
||||
<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>reject</option></arg>
|
||||
@@ -421,9 +357,6 @@
|
||||
<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>
|
||||
@@ -448,10 +381,6 @@
|
||||
<cmdsynopsis>
|
||||
<command>shorewall[6]</command>
|
||||
|
||||
<arg choice="opt"><option>trace</option>|<option>debug</option></arg>
|
||||
|
||||
<arg>options</arg>
|
||||
|
||||
<arg choice="plain"><option>remote-getcaps</option></arg>
|
||||
|
||||
<arg><option>-s</option></arg>
|
||||
@@ -472,8 +401,6 @@
|
||||
<cmdsynopsis>
|
||||
<command>shorewall[6]</command>
|
||||
|
||||
<arg choice="opt"><option>trace</option>|<option>debug</option></arg>
|
||||
|
||||
<arg>options</arg>
|
||||
|
||||
<arg choice="plain"><option>remote-getrc</option></arg>
|
||||
@@ -496,8 +423,6 @@
|
||||
<cmdsynopsis>
|
||||
<command>shorewall[6]</command>
|
||||
|
||||
<arg choice="opt"><option>trace</option>|<option>debug</option></arg>
|
||||
|
||||
<arg>options</arg>
|
||||
|
||||
<arg choice="plain"><option>remote-start</option></arg>
|
||||
@@ -520,8 +445,6 @@
|
||||
<cmdsynopsis>
|
||||
<command>shorewall[6]</command>
|
||||
|
||||
<arg choice="opt"><option>trace</option>|<option>debug</option></arg>
|
||||
|
||||
<arg>options</arg>
|
||||
|
||||
<arg choice="plain"><option>remote-reload</option></arg>
|
||||
@@ -544,8 +467,6 @@
|
||||
<cmdsynopsis>
|
||||
<command>shorewall[6]</command>
|
||||
|
||||
<arg choice="opt"><option>trace</option>|<option>debug</option></arg>
|
||||
|
||||
<arg>options</arg>
|
||||
|
||||
<arg choice="plain"><option>remote-restart</option></arg>
|
||||
@@ -568,9 +489,6 @@
|
||||
<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
|
||||
@@ -581,9 +499,6 @@
|
||||
<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>restart</option></arg>
|
||||
@@ -608,9 +523,6 @@
|
||||
<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
|
||||
@@ -622,9 +534,6 @@
|
||||
<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>run</option></arg>
|
||||
@@ -637,9 +546,6 @@
|
||||
<cmdsynopsis>
|
||||
<command>shorewall[6]</command>
|
||||
|
||||
<arg
|
||||
choice="opt"><option>trace</option>|<option>debug</option><arg><option>nolock</option></arg></arg>
|
||||
|
||||
<arg>options</arg>
|
||||
|
||||
<arg choice="plain"><option>safe-restart</option></arg>
|
||||
@@ -656,8 +562,6 @@
|
||||
<cmdsynopsis>
|
||||
<command>shorewall[6]</command>
|
||||
|
||||
<arg choice="opt"><option>trace</option>|<option>debug</option></arg>
|
||||
|
||||
<arg>options</arg>
|
||||
|
||||
<arg choice="plain"><option>safe-start</option></arg>
|
||||
@@ -674,9 +578,6 @@
|
||||
<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
|
||||
@@ -688,9 +589,6 @@
|
||||
<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>savesets</option></arg>
|
||||
@@ -699,8 +597,6 @@
|
||||
<cmdsynopsis>
|
||||
<command>shorewall[6][-lite]</command>
|
||||
|
||||
<arg choice="opt"><option>trace</option>|<option>debug</option></arg>
|
||||
|
||||
<arg>options</arg>
|
||||
|
||||
<arg choice="req"><option>show | list | ls </option></arg>
|
||||
@@ -713,8 +609,6 @@
|
||||
<cmdsynopsis>
|
||||
<command>shorewall[6][-lite]</command>
|
||||
|
||||
<arg choice="opt"><option>trace</option>|<option>debug</option></arg>
|
||||
|
||||
<arg>options</arg>
|
||||
|
||||
<arg choice="req"><option>show | list | ls </option></arg>
|
||||
@@ -735,8 +629,6 @@
|
||||
<cmdsynopsis>
|
||||
<command>shorewall[6][-lite]</command>
|
||||
|
||||
<arg choice="opt"><option>trace</option>|<option>debug</option></arg>
|
||||
|
||||
<arg>options</arg>
|
||||
|
||||
<arg choice="req"><option>show | list | ls </option></arg>
|
||||
@@ -761,8 +653,6 @@
|
||||
<cmdsynopsis>
|
||||
<command>shorewall[6]</command>
|
||||
|
||||
<arg choice="opt"><option>trace</option>|<option>debug</option></arg>
|
||||
|
||||
<arg>options</arg>
|
||||
|
||||
<arg choice="req"><option>show | list | ls </option></arg>
|
||||
@@ -774,8 +664,6 @@
|
||||
<cmdsynopsis>
|
||||
<command>shorewall[6][-lite]</command>
|
||||
|
||||
<arg choice="opt"><option>trace</option>|<option>debug</option></arg>
|
||||
|
||||
<arg>options</arg>
|
||||
|
||||
<arg choice="req"><option>show | list | ls </option></arg>
|
||||
@@ -787,8 +675,6 @@
|
||||
<cmdsynopsis>
|
||||
<command>shorewall[6][-lite]</command>
|
||||
|
||||
<arg choice="opt"><option>trace</option>|<option>debug</option></arg>
|
||||
|
||||
<arg>options</arg>
|
||||
|
||||
<arg choice="req"><option>show | list | ls </option></arg>
|
||||
@@ -800,8 +686,6 @@
|
||||
<cmdsynopsis>
|
||||
<command>shorewall[6][-lite]</command>
|
||||
|
||||
<arg choice="opt"><option>trace</option>|<option>debug</option></arg>
|
||||
|
||||
<arg>options</arg>
|
||||
|
||||
<arg choice="req"><option>show | list | ls </option></arg>
|
||||
@@ -814,8 +698,6 @@
|
||||
<cmdsynopsis>
|
||||
<command>shorewall[6]</command>
|
||||
|
||||
<arg choice="opt"><option>trace</option>|<option>debug</option></arg>
|
||||
|
||||
<arg>options</arg>
|
||||
|
||||
<arg choice="req"><option>show | list | ls </option></arg>
|
||||
@@ -827,8 +709,6 @@
|
||||
<cmdsynopsis>
|
||||
<command>shorewall[6][-lite]</command>
|
||||
|
||||
<arg choice="opt"><option>trace</option>|<option>debug</option></arg>
|
||||
|
||||
<arg>options</arg>
|
||||
|
||||
<arg choice="req"><option>show | list | ls </option></arg>
|
||||
@@ -841,8 +721,6 @@
|
||||
<cmdsynopsis>
|
||||
<command>shorewall[6][-lite]</command>
|
||||
|
||||
<arg choice="opt"><option>trace</option>|<option>debug</option></arg>
|
||||
|
||||
<arg>options</arg>
|
||||
|
||||
<arg choice="req"><option>show | list | ls </option></arg>
|
||||
@@ -853,8 +731,6 @@
|
||||
<cmdsynopsis>
|
||||
<command>shorewall[6][-lite]</command>
|
||||
|
||||
<arg choice="opt"><option>trace</option>|<option>debug</option></arg>
|
||||
|
||||
<arg>options</arg>
|
||||
|
||||
<arg choice="req"><option>show | list | ls </option></arg>
|
||||
@@ -867,8 +743,7 @@
|
||||
<cmdsynopsis>
|
||||
<command>shorewall[6][-lite]</command>
|
||||
|
||||
<arg
|
||||
choice="opt"><option>trace</option>|<option>debug</option><arg><option>nolock</option></arg></arg>
|
||||
<arg choice="opt"><option>trace</option>|<option>debug</option></arg>
|
||||
|
||||
<arg>options</arg>
|
||||
|
||||
@@ -892,9 +767,6 @@
|
||||
<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
|
||||
@@ -904,8 +776,6 @@
|
||||
<cmdsynopsis>
|
||||
<command>shorewall[6][-lite]</command>
|
||||
|
||||
<arg choice="opt"><option>trace</option>|<option>debug</option></arg>
|
||||
|
||||
<arg>options</arg>
|
||||
|
||||
<arg choice="plain"><arg
|
||||
@@ -915,9 +785,6 @@
|
||||
<cmdsynopsis>
|
||||
<command>shorewall[6]</command>
|
||||
|
||||
<arg
|
||||
choice="opt"><option>trace</option>|<option>debug</option><arg><option>nolock</option></arg></arg>
|
||||
|
||||
<arg>options</arg>
|
||||
|
||||
<arg choice="plain"><option>try</option></arg>
|
||||
@@ -930,8 +797,6 @@
|
||||
<cmdsynopsis>
|
||||
<command>shorewall[6]</command>
|
||||
|
||||
<arg choice="opt"><option>trace</option>|<option>debug</option></arg>
|
||||
|
||||
<arg>options</arg>
|
||||
|
||||
<arg choice="plain"><option>update</option></arg>
|
||||
@@ -956,8 +821,6 @@
|
||||
<cmdsynopsis>
|
||||
<command>shorewall[6][-lite]</command>
|
||||
|
||||
<arg choice="opt"><option>trace</option>|<option>debug</option></arg>
|
||||
|
||||
<arg>options</arg>
|
||||
|
||||
<arg
|
||||
@@ -1025,16 +888,7 @@
|
||||
<refsect1>
|
||||
<title>Options</title>
|
||||
|
||||
<para>The <option>trace</option> and <option>debug</option> options are
|
||||
used for debugging. See <ulink
|
||||
url="/starting_and_stopping_shorewall.htm#Trace">http://www.shorewall.net/starting_and_stopping_shorewall.htm#Trace</ulink>.</para>
|
||||
|
||||
<para>The <option>nolock</option> option prevents the command from
|
||||
attempting to acquire the Shorewall lockfile. It is useful if you need to
|
||||
include <command>shorewall</command> commands in
|
||||
<filename>/etc/shorewall/started</filename>.</para>
|
||||
|
||||
<para>Other <replaceable>options</replaceable> are:</para>
|
||||
<para>The <replaceable>options</replaceable> are:</para>
|
||||
|
||||
<variablelist>
|
||||
<varlistentry>
|
||||
@@ -1141,7 +995,7 @@
|
||||
setting in <ulink
|
||||
url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5)
|
||||
(<ulink
|
||||
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5)).</para>
|
||||
url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5)).</para>
|
||||
|
||||
<para>When no <replaceable>verbosity</replaceable> is specified,
|
||||
each instance of this option causes 1 to be added to the effective
|
||||
@@ -1162,7 +1016,7 @@
|
||||
setting in <ulink
|
||||
url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5)
|
||||
(<ulink
|
||||
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5)).</para>
|
||||
url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5)).</para>
|
||||
|
||||
<para>Each instance of this option causes 1 to be subtracted from
|
||||
the effective verbosity.</para>
|
||||
@@ -1176,7 +1030,66 @@
|
||||
<para>Causes all progress messages to be timestamped.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-T</term>
|
||||
|
||||
<listitem>
|
||||
<para>Added in Shorewall 5.2.4 to replace the earlier
|
||||
<command>trace</command> keyword.. If the command invokes the
|
||||
generated firewall script, the script's execution will be traced to
|
||||
standard error.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
<varlistentry>
|
||||
<term>-D</term>
|
||||
|
||||
<listitem>
|
||||
<para>Added in Shorewall 5.2.4 to replace the earlier debug keyword.
|
||||
If the command invokes the generated firewall script, individual
|
||||
invocations of the ip[6]tables utility will be used to configure the
|
||||
ruleset rather than ip[6]tables-restore. This is useful for
|
||||
diagnosing ip[6]tables-restore failures on a *COMMIT command.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
</variablelist>
|
||||
|
||||
<note>
|
||||
<para>Prior to Shorewall 5.2.4, the general syntax for a CLI command
|
||||
was:</para>
|
||||
|
||||
<cmdsynopsis>
|
||||
<arg><option>trace|debug</option></arg>
|
||||
|
||||
<arg><option>nolock</option></arg>
|
||||
|
||||
<arg><replaceable>options</replaceable></arg>
|
||||
|
||||
<arg choice="plain"><replaceable>command</replaceable></arg>
|
||||
|
||||
<arg><replaceable>command-options</replaceable></arg>
|
||||
|
||||
<arg><replaceable>command-arguments</replaceable></arg>
|
||||
</cmdsynopsis>
|
||||
|
||||
<para>Examples:</para>
|
||||
|
||||
<programlisting> shorewall debug -tv2 reload
|
||||
shorewall trace check
|
||||
shorewall nolock enable eth0</programlisting>
|
||||
|
||||
<para>In Shorewall 5.2.4 and later, those commands would be:</para>
|
||||
|
||||
<programlisting> shorewall -Dtv2 reload
|
||||
shorewall check -D
|
||||
shorewall -N enable eth0</programlisting>
|
||||
|
||||
<para>While not shown in the command synopses at the top of this page,
|
||||
the <option>nolock</option> keyword is still supported in Shorewall
|
||||
5.2.4 and later, but is deprecated in favor of the -<option>N
|
||||
</option>option.</para>
|
||||
</note>
|
||||
</refsect1>
|
||||
|
||||
<refsect1>
|
||||
@@ -1199,7 +1112,7 @@
|
||||
defined in the <ulink
|
||||
url="/manpages/shorewall-interfaces.html">shorewall-interfaces</ulink>(5)
|
||||
(<ulink
|
||||
url="/manpages6/shorewall6-interfaces.html">shorewall6-interfaces</ulink>(5))file.
|
||||
url="/manpages/shorewall-interfaces.html">shorewall6-interfaces</ulink>(5))file.
|
||||
A <emphasis>host-list</emphasis> is comma-separated list whose
|
||||
elements are host or network addresses.<caution>
|
||||
<para>The <command>add</command> command is not very robust. If
|
||||
@@ -1214,11 +1127,12 @@
|
||||
<para>Beginning with Shorewall 4.5.9, the <emphasis
|
||||
role="bold">dynamic_shared</emphasis> zone option (<ulink
|
||||
url="/manpages/shorewall-zones.html">shorewall-zones</ulink>(5),<ulink
|
||||
url="???">shorewall6-zones</ulink>(5)) allows a single ipset to
|
||||
handle entries for multiple interfaces. When that option is
|
||||
specified for a zone, the <command>add</command> command has the
|
||||
alternative syntax in which the <replaceable>zone</replaceable> name
|
||||
precedes the <replaceable>host-list</replaceable>.</para>
|
||||
url="/manpages/shorewall-zones.html">shorewall6-zones</ulink>(5))
|
||||
allows a single ipset to handle entries for multiple interfaces.
|
||||
When that option is specified for a zone, the <command>add</command>
|
||||
command has the alternative syntax in which the
|
||||
<replaceable>zone</replaceable> name precedes the
|
||||
<replaceable>host-list</replaceable>.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
@@ -1294,7 +1208,7 @@
|
||||
<term><emphasis role="bold">check</emphasis> [-<option>e</option>]
|
||||
[-<option>d</option>] [-<option>p</option>] [-<option>r</option>]
|
||||
[-<option>T</option>] [-<option>i</option>]
|
||||
[<replaceable>directory</replaceable>]</term>
|
||||
[-D][<replaceable>directory</replaceable>]</term>
|
||||
|
||||
<listitem>
|
||||
<para>Not available with Shorewall[6]-lite.</para>
|
||||
@@ -1332,7 +1246,11 @@
|
||||
set to Yes in <ulink
|
||||
url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5)
|
||||
(<ulink
|
||||
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5)).</para>
|
||||
url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5)).</para>
|
||||
|
||||
<para>The <emphasis role="bold">-D </emphasis>option was added in
|
||||
Shoewall 5.2.4 and causes the compiler to write a large amount of
|
||||
debugging information to standard output.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
@@ -1383,8 +1301,9 @@
|
||||
<varlistentry>
|
||||
<term><emphasis role="bold">compile </emphasis>[-<option>e</option>]
|
||||
[-<option>c</option>] [-<option>d</option>] [-<option>p</option>]
|
||||
[-<option>T</option>] [-<option>i</option>] [<replaceable> directory
|
||||
</replaceable>] [<replaceable> pathname</replaceable> ]</term>
|
||||
[-<option>T</option>] [-<option>i</option>] [-D] [<replaceable>
|
||||
directory </replaceable>] [<replaceable> pathname</replaceable>
|
||||
]</term>
|
||||
|
||||
<listitem>
|
||||
<para>Not available with shorewall[6]-lite.</para>
|
||||
@@ -1440,7 +1359,11 @@
|
||||
set to Yes in <ulink
|
||||
url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5)
|
||||
(<ulink
|
||||
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5)).</para>
|
||||
url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5)).</para>
|
||||
|
||||
<para>The <emphasis role="bold">-D </emphasis>option was added in
|
||||
Shoewall 5.2.4 and causes the compiler to write a large amount of
|
||||
debugging information to standard output.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
@@ -1458,7 +1381,7 @@
|
||||
defined in the <ulink
|
||||
url="/manpages/shorewall-interfaces.html">shorewall-interfaces</ulink>(5)
|
||||
(<ulink
|
||||
url="/manpages6/shorewall6-interfaces.html">shorewall6-interfaces</ulink>(5)
|
||||
url="/manpages/shorewall-interfaces.html">shorewall6-interfaces</ulink>(5)
|
||||
file. A <emphasis>host-list</emphasis> is comma-separated list whose
|
||||
elements are a host or network address.</para>
|
||||
|
||||
@@ -1466,7 +1389,7 @@
|
||||
role="bold">dynamic_shared</emphasis> zone option (<ulink
|
||||
url="/manpages/shorewall-zones.html">shorewall-zones</ulink>(5),
|
||||
<ulink
|
||||
url="/manpages6/shorewall6-zones.html">shorewall6-zones</ulink>(5))
|
||||
url="/manpages/shorewall-zones.html">shorewall6-zones</ulink>(5))
|
||||
allows a single ipset to handle entries for multiple interfaces.
|
||||
When that option is specified for a zone, the
|
||||
<command>delete</command> command has the alternative syntax in
|
||||
@@ -1493,7 +1416,7 @@
|
||||
command removes any routes added from <ulink
|
||||
url="/manpages/shorewall-routes.html">shorewall-routes</ulink>(5)
|
||||
(<ulink
|
||||
url="/manpages/shorewall6-routes.html">shorewall6-routes</ulink>(5))and
|
||||
url="/manpages/shorewall-routes.html">shorewall6-routes</ulink>(5))and
|
||||
any traffic shaping configuration for the interface.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -1554,7 +1477,7 @@
|
||||
adds any route specified in <ulink
|
||||
url="/manpages/shorewall-routes.html">shorewall-routes</ulink>(5)
|
||||
(<ulink
|
||||
url="/manpages/shorewall6-routes.html">shorewall6-routes</ulink>(5))
|
||||
url="/manpages/shorewall-routes.html">shorewall6-routes</ulink>(5))
|
||||
and installs the interface's traffic shaping configuration, if
|
||||
any.</para>
|
||||
</listitem>
|
||||
@@ -1599,7 +1522,7 @@
|
||||
given then the file specified by RESTOREFILE in <ulink
|
||||
url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5)
|
||||
(<ulink
|
||||
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5)) is
|
||||
url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5)) is
|
||||
assumed.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
@@ -1684,7 +1607,7 @@
|
||||
specified by the BLACKLIST_LOGLEVEL setting in <ulink
|
||||
url="/manpages/shorewall.conf.html">shorewall.conf</ulink> (5)
|
||||
(<ulink
|
||||
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5)).
|
||||
url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5)).
|
||||
This command requires that the firewall be in the started state and
|
||||
that DYNAMIC_BLACKLIST=Yes in <ulink
|
||||
url="/manpages/shorewall.conf.html">shorewall.conf
|
||||
@@ -1700,16 +1623,16 @@
|
||||
<para>Monitors the log file specified by the LOGFILE option in
|
||||
<ulink url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5)
|
||||
(<ulink
|
||||
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5))
|
||||
and produces an audible alarm when new Shorewall messages are
|
||||
logged. The <emphasis role="bold">-m</emphasis> option causes the
|
||||
MAC address of each packet source to be displayed if that
|
||||
information is available. The
|
||||
<replaceable>refresh-interval</replaceable> specifies the time in
|
||||
seconds between screen refreshes. You can enter a negative number by
|
||||
preceding the number with "--" (e.g., <command>shorewall logwatch --
|
||||
-30</command>). In this case, when a packet count changes, you will
|
||||
be prompted to hit any key to resume screen refreshes.</para>
|
||||
url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5)) and
|
||||
produces an audible alarm when new Shorewall messages are logged.
|
||||
The <emphasis role="bold">-m</emphasis> option causes the MAC
|
||||
address of each packet source to be displayed if that information is
|
||||
available. The <replaceable>refresh-interval</replaceable> specifies
|
||||
the time in seconds between screen refreshes. You can enter a
|
||||
negative number by preceding the number with "--" (e.g.,
|
||||
<command>shorewall logwatch -- -30</command>). In this case, when a
|
||||
packet count changes, you will be prompted to hit any key to resume
|
||||
screen refreshes.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
@@ -1723,7 +1646,7 @@
|
||||
specified by the BLACKLIST_LOGLEVEL setting in <ulink
|
||||
url="/manpages/shorewall.conf.html">shorewall.conf</ulink> (5),
|
||||
(<ulink
|
||||
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5)).
|
||||
url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5)).
|
||||
This command requires that the firewall be in the started state and
|
||||
that DYNAMIC_BLACKLIST=Yes in <ulink
|
||||
url="/manpages/shorewall.conf.html">shorewall.conf
|
||||
@@ -1824,7 +1747,8 @@
|
||||
<term><emphasis role="bold">reload </emphasis>[-<option>n</option>]
|
||||
[-<option>p</option>] [-<option>d</option>] [-<option>f</option>]
|
||||
[-<option>c</option>] [-<option>T</option>] [-<option>i</option>]
|
||||
[-<option>C</option>] [ <replaceable>directory</replaceable> ]</term>
|
||||
[-<option>C</option>] [-D] [ <replaceable>directory</replaceable>
|
||||
]</term>
|
||||
|
||||
<listitem>
|
||||
<para>This command was re-implemented in Shorewall 5.0.0. The
|
||||
@@ -1878,17 +1802,21 @@
|
||||
INLINE_MATCHES is set to Yes in <ulink
|
||||
url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5)
|
||||
(<ulink
|
||||
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5))..</para>
|
||||
url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5))..</para>
|
||||
|
||||
<para>The <option>-C</option> option was added in Shorewall
|
||||
4.6.5 and is only meaningful when AUTOMAKE=Yes in <ulink
|
||||
url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5)
|
||||
(<ulink
|
||||
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5)).
|
||||
url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5)).
|
||||
If an existing firewall script is used and if that script was
|
||||
the one that generated the current running configuration, then
|
||||
the running netfilter configuration will be reloaded as is so
|
||||
as to preserve the iptables packet and byte counters.</para>
|
||||
|
||||
<para>The <emphasis role="bold">-D </emphasis>option was added
|
||||
in Shoewall 5.2.4 and causes the compiler to write a large
|
||||
amount of debugging information to standard output.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
@@ -2006,7 +1934,7 @@
|
||||
<replaceable>system</replaceable> is omitted, then the FIREWALL
|
||||
option setting in <ulink
|
||||
url="shorewall.conf.html">shorewall.conf</ulink>(5) (<ulink
|
||||
url="/manpages6/shorewall6.conf.html">shorewall6.conf(5)</ulink>) is
|
||||
url="/manpages/shorewall.conf.html">shorewall6.conf(5)</ulink>) is
|
||||
assumed. In that case, if you want to specify a
|
||||
<replaceable>directory</replaceable>, then the <option>-D</option>
|
||||
option must be given.</para>
|
||||
@@ -2071,8 +1999,9 @@
|
||||
Beginning with Shorewall 5.0.13, if
|
||||
<replaceable>system</replaceable> is omitted, then the FIREWALL
|
||||
option setting in <ulink
|
||||
url="shorewall6.conf.html">shorewall6.conf(5)</ulink> (<ulink
|
||||
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5)) is
|
||||
url="/manpages/shorewall.conf.html">shorewall6.conf(5)</ulink>
|
||||
(<ulink
|
||||
url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5)) is
|
||||
assumed. In that case, if you want to specify a
|
||||
<replaceable>directory</replaceable>, then the <option>-D</option>
|
||||
option must be given.</para>
|
||||
@@ -2104,7 +2033,7 @@
|
||||
set to Yes in <ulink
|
||||
url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5)
|
||||
(<ulink
|
||||
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5)).</para>
|
||||
url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5)).</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
@@ -2144,8 +2073,9 @@
|
||||
Beginning with Shorewall 5.0.13, if
|
||||
<replaceable>system</replaceable> is omitted, then the FIREWALL
|
||||
option setting in <ulink
|
||||
url="shorewall6.conf.html">shorewall6.conf(5)</ulink> (<ulink
|
||||
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5)) is
|
||||
url="/manpages/shorewall.conf.html">shorewall6.conf(5)</ulink>
|
||||
(<ulink
|
||||
url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5)) is
|
||||
assumed. In that case, if you want to specify a
|
||||
<replaceable>directory</replaceable>, then the <option>-D</option>
|
||||
option must be given.</para>
|
||||
@@ -2177,7 +2107,11 @@
|
||||
set to Yes in <ulink
|
||||
url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5)
|
||||
(<ulink
|
||||
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5).</para>
|
||||
url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5).</para>
|
||||
|
||||
<para>The <emphasis role="bold">-D </emphasis>option was added in
|
||||
Shoewall 5.2.4 and causes the compiler to write a large amount of
|
||||
debugging information to standard output.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
@@ -2204,7 +2138,8 @@
|
||||
<term><emphasis role="bold">restart </emphasis>[-<option>n</option>]
|
||||
[-<option>p</option>] [-<option>d</option>] [-<option>f</option>]
|
||||
[-<option>c</option>] [-<option>T</option>] [-<option>i</option>]
|
||||
[-<option>C</option>] [ <replaceable>directory</replaceable> ]</term>
|
||||
[-<option>C</option>] [-D] [ <replaceable>directory</replaceable>
|
||||
]</term>
|
||||
|
||||
<listitem>
|
||||
<para>Beginning with Shorewall 5.0.0, this command performs a true
|
||||
@@ -2264,6 +2199,10 @@
|
||||
the one that generated the current running configuration, then
|
||||
the running netfilter configuration will be reloaded as is so
|
||||
as to preserve the iptables packet and byte counters.</para>
|
||||
|
||||
<para>The <emphasis role="bold">-D </emphasis>option was added
|
||||
in Shoewall 5.2.4 and causes the compiler to write a large
|
||||
amount of debugging information to standard output.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
@@ -2304,7 +2243,7 @@
|
||||
restored from the file specified by the RESTOREFILE option in <ulink
|
||||
url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5)
|
||||
(<ulink
|
||||
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5)).</para>
|
||||
url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5)).</para>
|
||||
|
||||
<caution>
|
||||
<para>If your iptables ruleset depends on variables that are
|
||||
@@ -2460,7 +2399,7 @@
|
||||
in the file specified by the RESTOREFILE option in <ulink
|
||||
url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5)
|
||||
(<ulink
|
||||
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5)).</para>
|
||||
url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5)).</para>
|
||||
|
||||
<para>The <option>-C</option> option, added in Shorewall 4.6.5,
|
||||
causes the iptables packet and byte counters to be saved along with
|
||||
@@ -2477,7 +2416,7 @@
|
||||
the SAVE_IPSETS option in <ulink
|
||||
url="/manpages/shorewall.conf.html">shorewall.conf</ulink> (5)
|
||||
(<ulink
|
||||
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5)).
|
||||
url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5)).
|
||||
This command may be used to proactively save your ipset contents in
|
||||
the event that a system failure occurs prior to issuing a
|
||||
<command>stop</command> command.</para>
|
||||
@@ -2645,7 +2584,7 @@
|
||||
accounting counters (<ulink
|
||||
url="/manpages/shorewall-accounting.html">shorewall-accounting</ulink>
|
||||
(5), <ulink
|
||||
url="/manpages6/shorewall6-accounting.html">shorewall6-accounting</ulink>(5)).</para>
|
||||
url="/manpages/shorewall-accounting.html">shorewall6-accounting</ulink>(5)).</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
@@ -2669,7 +2608,7 @@
|
||||
file specified by the LOGFILE option in <ulink
|
||||
url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5)
|
||||
(<ulink
|
||||
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5)).
|
||||
url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5)).
|
||||
The <emphasis role="bold">-m</emphasis> option causes the MAC
|
||||
address of each packet source to be displayed if that
|
||||
information is available.</para>
|
||||
@@ -2831,8 +2770,8 @@
|
||||
<term><emphasis role="bold">start </emphasis><emphasis role="bold">
|
||||
</emphasis>[-<option>n</option>] [-<option>p</option>]
|
||||
[-<option>d</option>] [-<option>f</option>] [-<option>c</option>]
|
||||
[-<option>T</option>] [-<option>i</option>] [-<option>C</option>] [
|
||||
<replaceable>directory</replaceable> ]</term>
|
||||
[-<option>T</option>] [-<option>i</option>] [-<option>C</option>] [-D]
|
||||
[ <replaceable>directory</replaceable> ]</term>
|
||||
|
||||
<listitem>
|
||||
<para><variablelist>
|
||||
@@ -2851,7 +2790,7 @@
|
||||
in <ulink
|
||||
url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5)
|
||||
(<ulink
|
||||
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5))
|
||||
url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5))
|
||||
will be restored if that saved configuration exists and has
|
||||
been modified more recently than the files in
|
||||
/etc/shorewall. When <emphasis role="bold">-f</emphasis> is
|
||||
@@ -2862,7 +2801,7 @@
|
||||
option was added to <ulink
|
||||
url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5)
|
||||
(<ulink
|
||||
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5)).
|
||||
url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5)).
|
||||
When LEGACY_FASTSTART=No, the modification times of files in
|
||||
/etc/shorewall are compared with that of
|
||||
/var/lib/shorewall/firewall (the compiled script that last
|
||||
@@ -2881,7 +2820,7 @@
|
||||
overriding the AUTOMAKE setting in <ulink
|
||||
url="/manpages/shorewall.conf.html">shorewall.conf</ulink>(5)
|
||||
(<ulink
|
||||
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5)).
|
||||
url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5)).
|
||||
When both <option>-f</option> and <option>-c</option>are
|
||||
present, the result is determined by the option that appears
|
||||
last.</para>
|
||||
@@ -2897,7 +2836,7 @@
|
||||
INLINE_MATCHES is set to Yes in <ulink
|
||||
url="/manpages/shorewall.conf.html">shorewall.conf(5)</ulink>
|
||||
(<ulink
|
||||
url="/manpages6/shorewall6.conf.html">shorewall6.conf</ulink>(5)).</para>
|
||||
url="/manpages/shorewall.conf.html">shorewall6.conf</ulink>(5)).</para>
|
||||
|
||||
<para>The <option>-C</option> option was added in Shorewall
|
||||
4.6.5 and is only meaningful when the <option>-f</option>
|
||||
@@ -2906,6 +2845,11 @@
|
||||
option was also specified in the <emphasis
|
||||
role="bold">save</emphasis> command, then the packet and
|
||||
byte counters will be restored.</para>
|
||||
|
||||
<para>The <emphasis role="bold">-D </emphasis>option was
|
||||
added in Shoewall 5.2.4 and causes the compiler to write a
|
||||
large amount of debugging information to standard
|
||||
output.</para>
|
||||
</listitem>
|
||||
</varlistentry>
|
||||
|
||||
@@ -3226,7 +3170,7 @@
|
||||
|
||||
<simplelist>
|
||||
<member><ulink
|
||||
url="/starting_and_stopping_shorewall.htm">http://www.shorewall.net/starting_and_stopping_shorewall.htm</ulink>
|
||||
url="/starting_and_stopping_shorewall.htm">http://www.shorewall.org/starting_and_stopping_shorewall.htm</ulink>
|
||||
- Describes operational aspects of Shorewall.</member>
|
||||
|
||||
<member><ulink url="shorewall-files.html">shorewall-files(5)</ulink> -
|
||||
|
@@ -5,7 +5,7 @@
|
||||
# (c) 1999,2000,2001,2002,2003,2004,2005,2006,2007,2008,2009,2010,2011,2014,2015-2017
|
||||
# Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Shorewall documentation is available at http://www.shorewall.net
|
||||
# Shorewall documentation is available at http://www.shorewall.org
|
||||
#
|
||||
# This program is part of Shorewall.
|
||||
#
|
||||
|
@@ -4,7 +4,7 @@
|
||||
#
|
||||
# (c) 2000-2016 - Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Shorewall documentation is available at http://www.shorewall.net
|
||||
# Shorewall documentation is available at http://www.shorewall.org
|
||||
#
|
||||
# This program is part of Shorewall.
|
||||
#
|
||||
|
@@ -6,7 +6,7 @@
|
||||
#
|
||||
# This file is installed in /usr/share/shorewall/wait4ifup
|
||||
#
|
||||
# Shorewall documentation is available at http://www.shorewall.net
|
||||
# Shorewall documentation is available at http://www.shorewall.org
|
||||
#
|
||||
# This program is part of Shorewall.
|
||||
#
|
||||
|
@@ -6,7 +6,7 @@
|
||||
#
|
||||
# (c) 2010,2013 - Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Shorewall documentation is available at http://shorewall.net
|
||||
# Shorewall documentation is available at http://shorewall.org
|
||||
#
|
||||
# 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
|
||||
|
@@ -6,7 +6,7 @@
|
||||
#
|
||||
# (c) 2010,2013 - Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Shorewall documentation is available at http://shorewall.net
|
||||
# Shorewall documentation is available at http://shorewall.org
|
||||
#
|
||||
# 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
|
||||
|
@@ -6,7 +6,7 @@
|
||||
#
|
||||
# (c) 2010,2013 - Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Shorewall documentation is available at http://shorewall.net
|
||||
# Shorewall documentation is available at http://shorewall.org
|
||||
#
|
||||
# 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
|
||||
|
@@ -8,7 +8,7 @@
|
||||
#
|
||||
# On most distributions, this file should be called /etc/init.d/shorewall.
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# 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
|
||||
|
@@ -7,7 +7,7 @@
|
||||
#
|
||||
# On most distributions, this file should be called /etc/init.d/shorewall.
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# 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
|
||||
|
@@ -5,7 +5,7 @@
|
||||
# (c) 2000-2016 - Tom Eastep (teastep@shorewall.net)
|
||||
# (c) 2010 - Roberto C. Sanchez (roberto@connexer.com)
|
||||
#
|
||||
# Shorewall documentation is available at http://shorewall.net
|
||||
# Shorewall documentation is available at http://shorewall.org
|
||||
#
|
||||
# This program is part of Shorewall.
|
||||
#
|
||||
|
@@ -6,7 +6,7 @@
|
||||
# On most distributions, this file should be called
|
||||
# /etc/init.d/shorewall.
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# This program is part of Shorewall.
|
||||
#
|
||||
|
1
Shorewall-lite/Shorewall-lite-targetname
Normal file
1
Shorewall-lite/Shorewall-lite-targetname
Normal file
@@ -0,0 +1 @@
|
||||
5.2.4-Beta1
|
@@ -7,7 +7,7 @@
|
||||
#
|
||||
# On most distributions, this file should be called /etc/init.d/shorewall.
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# This program is part of Shorewall.
|
||||
#
|
||||
|
@@ -7,7 +7,7 @@ RCDLINKS="2,S41 3,S41 6,K41"
|
||||
#
|
||||
# On most distributions, this file should be called /etc/init.d/shorewall.
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# This program is part of Shorewall.
|
||||
#
|
||||
|
@@ -8,7 +8,7 @@
|
||||
#
|
||||
# On most distributions, this file should be called /etc/init.d/shorewall.
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# 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
|
||||
|
@@ -4,7 +4,7 @@
|
||||
#
|
||||
# (c) 2000-2016 - Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Shorewall documentation is available at http://shorewall.net
|
||||
# Shorewall documentation is available at http://shorewall.org
|
||||
#
|
||||
# This program is part of Shorewall.
|
||||
#
|
||||
@@ -426,6 +426,11 @@ echo "Capability file builder installed in ${DESTDIR}${LIBEXECDIR}/$PRODUCT/shor
|
||||
if [ -f modules ]; then
|
||||
install_file modules ${DESTDIR}${SHAREDIR}/$PRODUCT/modules 0600
|
||||
echo "Modules file installed as ${DESTDIR}${SHAREDIR}/$PRODUCT/modules"
|
||||
|
||||
for f in modules.*; do
|
||||
install_file $f ${DESTDIR}${SHAREDIR}/$PRODUCT/$f 0644
|
||||
echo "Module file $f installed as ${DESTDIR}${SHAREDIR}/$PRODUCT/$f"
|
||||
done
|
||||
fi
|
||||
|
||||
if [ -f helpers ]; then
|
||||
@@ -433,11 +438,6 @@ if [ -f helpers ]; then
|
||||
echo "Helper modules file installed as ${DESTDIR}${SHAREDIR}/$PRODUCT/helpers"
|
||||
fi
|
||||
|
||||
for f in modules.*; do
|
||||
install_file $f ${DESTDIR}${SHAREDIR}/$PRODUCT/$f 0644
|
||||
echo "Module file $f installed as ${DESTDIR}${SHAREDIR}/$PRODUCT/$f"
|
||||
done
|
||||
|
||||
#
|
||||
# Install the Man Pages
|
||||
#
|
||||
|
@@ -3,7 +3,7 @@
|
||||
#
|
||||
# (c) 2011,2014 - Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# This program is part of Shorewall.
|
||||
#
|
||||
|
@@ -183,7 +183,7 @@
|
||||
<title>See ALSO</title>
|
||||
|
||||
<para><ulink
|
||||
url="http://www.shorewall.net/Documentation_Index.html">http://www.shorewall.net/Documentation_Index.html</ulink></para>
|
||||
url="http://www.shorewall.org/Documentation_Index.html">http://www.shorewall.org/Documentation_Index.html</ulink></para>
|
||||
|
||||
<para>shorewall-lite(8), shorewall-accounting(5), shorewall-actions(5),
|
||||
shorewall-blacklist(5), shorewall-hosts(5), shorewall-interfaces(5),
|
||||
|
@@ -8,7 +8,7 @@
|
||||
# "man shorewall-lite.conf"
|
||||
#
|
||||
# Manpage also online at
|
||||
# http://www.shorewall.net/manpages/shorewall-lite.conf.html
|
||||
# http://www.shorewall.org/manpages/shorewall-lite.conf.html
|
||||
###############################################################################
|
||||
# N 0 T E
|
||||
###############################################################################
|
||||
|
@@ -7,7 +7,7 @@
|
||||
#
|
||||
# (c) 2012-2017 Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# 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
|
||||
|
@@ -7,7 +7,7 @@
|
||||
#
|
||||
# (c) 2012-2017 Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# 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
|
||||
|
@@ -5,7 +5,7 @@
|
||||
#
|
||||
# (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# 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
|
||||
|
@@ -7,7 +7,7 @@
|
||||
#
|
||||
# (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# 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
|
||||
|
@@ -7,7 +7,7 @@
|
||||
#
|
||||
# (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# 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
|
||||
|
@@ -7,7 +7,7 @@
|
||||
#
|
||||
# (c) 2017 Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# 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
|
||||
|
@@ -27,7 +27,7 @@
|
||||
# the IP address that are older than <duration> seconds.
|
||||
# Disposition - Disposition for any event generated.
|
||||
#
|
||||
# For additional information, see http://www.shorewall.net/Events.html
|
||||
# For additional information, see http://www.shorewall.org/Events.html
|
||||
#
|
||||
###############################################################################
|
||||
# DO NOT REMOVE THE FOLLOWING LINE
|
||||
@@ -114,8 +114,6 @@ if ( ( $targets{$action} || 0 ) & NATRULE ) {
|
||||
|
||||
if ( $command & $RESET_CMD ) {
|
||||
require_capability 'MARK_ANYWHERE', '"reset"', 's';
|
||||
|
||||
print "Resetting....\n";
|
||||
|
||||
my $mark = $globals{EVENT_MARK};
|
||||
#
|
||||
|
@@ -6,7 +6,7 @@
|
||||
#
|
||||
# (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# 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
|
||||
|
@@ -5,7 +5,7 @@
|
||||
#
|
||||
# (c) 2017 Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# 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
|
||||
|
@@ -5,7 +5,7 @@
|
||||
#
|
||||
# (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# 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
|
||||
|
@@ -7,7 +7,7 @@
|
||||
#
|
||||
# (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# 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
|
||||
|
@@ -7,7 +7,7 @@
|
||||
#
|
||||
# (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# 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
|
||||
|
@@ -7,7 +7,7 @@
|
||||
#
|
||||
# (c) 2012-2017 Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# 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
|
||||
|
@@ -7,7 +7,7 @@
|
||||
#
|
||||
# (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# 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
|
||||
|
@@ -13,7 +13,7 @@
|
||||
# address (dst)
|
||||
# Disposition - Disposition for any rule generated.
|
||||
#
|
||||
# For additional information, see http://www.shorewall.net/Events.html
|
||||
# For additional information, see http://www.shorewall.org/Events.html
|
||||
#
|
||||
###############################################################################
|
||||
# DO NOT REMOVE THE FOLLOWING LINE
|
||||
|
@@ -13,7 +13,7 @@
|
||||
# address (dst)
|
||||
# Disposition - Disposition for any event generated.
|
||||
#
|
||||
# For additional information, see http://www.shorewall.net/Events.html
|
||||
# For additional information, see http://www.shorewall.org/Events.html
|
||||
#
|
||||
|
||||
DEFAULTS -,ACCEPT,src
|
||||
|
@@ -7,7 +7,7 @@
|
||||
#
|
||||
# (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# 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
|
||||
|
@@ -5,7 +5,7 @@
|
||||
#
|
||||
# (c) 2017 Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# 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
|
||||
|
@@ -5,7 +5,7 @@
|
||||
#
|
||||
# (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# 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
|
||||
|
@@ -5,7 +5,7 @@
|
||||
#
|
||||
# (c) 2017 Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# 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
|
||||
|
@@ -5,7 +5,7 @@
|
||||
#
|
||||
# (c) 2017 Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# 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
|
||||
|
@@ -5,7 +5,7 @@
|
||||
#
|
||||
# (c) 2017 Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# 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
|
||||
|
@@ -5,7 +5,7 @@
|
||||
#
|
||||
# (c) 2017 Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# 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
|
||||
|
@@ -7,7 +7,7 @@
|
||||
#
|
||||
# (c) 2011-2017 Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# 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
|
||||
|
@@ -5,7 +5,7 @@
|
||||
#
|
||||
# (c) 2017 Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# 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
|
||||
|
@@ -5,7 +5,7 @@
|
||||
#
|
||||
# (c) 2017 Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# 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
|
||||
|
@@ -5,7 +5,7 @@
|
||||
#
|
||||
# (c) 2017 Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# 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
|
||||
|
@@ -13,7 +13,7 @@
|
||||
# 2. Copy this file to /etc/shorewall/action.<action name>
|
||||
# 3. Add the desired rules to that file.
|
||||
#
|
||||
# Please see http://shorewall.net/Actions.html for additional
|
||||
# Please see http://shorewall.org/Actions.html for additional
|
||||
# information.
|
||||
#
|
||||
# Columns are the same as in /etc/shorewall/mangle.
|
||||
|
@@ -5,7 +5,7 @@
|
||||
#
|
||||
# (c) 2017 Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# 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
|
||||
|
@@ -13,7 +13,7 @@
|
||||
# 2. Copy this file to /etc/shorewall/action.<action name>
|
||||
# 3. Add the desired rules to that file.
|
||||
#
|
||||
# Please see http://shorewall.net/Actions.html for additional
|
||||
# Please see http://shorewall.org/Actions.html for additional
|
||||
# information.
|
||||
#
|
||||
# Columns are the same as in /etc/shorewall/rules.
|
||||
|
@@ -21,7 +21,7 @@
|
||||
# along with this program; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
#
|
||||
# For information about this script, see http://www.shorewall.net/MultiISP.html#swping.
|
||||
# For information about this script, see http://www.shorewall.org/MultiISP.html#swping.
|
||||
#
|
||||
###########################################################################################
|
||||
#
|
||||
|
@@ -7,7 +7,7 @@
|
||||
#
|
||||
# On most distributions, this file should be called /etc/init.d/shorewall.
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# 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
|
||||
|
@@ -18,7 +18,7 @@ Shoreline Firewall (Shorewall) Version 5
|
||||
|
||||
---------------------------------------------------------------------------
|
||||
|
||||
Please see http://www.shorewall.net/Install.htm for installation
|
||||
Please see http://www.shorewall.org/Install.htm for installation
|
||||
instructions.
|
||||
|
||||
|
||||
|
8
Shorewall/Macros/macro.BitcoinRegtest
Normal file
8
Shorewall/Macros/macro.BitcoinRegtest
Normal file
@@ -0,0 +1,8 @@
|
||||
#
|
||||
# Shorewall --/usr/share/shorewall/macro.BitcoinRegtest
|
||||
#
|
||||
# Macro for handling Bitcoin P2P traffic (Regtest mode)
|
||||
#
|
||||
##############################################################################################################################################################
|
||||
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER MARK CONNLIMIT TIME HEADERS SWITCH HELPER
|
||||
PARAM - - tcp 18444
|
8
Shorewall/Macros/macro.BitcoinTestnet
Normal file
8
Shorewall/Macros/macro.BitcoinTestnet
Normal file
@@ -0,0 +1,8 @@
|
||||
#
|
||||
# Shorewall --/usr/share/shorewall/macro.BitcoinTestnet
|
||||
#
|
||||
# Macro for handling Bitcoin P2P traffic (Testnet mode)
|
||||
#
|
||||
##############################################################################################################################################################
|
||||
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER MARK CONNLIMIT TIME HEADERS SWITCH HELPER
|
||||
PARAM - - tcp 18333
|
8
Shorewall/Macros/macro.BitcoinTestnetRPC
Normal file
8
Shorewall/Macros/macro.BitcoinTestnetRPC
Normal file
@@ -0,0 +1,8 @@
|
||||
#
|
||||
# Shorewall --/usr/share/shorewall/macro.BitcoinTestnetRPC
|
||||
#
|
||||
# Macro for handling Bitcoin RPC traffic (Testnet and Regtest mode)
|
||||
#
|
||||
##############################################################################################################################################################
|
||||
#ACTION SOURCE DEST PROTO DPORT SPORT ORIGDEST RATE USER MARK CONNLIMIT TIME HEADERS SWITCH HELPER
|
||||
PARAM - - tcp 18332
|
@@ -5,7 +5,7 @@
|
||||
#
|
||||
# (c) 2013 - Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# This program is part of Shorewall.
|
||||
#
|
||||
|
@@ -3,9 +3,9 @@
|
||||
#
|
||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||
#
|
||||
# (c) 2007-2017 - Tom Eastep (teastep@shorewall.net)
|
||||
# (c) 2007-2019 - Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# This program is part of Shorewall.
|
||||
#
|
||||
@@ -201,6 +201,13 @@ sub process_accounting_rule1( $$$$$$$$$$$ ) {
|
||||
my $prerule = '';
|
||||
my $rule2 = 0;
|
||||
my $jump = 0;
|
||||
my $raw_matches = get_inline_matches(1);
|
||||
|
||||
if ( $raw_matches =~ s/^\s*+// ) {
|
||||
$prerule = $raw_matches;
|
||||
} else {
|
||||
$rule .= $raw_matches;
|
||||
}
|
||||
|
||||
unless ( $action eq 'COUNT' ) {
|
||||
if ( $action eq 'DONE' ) {
|
||||
@@ -242,9 +249,7 @@ sub process_accounting_rule1( $$$$$$$$$$$ ) {
|
||||
$rule .= do_nfacct( $_ );
|
||||
}
|
||||
}
|
||||
} elsif ( $action eq 'INLINE' ) {
|
||||
$rule .= get_inline_matches(1);
|
||||
} else {
|
||||
} elsif ( $action ne 'INLINE' ) {
|
||||
( $action, my $cmd ) = split /:/, $action;
|
||||
|
||||
if ( $cmd ) {
|
||||
|
@@ -3,9 +3,9 @@
|
||||
#
|
||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||
#
|
||||
# (c) 2007-2018 - Tom Eastep (teastep@shorewall.net)
|
||||
# (c) 2007-2019 - Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# This program is part of Shorewall.
|
||||
#
|
||||
@@ -536,6 +536,9 @@ our $ipset_rules;
|
||||
#
|
||||
use constant { ALL_COMMANDS => 1, NOT_RESTORE => 2 };
|
||||
|
||||
#
|
||||
# Chain optimization flags
|
||||
#
|
||||
use constant { DONT_OPTIMIZE => 1 , DONT_DELETE => 2, DONT_MOVE => 4, RETURNS => 8, RETURNS_DONT_MOVE => 12 };
|
||||
|
||||
our %dscpmap = ( CS0 => 0x00,
|
||||
@@ -694,7 +697,7 @@ use constant { UNIQUE => 1, # Simple header matches - only allowed on
|
||||
CONTROL => 16, # Unsed internally by the compiler - does not contribute to the iptables rule
|
||||
COMPLEX => 32, # Currently means 'contrack --cstate'
|
||||
NFACCT => 64, # nfacct match
|
||||
EXPENSIVE => 128, # Has high rule-processing cost in the kernel
|
||||
EXPENSIVE => 128, # Has high match-processing cost in the kernel
|
||||
RECENT => 256, # recent match
|
||||
};
|
||||
|
||||
@@ -1140,16 +1143,30 @@ sub set_rule_option( $$$ ) {
|
||||
#
|
||||
# Consider each subtype as a separate type
|
||||
#
|
||||
my ( $invert, $subtype, $val, $rest ) = split ' ', $value;
|
||||
if ( have_capability( 'OLD_CONNTRACK_MATCH' ) ) {
|
||||
my ( $subtype, $invert, $val, $rest ) = split ' ', $value;
|
||||
|
||||
if ( $invert eq '!' ) {
|
||||
assert( ! supplied $rest );
|
||||
$option = join( ' ', $option, $invert, $subtype );
|
||||
$value = $val;
|
||||
if ( $invert eq '!' ) {
|
||||
assert( ! supplied $rest );
|
||||
$option = join( ' ', $option, $subtype );
|
||||
$value = join( ' ', $invert, $val );
|
||||
} else {
|
||||
assert( ! supplied $val );
|
||||
$option = join( ' ', $invert , $option );
|
||||
$value = $invert;
|
||||
}
|
||||
} else {
|
||||
assert( ! supplied $val );
|
||||
$option = join( ' ', $option, $invert );
|
||||
$value = $subtype;
|
||||
my ( $invert, $subtype, $val, $rest ) = split ' ', $value;
|
||||
|
||||
if ( $invert eq '!' ) {
|
||||
assert( ! supplied $rest );
|
||||
$option = join( ' ', $option, $invert, $subtype );
|
||||
$value = $val;
|
||||
} else {
|
||||
assert( ! supplied $val );
|
||||
$option = join( ' ', $option, $invert );
|
||||
$value = $subtype;
|
||||
}
|
||||
}
|
||||
|
||||
$opttype = EXCLUSIVE;
|
||||
@@ -1222,8 +1239,8 @@ sub transform_rule( $;\$ ) {
|
||||
$option = $2;
|
||||
} elsif ( $input =~ s/^(!\s+)?--([^\s]+)\s*// ) {
|
||||
$invert = '!' if $1;
|
||||
my $opt = $option = $2;
|
||||
fatal_error "Unrecognized iptables option ($opt}" unless $option = $aliases{$option};
|
||||
my $opt = $2;
|
||||
fatal_error "Unrecognized iptables option ($opt}" unless $option = $aliases{$opt};
|
||||
} else {
|
||||
fatal_error "Unrecognized iptables option string ($input)";
|
||||
}
|
||||
@@ -1422,7 +1439,7 @@ sub compatible( $$ ) {
|
||||
}
|
||||
}
|
||||
#
|
||||
# Don't combine chains where each specifies
|
||||
# Don't combine rules where each specifies
|
||||
# -m policy and the policies are different
|
||||
# or when one specifies
|
||||
# -m multiport
|
||||
@@ -3366,13 +3383,13 @@ sub initialize_chain_table($) {
|
||||
add_commands( $chainref, '[ -f ${VARDIR}/.nat_DOCKER ] && cat ${VARDIR}/.nat_DOCKER >&3' );
|
||||
$chainref = new_standard_chain( 'DOCKER-INGRESS' );
|
||||
set_optflags( $chainref, DONT_OPTIMIZE | DONT_DELETE | DONT_MOVE );
|
||||
add_commands( $chainref, '[ -f ${VARDIR}/.filter_DOCKER-INGRESS ] && cat ${VARDIR}/.filter_DOCKER-INGRESS >&3' );
|
||||
$chainref = new_standard_chain( 'DOCKER-USER' );
|
||||
add_commands( $chainref, '[ -f ${VARDIR}/.filter_DOCKER-INGRESS ] && cat ${VARDIR}/.filter_DOCKER-INGRESS >&3' );
|
||||
$chainref = new_standard_chain( 'DOCKER-USER' );
|
||||
set_optflags( $chainref, DONT_OPTIMIZE | DONT_DELETE | DONT_MOVE );
|
||||
add_commands( $chainref, '[ -f ${VARDIR}/.filter_DOCKER-USER ] && cat ${VARDIR}/.filter_DOCKER-USER >&3' );
|
||||
add_commands( $chainref, '[ -f ${VARDIR}/.filter_DOCKER-USER ] && cat ${VARDIR}/.filter_DOCKER-USER >&3' );
|
||||
$chainref = new_standard_chain( 'DOCKER-ISOLATION' );
|
||||
set_optflags( $chainref, DONT_OPTIMIZE | DONT_DELETE | DONT_MOVE );
|
||||
add_commands( $chainref, '[ -f ${VARDIR}/.filter_DOCKER-ISOLATION ] && cat ${VARDIR}/.filter_DOCKER-ISOLATION >&3' );
|
||||
add_commands( $chainref, '[ -f ${VARDIR}/.filter_DOCKER-ISOLATION ] && cat ${VARDIR}/.filter_DOCKER-ISOLATION >&3' );
|
||||
$chainref = new_standard_chain( 'DOCKER-ISOLATION-STAGE-1' );
|
||||
set_optflags( $chainref, DONT_OPTIMIZE | DONT_DELETE | DONT_MOVE );
|
||||
add_commands( $chainref, '[ -f ${VARDIR}/.filter_DOCKER-ISOLATION-STAGE-1 ] && cat ${VARDIR}/.filter_DOCKER-ISOLATION-STAGE-1 >&3' );
|
||||
@@ -4991,10 +5008,10 @@ sub do_proto( $$$;$ )
|
||||
|
||||
$invert = $sports =~ s/^!// ? '! ' : '';
|
||||
|
||||
if ( $ports =~ /^\+/ ) {
|
||||
if ( $sports =~ /^\+/ ) {
|
||||
$output .= $invert;
|
||||
$output .= '-m set ';
|
||||
$output .= get_set_flags( $ports, 'src' );
|
||||
$output .= get_set_flags( $sports, 'src' );
|
||||
} elsif ( $multiport ) {
|
||||
if ( port_count( $sports ) > 15 ) {
|
||||
if ( $restricted ) {
|
||||
@@ -5207,8 +5224,8 @@ sub do_iproto( $$$ )
|
||||
fatal_error "'=' in the SOURCE PORT(S) column requires one or more ports in the DEST PORT(S) column" if $sports eq '=';
|
||||
$invert = $sports =~ s/^!// ? '! ' : '';
|
||||
|
||||
if ( $ports =~ /^\+/ ) {
|
||||
push @output, set => ${invert} . get_set_flags( $ports, 'src' );
|
||||
if ( $sports =~ /^\+/ ) {
|
||||
push @output, set => ${invert} . get_set_flags( $sports, 'src' );
|
||||
} elsif ( $multiport ) {
|
||||
if ( port_count( $sports ) > 15 ) {
|
||||
if ( $restricted ) {
|
||||
@@ -5747,10 +5764,25 @@ sub validate_helper( $;$ ) {
|
||||
|
||||
my $protonum = -1;
|
||||
|
||||
fatal_error "Unknown PROTO ($proto)" unless defined ( $protonum = resolve_proto( $proto ) );
|
||||
fatal_error "Unknown PROTO ($proto)" unless $proto eq '-' || defined ( $protonum = resolve_proto( $proto ) );
|
||||
|
||||
unless ( $protonum == $helper_proto ) {
|
||||
fatal_error "The $helper_base helper requires PROTO=" . (proto_name $helper_proto );
|
||||
if ( reftype( $helper_proto ) ) {
|
||||
#
|
||||
# More than one protocol allowed with this helper, so $helper_proto is an array reference
|
||||
#
|
||||
my $found;
|
||||
my $names = '';
|
||||
|
||||
for ( @$helper_proto ) {
|
||||
$names = $names ? join( ',', $names, proto_name( $_ ) ) : proto_name( $_ );
|
||||
$found = 1 if $protonum == $_;
|
||||
}
|
||||
|
||||
fatal_error "The $helper_base helper requires PROTO to be one of '$names'" unless $found;
|
||||
} else {
|
||||
unless ( $protonum == $helper_proto ) {
|
||||
fatal_error "The $helper_base helper requires PROTO=" . (proto_name( $helper_proto ) );
|
||||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -7652,11 +7684,13 @@ sub isolate_source_interface( $ ) {
|
||||
) {
|
||||
$iiface = $1;
|
||||
$inets = $2;
|
||||
$inets =~ s/\]-\[/-/;
|
||||
} elsif ( $source =~ /:/ ) {
|
||||
if ( $source =~ /^\[(?:.+),\[(?:.+)\]$/ ){
|
||||
$inets = $source;
|
||||
} elsif ( $source =~ /^\[(.+)\]$/ ) {
|
||||
$inets = $1;
|
||||
$inets =~ s/\]-\[/-/;
|
||||
} else {
|
||||
$inets = $source;
|
||||
}
|
||||
@@ -7774,6 +7808,7 @@ sub isolate_dest_interface( $$$$ ) {
|
||||
if ( $dest =~ /^(.+?):(\[(?:.+),\[(?:.+)\])$/ ) {
|
||||
$diface = $1;
|
||||
$dnets = $2;
|
||||
$dnets =~ s/\]-\[/-/;
|
||||
} elsif ( $dest =~ /^(.+?):\[(.+)\]\s*$/ ||
|
||||
$dest =~ /^(.+?):(!?\+.+)$/ ||
|
||||
$dest =~ /^(.+?):(!?[&%].+)$/ ||
|
||||
@@ -7786,6 +7821,7 @@ sub isolate_dest_interface( $$$$ ) {
|
||||
$dnets = $dest;
|
||||
} elsif ( $dest =~ /^\[(.+)\]$/ ) {
|
||||
$dnets = $1;
|
||||
$dnets =~ s/\]-\[/-/;
|
||||
} else {
|
||||
$dnets = $dest;
|
||||
}
|
||||
@@ -8691,32 +8727,29 @@ sub emitr1( $$ ) {
|
||||
sub save_docker_rules($) {
|
||||
my $tool = $_[0];
|
||||
|
||||
my $bridge = $config{DOCKER_BRIDGE};
|
||||
|
||||
emit( qq(if [ -n "\$g_docker" ]; then),
|
||||
qq( $tool -t nat -S DOCKER | tail -n +2 > \${VARDIR}/.nat_DOCKER),
|
||||
qq( $tool -t nat -S OUTPUT | tail -n +2 | fgrep DOCKER > \${VARDIR}/.nat_OUTPUT),
|
||||
qq( $tool -t nat -S POSTROUTING | tail -n +2 | fgrep -v SHOREWALL > \${VARDIR}/.nat_POSTROUTING),
|
||||
qq( $tool -t nat -S POSTROUTING | tail -n +2 | fgrep -v SHOREWALL | fgrep -v LIBVIRT > \${VARDIR}/.nat_POSTROUTING),
|
||||
qq( $tool -t filter -S DOCKER | tail -n +2 > \${VARDIR}/.filter_DOCKER),
|
||||
qq( [ -n "\$g_dockeringress" ] && $tool -t filter -S DOCKER-INGRESS | tail -n +2 > \${VARDIR}/.filter_DOCKER-INGRESS),
|
||||
qq( [ -n "\$g_dockeruser" ] && $tool -t filter -S DOCKER-USER | tail -n +2 > \${VARDIR}/.filter_DOCKER-USER),
|
||||
qq( rm -f \${VARDIR}/.filter_DOCKER-*),
|
||||
qq( [ -n "\$g_dockeringress" ] && $tool -t filter -S DOCKER-INGRESS | tail -n +2 > \${VARDIR}/.filter_DOCKER-INGRESS),
|
||||
qq( [ -n "\$g_dockeruser" ] && $tool -t filter -S DOCKER-USER | tail -n +2 > \${VARDIR}/.filter_DOCKER-USER),
|
||||
qq( [ -n "\$g_dockeriso" ] && $tool -t filter -S DOCKER-ISOLATION | tail -n +2 > \${VARDIR}/.filter_DOCKER-ISOLATION),
|
||||
qq(),
|
||||
qq( case "\$g_dockernetwork" in),
|
||||
qq( One\)),
|
||||
qq( rm -f \${VARDIR}/.filter_DOCKER-ISOLATION*),
|
||||
qq( $tool -t filter -S DOCKER-ISOLATION | tail -n +2 > \${VARDIR}/.filter_DOCKER-ISOLATION),
|
||||
qq( ;;),
|
||||
qq( Two\)),
|
||||
qq( rm -f \${VARDIR}/.filter_DOCKER-ISOLATION*),
|
||||
qq( $tool -t filter -S DOCKER-ISOLATION-STAGE-1 | tail -n +2 > \${VARDIR}/.filter_DOCKER-ISOLATION-STAGE-1),
|
||||
qq( $tool -t filter -S DOCKER-ISOLATION-STAGE-2 | tail -n +2 > \${VARDIR}/.filter_DOCKER-ISOLATION-STAGE-2),
|
||||
qq( ;;),
|
||||
qq( esac),
|
||||
qq( if [ -n "\$g_dockerisostage" ]; then),
|
||||
qq( $tool -t filter -S DOCKER-ISOLATION-STAGE-1 | tail -n +2 > \${VARDIR}/.filter_DOCKER-ISOLATION-STAGE-1),
|
||||
qq( $tool -t filter -S DOCKER-ISOLATION-STAGE-2 | tail -n +2 > \${VARDIR}/.filter_DOCKER-ISOLATION-STAGE-2),
|
||||
qq( fi),
|
||||
qq(),
|
||||
);
|
||||
|
||||
if ( known_interface( 'docker0' ) ) {
|
||||
if ( known_interface( $bridge ) ) {
|
||||
emit( qq( $tool -t filter -S FORWARD | grep '^-A FORWARD.*[io] br-[a-z0-9]\\{12\\}' > \${VARDIR}/.filter_FORWARD) );
|
||||
} else {
|
||||
emit( qq( $tool -t filter -S FORWARD | egrep '^-A FORWARD.*[io] (docker0|br-[a-z0-9]{12})' > \${VARDIR}/.filter_FORWARD) );
|
||||
emit( qq( $tool -t filter -S FORWARD | egrep '^-A FORWARD.*[io] ($bridge|br-[a-z0-9]{12})' > \${VARDIR}/.filter_FORWARD) );
|
||||
}
|
||||
|
||||
emit( q( [ -s ${VARDIR}/.filter_FORWARD ] || rm -f ${VARDIR}/.filter_FORWARD),
|
||||
@@ -9230,10 +9263,10 @@ sub create_netfilter_load( $ ) {
|
||||
emit( '[ -n "$g_docker" ] && echo ":DOCKER - [0:0]" >&3' );
|
||||
} elsif ( $name eq 'DOCKER-ISOLATION' ) {
|
||||
ensure_cmd_mode;
|
||||
emit( '[ "$g_dockernetwork" = One ] && echo ":DOCKER-ISOLATION - [0:0]" >&3' );
|
||||
} elsif ( $name =~ /^DOCKER-ISOLATION-/ ) {
|
||||
emit( '[ -n "$g_dockeriso" ] && echo ":DOCKER-ISOLATION - [0:0]" >&3' );
|
||||
} elsif ( $name =~ /^DOCKER-ISOLATION/ ) {
|
||||
ensure_cmd_mode;
|
||||
emit( qq([ "\$g_dockernetwork" = Two ] && echo ":$name - [0:0]" >&3) );
|
||||
emit( qq([ -n "\$g_dockerisostage" ] && echo ":$name - [0:0]" >&3) );
|
||||
} elsif ( $name eq 'DOCKER-INGRESS' ) {
|
||||
ensure_cmd_mode;
|
||||
emit( '[ -n "$g_dockeringress" ] && echo ":DOCKER-INGRESS - [0:0]" >&3' );
|
||||
@@ -9345,11 +9378,11 @@ sub preview_netfilter_load() {
|
||||
print "\n";
|
||||
} elsif ( $name eq 'DOCKER-ISOLATION' ) {
|
||||
ensure_cmd_mode1;
|
||||
print( '[ "$g_dockernetwork" = One ] && echo ":DOCKER-ISOLATION - [0:0]" >&3' );
|
||||
print( '[ -n "$g_dockeriso" ] && echo ":DOCKER-ISOLATION - [0:0]" >&3' );
|
||||
print "\n";
|
||||
} elsif ( $name =~ /^DOCKER-ISOLATION-/ ) {
|
||||
} elsif ( $name =~ /^DOCKER-ISOLATION/ ) {
|
||||
ensure_cmd_mode1;
|
||||
print( qq([ "\$g_dockernetwork" = Two ] && echo ":$name - [0:0]" >&3) );
|
||||
print( qq([ "\$g_dockeisostage" ] && echo ":$name - [0:0]" >&3) );
|
||||
print "\n";
|
||||
} elsif ( $name eq 'DOCKER-INGRESS' ) {
|
||||
ensure_cmd_mode1;
|
||||
@@ -9446,10 +9479,10 @@ sub create_stop_load( $ ) {
|
||||
emit( '[ -n "$g_docker" ] && echo ":DOCKER - [0:0]" >&3' );
|
||||
} elsif ( $name eq 'DOCKER-ISOLATION' ) {
|
||||
ensure_cmd_mode;
|
||||
emit( '[ -n "$g_dockernetwork" ] && echo ":DOCKER-ISOLATION - [0:0]" >&3' );
|
||||
} elsif ( $name =~ /^DOCKER-ISOLATION-/ ) {
|
||||
emit( '[ -n "$g_dockeriso" ] && echo ":DOCKER-ISOLATION - [0:0]" >&3' );
|
||||
} elsif ( $name =~ /^DOCKER-ISOLATION/ ) {
|
||||
ensure_cmd_mode;
|
||||
emit( qq([ "\$g_dockernetwork" = Two ] && echo ":$name - [0:0]" >&3) );
|
||||
emit( qq([ -n "\$g_dockerisostage" ] && echo ":$name - [0:0]" >&3) );
|
||||
} elsif ( $name eq 'DOCKER-INGRESS' ) {
|
||||
ensure_cmd_mode;
|
||||
emit( '[ -n "$g_dockeringress" ] && echo ":DOCKER-INGRESS - [0:0]" >&3' );
|
||||
|
@@ -4,9 +4,9 @@
|
||||
#
|
||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||
#
|
||||
# (c) 2007-2018 - Tom Eastep (teastep@shorewall.net)
|
||||
# (c) 2007-2019 - Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# This program is part of Shorewall.
|
||||
#
|
||||
@@ -47,13 +47,13 @@ our @EXPORT = qw( compiler );
|
||||
our @EXPORT_OK = qw( $export );
|
||||
our $VERSION = 'MODULEVERSION';
|
||||
|
||||
our $export;
|
||||
our $export; # True when compiling for export
|
||||
|
||||
our $test;
|
||||
our $test; # True when running regression tests
|
||||
|
||||
our $family;
|
||||
our $family; # IP address family (4 or 6)
|
||||
|
||||
our $have_arptables;
|
||||
our $have_arptables; # True if we have arptables rules
|
||||
|
||||
#
|
||||
# Initilize the package-globals in the other modules
|
||||
@@ -268,13 +268,10 @@ sub generate_script_2() {
|
||||
emit( '',
|
||||
'chain_exists DOCKER nat && chain_exists DOCKER && g_docker=Yes',
|
||||
);
|
||||
emit( 'chain_exists DOCKER-INGRESS && g_dockeringress=Yes' );
|
||||
emit( 'chain_exists DOCKER-USER && g_dockeruser=Yes' );
|
||||
emit( 'if chain_exists DOCKER-ISOLATION; then',
|
||||
' g_dockernetwork=One',
|
||||
'elif chain_exists DOCKER-ISOLATION-STAGE-1; then',
|
||||
' g_dockernetwork=Two',
|
||||
'fi' );
|
||||
emit( 'chain_exists DOCKER-INGRESS && g_dockeringress=Yes' );
|
||||
emit( 'chain_exists DOCKER-USER && g_dockeruser=Yes' );
|
||||
emit( 'chain_exists DOCKER-ISOLATION && g_dockeriso=Yes' );
|
||||
emit( 'chain_exists DOCKER-ISOLATION-STAGE-1 && g_dockerisostage=Yes' );
|
||||
}
|
||||
|
||||
pop_indent;
|
||||
@@ -384,7 +381,7 @@ sub generate_script_3() {
|
||||
save_progress_message 'Initializing...';
|
||||
|
||||
if ( $export || $config{EXPORTMODULES} ) {
|
||||
my $fn = find_file( $config{LOAD_HELPERS_ONLY} ? 'helpers' : 'modules' );
|
||||
my $fn = find_file( 'helpers' );
|
||||
|
||||
if ( -f $fn && ( $config{EXPORTMODULES} || ( $export && ! $fn =~ "^$globals{SHAREDIR}/" ) ) ) {
|
||||
emit 'echo MODULESDIR=\"$MODULESDIR\" > ${VARDIR}/.modulesdir';
|
||||
|
@@ -3,9 +3,9 @@
|
||||
#
|
||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||
#
|
||||
# (c) 2007-2018 - Tom Eastep (teastep@shorewall.net)
|
||||
# (c) 2007-2019 - Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# This program is part of Shorewall.
|
||||
#
|
||||
@@ -162,6 +162,7 @@ our @EXPORT = qw(
|
||||
|
||||
have_capability
|
||||
require_capability
|
||||
require_mangle_capability
|
||||
report_used_capabilities
|
||||
kernel_version
|
||||
|
||||
@@ -396,7 +397,7 @@ our %renamed = ( AUTO_COMMENT => 'AUTOCOMMENT', BLACKLIST_LOGLEVEL => 'BLACKLIST
|
||||
#
|
||||
# Config options and global settings that are to be copied to output script
|
||||
#
|
||||
our @propagateconfig = qw/ DISABLE_IPV6 MODULESDIR LOAD_HELPERS_ONLY LOCKFILE SUBSYSLOCK LOG_VERBOSITY RESTART/;
|
||||
our @propagateconfig = qw/ DISABLE_IPV6 MODULESDIR LOCKFILE SUBSYSLOCK LOG_VERBOSITY RESTART/;
|
||||
#
|
||||
# From parsing the capabilities file or detecting capabilities
|
||||
#
|
||||
@@ -731,18 +732,19 @@ our %converted = (
|
||||
#
|
||||
# Eliminated options
|
||||
#
|
||||
our %eliminated = ( LOGRATE => 1,
|
||||
LOGBURST => 1,
|
||||
EXPORTPARAMS => 1,
|
||||
LEGACY_FASTSTART => 1,
|
||||
IPSECFILE => 1,
|
||||
WIDE_TC_MARKS => 1,
|
||||
HIGH_ROUTE_MARKS => 1,
|
||||
BLACKLISTNEWONLY => 1,
|
||||
CHAIN_SCRIPTS => 1,
|
||||
MODULE_SUFFIX => 1,
|
||||
MAPOLDACTIONS => 1,
|
||||
INLINE_MATCHES => 1,
|
||||
our %eliminated = ( LOGRATE => 1,
|
||||
LOGBURST => 1,
|
||||
EXPORTPARAMS => 1,
|
||||
LEGACY_FASTSTART => 1,
|
||||
IPSECFILE => 1,
|
||||
WIDE_TC_MARKS => 1,
|
||||
HIGH_ROUTE_MARKS => 1,
|
||||
BLACKLISTNEWONLY => 1,
|
||||
CHAIN_SCRIPTS => 1,
|
||||
MODULE_SUFFIX => 1,
|
||||
MAPOLDACTIONS => 1,
|
||||
INLINE_MATCHES => 1,
|
||||
LOAD_HELPERS_ONLY => 1,
|
||||
);
|
||||
#
|
||||
# Variables involved in ?IF, ?ELSE ?ENDIF processing
|
||||
@@ -803,7 +805,7 @@ sub add_variables( \% );
|
||||
# 2. The compiler can run multiple times in the same process so it has to be
|
||||
# able to re-initialize its dependent modules' state.
|
||||
#
|
||||
sub initialize( $;$$$) {
|
||||
sub initialize($;$$$) {
|
||||
( $family, $export, my ( $shorewallrc, $shorewallrc1 ) ) = @_;
|
||||
|
||||
if ( $family == F_IPV4 ) {
|
||||
@@ -980,7 +982,6 @@ sub initialize( $;$$$) {
|
||||
OPTIMIZE_ACCOUNTING => undef,
|
||||
ACCOUNTING_TABLE => undef,
|
||||
DYNAMIC_BLACKLIST => undef,
|
||||
LOAD_HELPERS_ONLY => undef,
|
||||
REQUIRE_INTERFACE => undef,
|
||||
FORWARD_CLEAR_MARK => undef,
|
||||
COMPLETE => undef,
|
||||
@@ -1009,6 +1010,7 @@ sub initialize( $;$$$) {
|
||||
PERL_HASH_SEED => undef ,
|
||||
USE_NFLOG_SIZE => undef ,
|
||||
RENAME_COMBINED => undef ,
|
||||
DOCKER_BRIDGE => undef ,
|
||||
#
|
||||
# Packet Disposition
|
||||
#
|
||||
@@ -4073,14 +4075,16 @@ sub process_shorewallrc( $$ ) {
|
||||
my ( $shorewallrc , $product ) = @_;
|
||||
|
||||
$shorewallrc{PRODUCT} = $product;
|
||||
$variables{PRODUCT} = $product;
|
||||
|
||||
if ( open_file $shorewallrc ) {
|
||||
while ( read_a_line( STRIP_COMMENTS | SUPPRESS_WHITESPACE | CHECK_GUNK ) ) {
|
||||
while ( read_a_line( STRIP_COMMENTS | SUPPRESS_WHITESPACE | CHECK_GUNK | EXPAND_VARIABLES ) ) {
|
||||
if ( $currentline =~ /^([a-zA-Z]\w*)=(.*)$/ ) {
|
||||
my ($var, $val) = ($1, $2);
|
||||
$val = $1 if $val =~ /^\"([^\"]*)\"$/;
|
||||
expand_shorewallrc_variables($val) if supplied $val;
|
||||
$shorewallrc{$var} = $val;
|
||||
$variables{$var} = $val;
|
||||
} else {
|
||||
fatal_error "Unrecognized shorewallrc entry";
|
||||
}
|
||||
@@ -4451,7 +4455,7 @@ sub load_kernel_modules( ) {
|
||||
push @moduledirectories, $_ if -d $_;
|
||||
}
|
||||
|
||||
if ( $moduleloader && @moduledirectories && open_file( $config{LOAD_HELPERS_ONLY} ? 'helpers' : 'modules' ) ) {
|
||||
if ( $moduleloader && @moduledirectories && open_file( 'helpers' ) ) {
|
||||
my %loadedmodules;
|
||||
|
||||
$loadedmodules{$_}++ for split_list( $config{DONT_LOAD}, 'module' );
|
||||
@@ -4601,7 +4605,11 @@ sub New_Conntrack_Match() {
|
||||
}
|
||||
|
||||
sub Old_Conntrack_Match() {
|
||||
! qt1( "$iptables $iptablesw -A $sillyname -m conntrack ! --ctorigdst 1.2.3.4" );
|
||||
if ( $family == F_IPV4 ) {
|
||||
! qt1( "$iptables $iptablesw -A $sillyname -m conntrack ! --ctorigdst 1.2.3.4" );
|
||||
} else {
|
||||
! qt1( "$iptables $iptablesw -A $sillyname -m conntrack ! --ctorigdst ::1" );
|
||||
}
|
||||
}
|
||||
|
||||
sub Multiport() {
|
||||
@@ -5250,111 +5258,6 @@ sub determine_capabilities() {
|
||||
qt1( "$iptables $iptablesw -A $sillyname -m state --state ESTABLISHED,RELATED -j ACCEPT");;
|
||||
|
||||
$globals{KLUDGEFREE} = $capabilities{KLUDGEFREE} = detect_capability 'KLUDGEFREE';
|
||||
|
||||
unless ( $config{ LOAD_HELPERS_ONLY } ) {
|
||||
#
|
||||
# Using 'detect_capability()' is a bit less efficient than calling the individual detection
|
||||
# functions but it ensures that %detect_capability is initialized properly.
|
||||
#
|
||||
$capabilities{NAT_ENABLED} = detect_capability( 'NAT_ENABLED' );
|
||||
$capabilities{PERSISTENT_SNAT} = detect_capability( 'PERSISTENT_SNAT' );
|
||||
$capabilities{NAT_INPUT_CHAIN} = detect_capability( 'NAT_INPUT_CHAIN' );
|
||||
$capabilities{MANGLE_ENABLED} = detect_capability( 'MANGLE_ENABLED' );
|
||||
|
||||
if ( $capabilities{CONNTRACK_MATCH} = detect_capability( 'CONNTRACK_MATCH' ) ) {
|
||||
$capabilities{NEW_CONNTRACK_MATCH} = detect_capability( 'NEW_CONNTRACK_MATCH' );
|
||||
$capabilities{OLD_CONNTRACK_MATCH} = detect_capability( 'OLD_CONNTRACK_MATCH' );
|
||||
} else {
|
||||
$capabilities{NEW_CONNTRACK_MATCH} = '';
|
||||
$capabilities{OLD_CONNTRACK_MATCH} = '';
|
||||
}
|
||||
|
||||
$capabilities{ MULTIPORT } = detect_capability( 'MULTIPORT' );
|
||||
$capabilities{XMULTIPORT} = detect_capability( 'XMULTIPORT' );
|
||||
$capabilities{EMULTIPORT} = detect_capability( 'EMULTIPORT' );
|
||||
$capabilities{POLICY_MATCH} = detect_capability( 'POLICY_MATCH' );
|
||||
|
||||
if ( $capabilities{PHYSDEV_MATCH} = detect_capability( 'PHYSDEV_MATCH' ) ) {
|
||||
$capabilities{PHYSDEV_BRIDGE} = detect_capability( 'PHYSDEV_BRIDGE' );
|
||||
} else {
|
||||
$capabilities{PHYSDEV_BRIDGE} = '';
|
||||
}
|
||||
|
||||
$capabilities{IPRANGE_MATCH} = detect_capability( 'IPRANGE_MATCH' );
|
||||
$capabilities{RECENT_MATCH} = detect_capability( 'RECENT_MATCH' );
|
||||
$capabilities{REAP_OPTION} = detect_capability( 'REAP_OPTION' );
|
||||
$capabilities{OWNER_MATCH} = detect_capability( 'OWNER_MATCH' );
|
||||
$capabilities{OWNER_NAME_MATCH}
|
||||
= detect_capability( 'OWNER_NAME_MATCH' );
|
||||
$capabilities{CONNMARK_MATCH} = detect_capability( 'CONNMARK_MATCH' );
|
||||
$capabilities{XCONNMARK_MATCH} = detect_capability( 'XCONNMARK_MATCH' );
|
||||
$capabilities{IPP2P_MATCH} = detect_capability( 'IPP2P_MATCH' );
|
||||
$capabilities{OLD_IPP2P_MATCH} = detect_capability( 'OLD_IPP2P_MATCH' );
|
||||
$capabilities{LENGTH_MATCH} = detect_capability( 'LENGTH_MATCH' );
|
||||
$capabilities{ENHANCED_REJECT} = detect_capability( 'ENHANCED_REJECT' );
|
||||
$capabilities{COMMENTS} = detect_capability( 'COMMENTS' );
|
||||
$capabilities{OLD_HL_MATCH} = detect_capability( 'OLD_HL_MATCH' );
|
||||
$capabilities{HASHLIMIT_MATCH} = detect_capability( 'HASHLIMIT_MATCH' );
|
||||
$capabilities{MARK} = detect_capability( 'MARK' );
|
||||
$capabilities{XMARK} = detect_capability( 'XMARK' );
|
||||
$capabilities{EXMARK} = detect_capability( 'EXMARK' );
|
||||
$capabilities{CONNMARK} = detect_capability( 'CONNMARK' );
|
||||
$capabilities{XCONNMARK} = detect_capability( 'XCONNMARK' );
|
||||
$capabilities{CLASSIFY_TARGET} = detect_capability( 'CLASSIFY_TARGET' );
|
||||
$capabilities{IPMARK_TARGET} = detect_capability( 'IPMARK_TARGET' );
|
||||
$capabilities{TPROXY_TARGET} = detect_capability( 'TPROXY_TARGET' );
|
||||
$capabilities{MANGLE_FORWARD} = detect_capability( 'MANGLE_FORWARD' );
|
||||
$capabilities{RAW_TABLE} = detect_capability( 'RAW_TABLE' );
|
||||
$capabilities{IPSET_MATCH} = detect_capability( 'IPSET_MATCH' );
|
||||
$capabilities{ADDRTYPE} = detect_capability( 'ADDRTYPE' );
|
||||
$capabilities{TCPMSS_MATCH} = detect_capability( 'TCPMSS_MATCH' );
|
||||
$capabilities{NFQUEUE_TARGET} = detect_capability( 'NFQUEUE_TARGET' );
|
||||
$capabilities{REALM_MATCH} = detect_capability( 'REALM_MATCH' );
|
||||
$capabilities{CONNLIMIT_MATCH} = detect_capability( 'CONNLIMIT_MATCH' );
|
||||
$capabilities{TIME_MATCH} = detect_capability( 'TIME_MATCH' );
|
||||
$capabilities{GOTO_TARGET} = detect_capability( 'GOTO_TARGET' );
|
||||
$capabilities{LOG_TARGET} = detect_capability( 'LOG_TARGET' );
|
||||
$capabilities{ULOG_TARGET} = detect_capability( 'ULOG_TARGET' );
|
||||
$capabilities{NFLOG_TARGET} = detect_capability( 'NFLOG_TARGET' );
|
||||
$capabilities{LOGMARK_TARGET} = detect_capability( 'LOGMARK_TARGET' );
|
||||
$capabilities{FLOW_FILTER} = detect_capability( 'FLOW_FILTER' );
|
||||
$capabilities{FWMARK_RT_MASK} = detect_capability( 'FWMARK_RT_MASK' );
|
||||
$capabilities{MARK_ANYWHERE} = detect_capability( 'MARK_ANYWHERE' );
|
||||
$capabilities{ACCOUNT_TARGET} = detect_capability( 'ACCOUNT_TARGET' );
|
||||
$capabilities{HEADER_MATCH} = detect_capability( 'HEADER_MATCH' );
|
||||
$capabilities{AUDIT_TARGET} = detect_capability( 'AUDIT_TARGET' );
|
||||
$capabilities{IPSET_V5} = detect_capability( 'IPSET_V5' );
|
||||
$capabilities{CONDITION_MATCH} = detect_capability( 'CONDITION_MATCH' );
|
||||
$capabilities{IPTABLES_S} = detect_capability( 'IPTABLES_S' );
|
||||
$capabilities{BASIC_FILTER} = detect_capability( 'BASIC_FILTER' );
|
||||
$capabilities{BASIC_EMATCH} = detect_capability( 'BASIC_EMATCH' );
|
||||
$capabilities{CT_TARGET} = detect_capability( 'CT_TARGET' );
|
||||
$capabilities{STATISTIC_MATCH} = detect_capability( 'STATISTIC_MATCH' );
|
||||
$capabilities{IMQ_TARGET} = detect_capability( 'IMQ_TARGET' );
|
||||
$capabilities{DSCP_MATCH} = detect_capability( 'DSCP_MATCH' );
|
||||
$capabilities{DSCP_TARGET} = detect_capability( 'DSCP_TARGET' );
|
||||
$capabilities{GEOIP_MATCH} = detect_capability( 'GEOIP_MATCH' );
|
||||
$capabilities{RPFILTER_MATCH} = detect_capability( 'RPFILTER_MATCH' );
|
||||
$capabilities{NFACCT_MATCH} = detect_capability( 'NFACCT_MATCH' );
|
||||
$capabilities{CHECKSUM_TARGET} = detect_capability( 'CHECKSUM_TARGET' );
|
||||
$capabilities{ARPTABLESJF} = detect_capability( 'ARPTABLESJF' );
|
||||
$capabilities{MASQUERADE_TGT} = detect_capability( 'MASQUERADE_TGT' );
|
||||
$capabilities{UDPLITEREDIRECT} = detect_capability( 'UDPLITEREDIRECT' );
|
||||
$capabilities{NEW_TOS_MATCH} = detect_capability( 'NEW_TOS_MATCH' );
|
||||
$capabilities{TARPIT_TARGET} = detect_capability( 'TARPIT_TARGET' );
|
||||
$capabilities{IFACE_MATCH} = detect_capability( 'IFACE_MATCH' );
|
||||
$capabilities{TCPMSS_TARGET} = detect_capability( 'TCPMSS_TARGET' );
|
||||
$capabilities{CPU_FANOUT} = detect_capability( 'CPU_FANOUT' );
|
||||
$capabilities{NETMAP_TARGET} = detect_capability( 'NETMAP_TARGET' );
|
||||
$capabilities{NFLOG_SIZE} = detect_capability( 'NFLOG_SIZE' );
|
||||
$capabilities{RESTORE_WAIT_OPTION}
|
||||
= detect_capability( 'RESTORE_WAIT_OPTION' );
|
||||
|
||||
unless ( have_capability 'CT_TARGET' ) {
|
||||
$capabilities{HELPER_MATCH} = detect_capability 'HELPER_MATCH';
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
@@ -5366,6 +5269,16 @@ sub require_capability( $$$ ) {
|
||||
fatal_error "$description require${singular} $capdesc{$capability} in your kernel and iptables" unless have_capability $capability, 1;
|
||||
}
|
||||
|
||||
sub require_mangle_capability( $$$ ) {
|
||||
my ( $capability, $description, $singular ) = @_;
|
||||
|
||||
if ( $config{MANGLE_ENABLED} ) {
|
||||
&require_capability( @_ );
|
||||
} else {
|
||||
fatal_error "$description " . ( $singular ? 'is' : 'are' ) . " not available when MANGLE_ENABLED=No in $shorewallrc{PRODUCT}.conf";
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# Return Kernel Version
|
||||
#
|
||||
@@ -5544,6 +5457,7 @@ sub update_config_file( $ ) {
|
||||
update_default( 'PAGER', $shorewallrc1{DEFAULT_PAGER} );
|
||||
update_default( 'LOGFORMAT', 'Shorewall:%s:%s:' );
|
||||
update_default( 'LOGLIMIT', '' );
|
||||
update_default( 'AUTOMAKE', 'No' );
|
||||
|
||||
if ( $family == F_IPV4 ) {
|
||||
update_default( 'BLACKLIST_DEFAULT', 'dropBcasts,dropNotSyn,dropInvalid' );
|
||||
@@ -6348,11 +6262,6 @@ sub get_configuration( $$$ ) {
|
||||
|
||||
unshift @INC, @config_path;
|
||||
|
||||
#
|
||||
# get_capabilities requires that the true settings of these options be established
|
||||
#
|
||||
default_yes_no 'LOAD_HELPERS_ONLY' , 'Yes';
|
||||
|
||||
if ( ! $export && $> == 0 ) {
|
||||
get_capabilities($have_capabilities);
|
||||
}
|
||||
@@ -6405,8 +6314,6 @@ sub get_configuration( $$$ ) {
|
||||
$capabilities{$_} = 0 for grep /_HELPER/ , keys %capabilities;
|
||||
}
|
||||
|
||||
report_capabilities unless $config{LOAD_HELPERS_ONLY};
|
||||
|
||||
#
|
||||
# Now initialize the used capabilities hash
|
||||
#
|
||||
@@ -6663,6 +6570,9 @@ sub get_configuration( $$$ ) {
|
||||
fatal_error "DOCKER=Yes is not allowed in Shorewall6" if $family == F_IPV6;
|
||||
require_capability( 'IPTABLES_S', 'DOCKER=Yes', 's' );
|
||||
require_capability( 'ADDRTYPE', ' DOCKER=Yes', 's' );
|
||||
default( 'DOCKER_BRIDGE' , 'docker0' );
|
||||
} elsif ( $family == F_IPV6 ) {
|
||||
warning_message( "DOCKER_BRIDGE=$val ignored by shorewall6" ) if supplied( $val = $config{DOCKER_BRIDGE} );
|
||||
}
|
||||
|
||||
if ( supplied( $val = $config{RESTART} ) ) {
|
||||
@@ -6716,6 +6626,7 @@ sub get_configuration( $$$ ) {
|
||||
if ( supplied $config{ACCOUNTING_TABLE} ) {
|
||||
my $value = $config{ACCOUNTING_TABLE};
|
||||
fatal_error "Invalid ACCOUNTING_TABLE setting ($value)" unless $value eq 'filter' || $value eq 'mangle';
|
||||
fatal_error "ACCOUNTING_TABLE=mangle not allowed with MANGLE_ENABLED=No" if $value eq 'mangle' and ! $config{MANGLE_ENABLED};
|
||||
} else {
|
||||
$config{ACCOUNTING_TABLE} = 'filter';
|
||||
}
|
||||
@@ -6791,7 +6702,7 @@ sub get_configuration( $$$ ) {
|
||||
|
||||
$config{IPSET} = '' if supplied $config{IPSET} && $config{IPSET} eq 'ipset';
|
||||
|
||||
require_capability 'MARK' , 'FORWARD_CLEAR_MARK=Yes', 's', if $config{FORWARD_CLEAR_MARK};
|
||||
require_mangle_capability 'MARK' , 'FORWARD_CLEAR_MARK=Yes', 's', if $config{FORWARD_CLEAR_MARK};
|
||||
|
||||
numeric_option 'TC_BITS' , 8, 0;
|
||||
numeric_option 'MASK_BITS' , 8, 0;
|
||||
@@ -7035,7 +6946,7 @@ sub get_configuration( $$$ ) {
|
||||
|
||||
if ( $config{TC_ENABLED} ) {
|
||||
fatal_error "TC_ENABLED=$config{TC_ENABLED} is not allowed with MANGLE_ENABLED=No" unless $config{MANGLE_ENABLED};
|
||||
require_capability 'MANGLE_ENABLED', "TC_ENABLED=$config{TC_ENABLED}", 's';
|
||||
require_mangle_capability 'MANGLE_ENABLED', "TC_ENABLED=$config{TC_ENABLED}", 's';
|
||||
}
|
||||
|
||||
if ( supplied( $val = $config{TC_PRIOMAP} ) ) {
|
||||
@@ -7052,9 +6963,7 @@ sub get_configuration( $$$ ) {
|
||||
}
|
||||
|
||||
default 'RESTOREFILE' , 'restore';
|
||||
|
||||
default 'DROP_DEFAULT' , 'none';
|
||||
|
||||
default 'REJECT_DEFAULT' , 'none';
|
||||
default 'BLACKLIST_DEFAULT' , 'none';
|
||||
default 'QUEUE_DEFAULT' , 'none';
|
||||
@@ -7118,9 +7027,9 @@ sub get_configuration( $$$ ) {
|
||||
}
|
||||
|
||||
require_capability( 'MULTIPORT' , "Shorewall $globals{VERSION}" , 's' );
|
||||
require_capability( 'RECENT_MATCH' , 'MACLIST_TTL' , 's' ) if $config{MACLIST_TTL};
|
||||
require_capability( 'XCONNMARK' , 'HIGH_ROUTE_MARKS=Yes' , 's' ) if $config{PROVIDER_OFFSET} > 0;
|
||||
require_capability( 'MANGLE_ENABLED' , 'Traffic Shaping' , 's' ) if $config{TC_ENABLED};
|
||||
require_capability( 'RECENT_MATCH' , 'MACLIST_TTL' , 's' ) if $config{MACLIST_TTL};
|
||||
require_capability( 'XCONNMARK' , 'HIGH_ROUTE_MARKS=Yes' , 's' ) if $config{PROVIDER_OFFSET} > 0;
|
||||
require_capability( 'MANGLE_ENABLED' , 'Traffic Shaping' , 's' ) if $config{TC_ENABLED};
|
||||
|
||||
if ( $config{WARNOLDCAPVERSION} ) {
|
||||
if ( $capabilities{CAPVERSION} ) {
|
||||
@@ -7144,8 +7053,6 @@ sub get_configuration( $$$ ) {
|
||||
}
|
||||
|
||||
convert_to_version_5_2 if $update;
|
||||
|
||||
cleanup_iptables if $sillyname && ! $config{LOAD_HELPERS_ONLY};
|
||||
}
|
||||
|
||||
#
|
||||
|
@@ -5,7 +5,7 @@
|
||||
#
|
||||
# (c) 2007-2017 - Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# This program is part of Shorewall.
|
||||
#
|
||||
|
@@ -3,9 +3,9 @@
|
||||
#
|
||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||
#
|
||||
# (c) 2007-2017 - Tom Eastep (teastep@shorewall.net)
|
||||
# (c) 2007-2019 - Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# This program is part of Shorewall.
|
||||
#
|
||||
@@ -66,6 +66,9 @@ sub initialize( $ ) {
|
||||
$family = shift;
|
||||
}
|
||||
|
||||
#
|
||||
# Warn that the tos file is no longer supported
|
||||
#
|
||||
sub process_tos() {
|
||||
|
||||
if ( my $fn = open_file 'tos' ) {
|
||||
@@ -94,7 +97,7 @@ sub setup_ecn()
|
||||
if ( my $fn = open_file 'ecn' ) {
|
||||
|
||||
first_entry( sub { progress_message2 "$doing $fn...";
|
||||
require_capability 'MANGLE_ENABLED', 'Entries in the ecn file', '';
|
||||
require_mangle_capability 'MANGLE_ENABLED', 'Entries in the ecn file', '';
|
||||
warning_message 'ECN will not be applied to forwarded packets' unless have_capability 'MANGLE_FORWARD';
|
||||
} );
|
||||
|
||||
@@ -145,6 +148,9 @@ sub setup_ecn()
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# Add a logging rule followed by a jump
|
||||
#
|
||||
sub add_rule_pair( $$$$$ ) {
|
||||
my ($chainref , $predicate , $target , $level, $tag ) = @_;
|
||||
|
||||
@@ -329,7 +335,7 @@ sub convert_blacklist() {
|
||||
#
|
||||
# For information about entries in this file, type "man shorewall-blrules"
|
||||
#
|
||||
# Please see http://shorewall.net/blacklisting_support.htm for additional
|
||||
# Please see http://shorewall.org/blacklisting_support.htm for additional
|
||||
# information.
|
||||
#
|
||||
###################################################################################################################################################################################################
|
||||
@@ -402,6 +408,9 @@ EOF
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# Convert a routestopped file into an equivalent stoppedrules file
|
||||
#
|
||||
sub convert_routestopped() {
|
||||
|
||||
if ( my $fn = open_file 'routestopped' ) {
|
||||
@@ -425,9 +434,9 @@ sub convert_routestopped() {
|
||||
# For information about entries in this file, type "man shorewall-stoppedrules"
|
||||
#
|
||||
# The manpage is also online at
|
||||
# http://www.shorewall.net/manpages/shorewall-stoppedrules.html
|
||||
# http://www.shorewall.org/manpages/shorewall-stoppedrules.html
|
||||
#
|
||||
# See http://shorewall.net/starting_and_stopping_shorewall.htm for additional
|
||||
# See http://shorewall.org/starting_and_stopping_shorewall.htm for additional
|
||||
# information.
|
||||
#
|
||||
###############################################################################
|
||||
@@ -662,31 +671,28 @@ sub process_stoppedrules() {
|
||||
$result;
|
||||
}
|
||||
|
||||
#
|
||||
# Generate the rules required when DOCKER=Yes
|
||||
#
|
||||
sub create_docker_rules() {
|
||||
my $bridge = $config{DOCKER_BRIDGE};
|
||||
|
||||
add_commands( $nat_table->{PREROUTING} , '[ -n "$g_docker" ] && echo "-A PREROUTING -m addrtype --dst-type LOCAL -j DOCKER" >&3' );
|
||||
|
||||
my $chainref = $filter_table->{FORWARD};
|
||||
|
||||
add_commands( $chainref, '[ -n "$g_dockeringress" ] && echo "-A FORWARD -j DOCKER-INGRESS" >&3', );
|
||||
add_commands( $chainref, '[ -n "$g_dockeruser" ] && echo "-A FORWARD -j DOCKER-USER" >&3', );
|
||||
add_commands( $chainref ,
|
||||
'',
|
||||
'case "$g_dockernetwork" in',
|
||||
' One)',
|
||||
' echo "-A FORWARD -j DOCKER-ISOLATION" >&3',
|
||||
' ;;',
|
||||
' Two)',
|
||||
' echo "-A FORWARD -j DOCKER-ISOLATION-STAGE-1" >&3',
|
||||
' ;;',
|
||||
'esac' );
|
||||
add_commands( $chainref, '[ -n "$g_dockeringress" ] && echo "-A FORWARD -j DOCKER-INGRESS" >&3' );
|
||||
add_commands( $chainref, '[ -n "$g_dockeruser" ] && echo "-A FORWARD -j DOCKER-USER" >&3' );
|
||||
add_commands( $chainref, '[ -n "$g_dockeriso" ] && echo "-A FORWARD -j DOCKER-ISOLATION" >&3' );
|
||||
add_commands( $chainref, '[ -n "$g_dockerisostage" ] && echo "-A FORWARD -j DOCKER-ISOLATION-STAGE-1" >&3' );
|
||||
|
||||
if ( my $dockerref = known_interface('docker0') ) {
|
||||
if ( my $dockerref = known_interface( $bridge ) ) {
|
||||
add_commands( $chainref, 'if [ -n "$g_docker" ]; then' );
|
||||
incr_cmd_level( $chainref );
|
||||
add_ijump( $chainref, j => 'DOCKER', o => 'docker0' );
|
||||
add_ijump( $chainref, j => 'ACCEPT', o => 'docker0', state_imatch 'ESTABLISHED,RELATED' );
|
||||
add_ijump( $chainref, j => 'ACCEPT', i => 'docker0', o => '! docker0' );
|
||||
add_ijump( $chainref, j => 'ACCEPT', i => 'docker0', o => 'docker0' ) if $dockerref->{options}{routeback};
|
||||
add_ijump( $chainref, j => 'DOCKER', o => $bridge );
|
||||
add_ijump( $chainref, j => 'ACCEPT', o => $bridge , state_imatch 'ESTABLISHED,RELATED' );
|
||||
add_ijump( $chainref, j => 'ACCEPT', i => $bridge , o => "! $bridge" );
|
||||
add_ijump( $chainref, j => 'ACCEPT', i => $bridge , o => $bridge ) if $dockerref->{options}{routeback};
|
||||
decr_cmd_level( $chainref );
|
||||
add_commands( $chainref, 'fi' );
|
||||
|
||||
@@ -703,6 +709,9 @@ sub create_docker_rules() {
|
||||
|
||||
sub setup_mss();
|
||||
|
||||
#
|
||||
# Add rules generated by .conf options and interface options
|
||||
#
|
||||
sub add_common_rules ( $ ) {
|
||||
my ( $upgrade ) = @_;
|
||||
my $interface;
|
||||
@@ -1283,6 +1292,13 @@ my %maclist_targets = ( ACCEPT => { target => 'RETURN' , mangle => 1 } ,
|
||||
REJECT => { target => 'reject' , mangle => 0 } ,
|
||||
DROP => { target => 'DROP' , mangle => 1 } );
|
||||
|
||||
#
|
||||
# Create rules generated by the 'maclist' option and by entries in the maclist file.
|
||||
#
|
||||
# The function is called twice. The first call passes '1' and causes the maclist file
|
||||
# to be processed. The second call passes '2' and generates the jumps for 'maclist'
|
||||
# interfaces.
|
||||
#
|
||||
sub setup_mac_lists( $ ) {
|
||||
|
||||
my $phase = $_[0];
|
||||
@@ -2454,6 +2470,9 @@ sub generate_matrix() {
|
||||
}
|
||||
}
|
||||
|
||||
#
|
||||
# Generate MSS rules
|
||||
#
|
||||
sub setup_mss( ) {
|
||||
my $clampmss = $config{CLAMPMSS};
|
||||
my $option;
|
||||
@@ -2515,6 +2534,7 @@ sub compile_stop_firewall( $$$$ ) {
|
||||
my $input = $filter_table->{INPUT};
|
||||
my $output = $filter_table->{OUTPUT};
|
||||
my $forward = $filter_table->{FORWARD};
|
||||
my $absentminded = $config{ ADMINISABSENTMINDED };
|
||||
|
||||
emit <<'EOF';
|
||||
#
|
||||
@@ -2522,7 +2542,7 @@ sub compile_stop_firewall( $$$$ ) {
|
||||
#
|
||||
stop_firewall() {
|
||||
EOF
|
||||
$output->{policy} = 'ACCEPT' if $config{ADMINISABSENTMINDED};
|
||||
$output->{policy} = 'ACCEPT' if $absentminded;
|
||||
|
||||
if ( $family == F_IPV4 ) {
|
||||
emit <<'EOF';
|
||||
@@ -2681,7 +2701,7 @@ EOF
|
||||
#
|
||||
create_docker_rules if $config{DOCKER};
|
||||
|
||||
if ( $config{ADMINISABSENTMINDED} ) {
|
||||
if ( $absentminded ) {
|
||||
add_ijump $filter_table ->{$_}, j => 'ACCEPT', state_imatch 'ESTABLISHED,RELATED' for qw/INPUT FORWARD/;
|
||||
}
|
||||
|
||||
@@ -2690,7 +2710,7 @@ EOF
|
||||
add_ijump $input, j => 'ACCEPT', d => IPv6_LINKLOCAL;
|
||||
add_ijump $input, j => 'ACCEPT', d => IPv6_MULTICAST;
|
||||
|
||||
unless ( $config{ADMINISABSENTMINDED} ) {
|
||||
unless ( $absentminded ) {
|
||||
add_ijump $output, j => 'ACCEPT', d => IPv6_LINKLOCAL;
|
||||
add_ijump $output, j => 'ACCEPT', d => IPv6_MULTICAST;
|
||||
}
|
||||
@@ -2704,12 +2724,25 @@ EOF
|
||||
|
||||
process_stoppedrules;
|
||||
|
||||
if ( $family == F_IPV6 ) {
|
||||
my $chain = new_action_chain( 'filter', 'AllowICMPs' );
|
||||
|
||||
for my $type ( 1, 2, 3, 4, 130, 131, 132, 133, 134, 135, 136, 137, 141, 142, 143, 148, 149, 151, 152, 153 ) {
|
||||
add_ijump( $chain, j => 'ACCEPT', p => IPv6_ICMP . " --icmpv6-type $type" );
|
||||
}
|
||||
|
||||
for $chain ( $input, $output, $forward ) {
|
||||
next if $chain eq $output && $absentminded;
|
||||
add_ijump( $chain, j => 'AllowICMPs', p => IPv6_ICMP );
|
||||
}
|
||||
}
|
||||
|
||||
if ( have_capability 'IFACE_MATCH' ) {
|
||||
add_ijump $input, j => 'ACCEPT', iface => '--dev-in --loopback';
|
||||
add_ijump $output, j => 'ACCEPT', iface => '--dev-out --loopback' unless $config{ADMINISABSENTMINDED};
|
||||
add_ijump $output, j => 'ACCEPT', iface => '--dev-out --loopback' unless $absentminded;
|
||||
} else {
|
||||
add_ijump $input, j => 'ACCEPT', i => loopback_interface;
|
||||
add_ijump $output, j => 'ACCEPT', o => loopback_interface unless $config{ADMINISABSENTMINDED};
|
||||
add_ijump $output, j => 'ACCEPT', o => loopback_interface unless $absentminded;
|
||||
}
|
||||
|
||||
my $interfaces = find_interfaces_by_option 'dhcp';
|
||||
@@ -2719,7 +2752,7 @@ EOF
|
||||
|
||||
for my $interface ( @$interfaces ) {
|
||||
add_ijump $input, j => 'ACCEPT', p => "udp --dport $ports", imatch_source_dev( $interface );
|
||||
add_ijump $output, j => 'ACCEPT', p => "udp --dport $ports", imatch_dest_dev( $interface ) unless $config{ADMINISABSENTMINDED};
|
||||
add_ijump $output, j => 'ACCEPT', p => "udp --dport $ports", imatch_dest_dev( $interface ) unless $absentminded;
|
||||
#
|
||||
# This might be a bridge
|
||||
#
|
||||
|
@@ -3,9 +3,9 @@
|
||||
#
|
||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||
#
|
||||
# (c) 2007-2017 - Tom Eastep (teastep@shorewall.net)
|
||||
# (c) 2007-2019 - Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# This program is part of Shorewall.
|
||||
#
|
||||
@@ -90,7 +90,7 @@ sub process_one_masq1( $$$$$$$$$$$ )
|
||||
#
|
||||
# Handle early matches
|
||||
#
|
||||
if ( $inlinematches =~ s/s*\+// ) {
|
||||
if ( $inlinematches =~ s/^s*\+// ) {
|
||||
$prerule = $inlinematches;
|
||||
$inlinematches = '';
|
||||
}
|
||||
@@ -316,9 +316,9 @@ sub process_one_masq1( $$$$$$$$$$$ )
|
||||
fatal_error "Invalid IPv6 Address ($addr)" unless $addr =~ /^\[(.+)\]$/;
|
||||
|
||||
$addr = $1;
|
||||
$addr =~ s/\]-\[/-/;
|
||||
|
||||
if ( $addr =~ /^(.+)-(.+)$/ ) {
|
||||
fatal_error "Correct address range syntax is '[<addr1>-<addr2>]'" if $addr =~ /]-\[/;
|
||||
validate_range( $1, $2 );
|
||||
} else {
|
||||
validate_address $addr, 0;
|
||||
@@ -561,7 +561,7 @@ sub open_snat_for_output( $ ) {
|
||||
#
|
||||
# For information about entries in this file, type "man shorewall-snat"
|
||||
#
|
||||
# See http://shorewall.net/manpages/shorewall-snat.html for additional information
|
||||
# See http://shorewall.org/manpages/shorewall-snat.html for additional information
|
||||
EOF
|
||||
} else {
|
||||
print $snat <<'EOF';
|
||||
@@ -570,7 +570,7 @@ EOF
|
||||
#
|
||||
# For information about entries in this file, type "man shorewall6-snat"
|
||||
#
|
||||
# See http://shorewall.net/manpages6/shorewall6-snat.html for additional information
|
||||
# See http://shorewall.org/manpages6/shorewall6-snat.html for additional information
|
||||
EOF
|
||||
}
|
||||
|
||||
@@ -930,7 +930,7 @@ sub handle_nat_rule( $$$$$$$$$$$$$ ) {
|
||||
|
||||
if ( $server =~ /^\[(.+)\]$/ ) {
|
||||
$server = $1;
|
||||
fatal_error "Correct address range syntax is '[<addr1>-<addr2>]'" if $server =~ /]-\[/;
|
||||
$server =~ s/\]-\[/-/;
|
||||
assert( $server =~ /^(.+)-(.+)$/ );
|
||||
( $addr1, $addr2 ) = ( $1, $2 );
|
||||
}
|
||||
|
@@ -5,7 +5,7 @@
|
||||
#
|
||||
# (c) 2007-2016 - Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# This program is part of Shorewall.
|
||||
#
|
||||
|
@@ -3,9 +3,9 @@
|
||||
#
|
||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||
#
|
||||
# (c) 2007-2017 - Tom Eastep (teastep@shorewall.net)
|
||||
# (c) 2007-2019 - Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# This program is part of Shorewall.
|
||||
#
|
||||
@@ -62,23 +62,61 @@ our @routemarked_interfaces;
|
||||
our %provider_interfaces;
|
||||
our @load_providers;
|
||||
|
||||
our $balancing;
|
||||
our $fallback;
|
||||
our $balanced_providers;
|
||||
our $fallback_providers;
|
||||
our $metrics;
|
||||
our $first_default_route;
|
||||
our $first_fallback_route;
|
||||
our $maxload;
|
||||
our $tproxies;
|
||||
our $balancing; # True, if there are balanced providers
|
||||
our $fallback; # True, if there are fallback providers
|
||||
our $balanced_providers; # Count of balanced providers
|
||||
our $fallback_providers; # Count of fallback providers
|
||||
our $metrics; # True, if using statistical balancing
|
||||
our $first_default_route; # True, until we generate the first 'via' clause for balanced providers
|
||||
our $first_fallback_route; # True, until we generate the first 'via' clause for fallback providers
|
||||
our $maxload; # Sum of 'load' values
|
||||
our $tproxies; # Count of tproxy providers
|
||||
|
||||
our %providers;
|
||||
our %providers; # Provider table
|
||||
#
|
||||
# %provider_table { <provider> => { provider => <provider name>,
|
||||
# number => <provider number>,
|
||||
# id => <name> or <number> depending on USE_RT_NAMES,
|
||||
# rawmark => <specified mark value>,
|
||||
# mark => <mark, in hex>,
|
||||
# interface => <logical interface>,
|
||||
# physical => <physical interface>,
|
||||
# optional => {0|1},
|
||||
# wildcard => <from interface>,
|
||||
# gateway => <gateway>,
|
||||
# gatewaycase => { 'detect', 'none', or 'specified' },
|
||||
# shared => <true, if multiple providers through this interface>,
|
||||
# copy => <contents of the COPY column>,
|
||||
# balance => <balance count>,
|
||||
# pref => <route rules preference (priority) value>,
|
||||
# mtu => <mtu>,
|
||||
# noautosrc => {0|1} based on [no]autosrc setting,
|
||||
# track => {0|1} based on 'track' setting,
|
||||
# loose => {0|1} based on 'loose' setting,
|
||||
# duplicate => <contents of the DUPLICATE column>,
|
||||
# address => If {shared} above, then the local IP address.
|
||||
# Otherwise, the value of the 'src' option,
|
||||
# mac => Mac address of gateway, if {shared} above,
|
||||
# tproxy => {0|1},
|
||||
# load => <load % for statistical balancing>,
|
||||
# pseudo => {0|1}. 1 means this is an optional interface and not
|
||||
# a real provider,
|
||||
# what => 'provider' or 'interface' depending on {pseudo} above,
|
||||
# hostroute => {0|1} based on [no]hostroute setting,
|
||||
# rules => ( <routing rules> ),
|
||||
# persistent_rules => ( <persistent routing rules> ),
|
||||
# routes => ( <routes> ),
|
||||
# persistent_routes => ( <persistent routes> ),
|
||||
# persistent => {0|1} depending on 'persistent' setting,
|
||||
# routedests => { <subnet> => 1 , ... }, (used for duplicate destination detection),
|
||||
# origin => <filename and linenumber where provider/interface defined>
|
||||
# }
|
||||
|
||||
our @providers;
|
||||
our @providers; # Provider names. Only declared names are included in this array.
|
||||
|
||||
our $family;
|
||||
our $family; # Address family
|
||||
|
||||
our $lastmark;
|
||||
our $lastmark; # Highest assigned mark
|
||||
|
||||
use constant { ROUTEMARKED_SHARED => 1, ROUTEMARKED_UNSHARED => 2 };
|
||||
|
||||
@@ -132,7 +170,6 @@ sub setup_route_marking() {
|
||||
#
|
||||
# Clear the mark -- we have seen cases where the mark is non-zero even in the raw table chains!
|
||||
#
|
||||
|
||||
if ( $config{ZERO_MARKS} ) {
|
||||
add_ijump( $mangle_table->{$_}, j => 'MARK', targetopts => '--set-mark 0' ) for qw/PREROUTING OUTPUT/;
|
||||
}
|
||||
@@ -557,7 +594,7 @@ sub process_a_provider( $ ) {
|
||||
unless ( $options eq '-' ) {
|
||||
for my $option ( split_list $options, 'option' ) {
|
||||
if ( $option eq 'track' ) {
|
||||
require_capability( 'MANGLE_ENABLED' , q(The 'track' option) , 's' );
|
||||
require_mangle_capability( 'MANGLE_ENABLED' , q(The 'track' option) , 's' );
|
||||
$track = 1;
|
||||
} elsif ( $option eq 'notrack' ) {
|
||||
$track = 0;
|
||||
@@ -677,8 +714,7 @@ sub process_a_provider( $ ) {
|
||||
$mark = ( $lastmark += ( 1 << $config{PROVIDER_OFFSET} ) ) if $mark eq '-' && $track;
|
||||
|
||||
if ( $mark ne '-' ) {
|
||||
|
||||
require_capability( 'MANGLE_ENABLED' , 'Provider marks' , '' );
|
||||
require_mangle_capability( 'MANGLE_ENABLED' , 'Provider marks' , '' );
|
||||
|
||||
if ( $tproxy && ! $local ) {
|
||||
$val = $globals{TPROXY_MARK};
|
||||
@@ -1144,14 +1180,14 @@ CEOF
|
||||
emit "fi\n";
|
||||
|
||||
if ( get_interface_option( $interface, 'used_address_variable' ) ) {
|
||||
my $variable = interface_address( $interface );
|
||||
my $variable = get_interface_address( $interface );
|
||||
|
||||
emit( "echo \$$variable > \${VARDIR}/${physical}.address" );
|
||||
emit( "echo $variable > \${VARDIR}/${physical}.address" );
|
||||
}
|
||||
|
||||
if ( get_interface_option( $interface, 'used_gateway_variable' ) ) {
|
||||
my $variable = interface_gateway( $interface );
|
||||
emit( qq(echo "\$$variable" > \${VARDIR}/${physical}.gateway\n) );
|
||||
my $variable = get_interface_gateway( $interface );
|
||||
emit( qq(echo "$variable" > \${VARDIR}/${physical}.gateway\n) );
|
||||
}
|
||||
} else {
|
||||
emit( qq(progress_message "Provider $table ($number) Started") );
|
||||
@@ -2287,22 +2323,22 @@ sub handle_optional_interfaces() {
|
||||
emit( 'fi' );
|
||||
|
||||
if ( get_interface_option( $interface, 'used_address_variable' ) ) {
|
||||
my $variable = interface_address( $interface );
|
||||
my $variable = get_interface_address( $interface );
|
||||
|
||||
emit( '',
|
||||
"if [ -f \${VARDIR}/${physical}.address ]; then",
|
||||
" if [ \$(cat \${VARDIR}/${physical}.address) != \$$variable ]; then",
|
||||
" if [ \$(cat \${VARDIR}/${physical}.address) != $variable ]; then",
|
||||
' g_forcereload=Yes',
|
||||
' fi',
|
||||
'fi' );
|
||||
}
|
||||
|
||||
if ( get_interface_option( $interface, 'used_gateway_variable' ) ) {
|
||||
my $variable = interface_gateway( $interface );
|
||||
my $variable = get_interface_gateway( $interface );
|
||||
|
||||
emit( '',
|
||||
"if [ -f \${VARDIR}/${physical}.gateway ]; then",
|
||||
" if [ \$(cat \${VARDIR}/${physical}.gateway) != \"\$$variable\" ]; then",
|
||||
" if [ \$(cat \${VARDIR}/${physical}.gateway) != \"$variable\" ]; then",
|
||||
' g_forcereload=Yes',
|
||||
' fi',
|
||||
'fi' );
|
||||
|
@@ -5,7 +5,7 @@
|
||||
#
|
||||
# (c) 2007-2017 - Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# This program is part of Shorewall.
|
||||
#
|
||||
|
@@ -3,9 +3,9 @@
|
||||
#
|
||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||
#
|
||||
# (c) 2009-2018 - Tom Eastep (teastep@shorewall.net)
|
||||
# (c) 2009-2019 - Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# This program is part of Shorewall.
|
||||
#
|
||||
@@ -70,6 +70,13 @@ sub process_conntrack_rule( $$$$$$$$$$ ) {
|
||||
|
||||
my $zone;
|
||||
my $restriction = PREROUTE_RESTRICT;
|
||||
my $raw_matches = get_inline_matches(0);
|
||||
my $prerule = '';
|
||||
|
||||
if ( $raw_matches =~ /^s*+/ ) {
|
||||
$prerule = $raw_matches;
|
||||
$raw_matches = '';
|
||||
}
|
||||
|
||||
if ( $chainref ) {
|
||||
$restriction = OUTPUT_RESTRICT if $chainref->{name} eq 'OUTPUT';
|
||||
@@ -206,10 +213,11 @@ sub process_conntrack_rule( $$$$$$$$$$ ) {
|
||||
|
||||
expand_rule( $chainref ,
|
||||
$restriction ,
|
||||
'',
|
||||
$prerule,
|
||||
do_proto( $proto, $ports, $sports ) .
|
||||
do_user ( $user ) .
|
||||
do_condition( $switch , $chainref->{name} ),
|
||||
do_condition( $switch , $chainref->{name} ) .
|
||||
$raw_matches ,
|
||||
$source ,
|
||||
$dest ,
|
||||
'' ,
|
||||
@@ -316,7 +324,7 @@ sub setup_conntrack($) {
|
||||
{ source => 0, dest => 1, proto => 2, dport => 3, sport => 4, user => 5, switch => 6 } );
|
||||
$action = 'NOTRACK';
|
||||
} else {
|
||||
( $action, $source, $dest, $protos, $ports, $sports, $user, $switch ) = split_line1 'Conntrack File', { action => 0, source => 1, dest => 2, proto => 3, dport => 4, sport => 5, user => 6, switch => 7 };
|
||||
( $action, $source, $dest, $protos, $ports, $sports, $user, $switch ) = split_line2( 'Conntrack File', { action => 0, source => 1, dest => 2, proto => 3, dport => 4, sport => 5, user => 6, switch => 7 }, undef, undef, 1 );
|
||||
}
|
||||
|
||||
$empty = 0;
|
||||
|
@@ -3,9 +3,9 @@
|
||||
#
|
||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||
#
|
||||
# (c) 2007-2017 - Tom Eastep (teastep@shorewall.net)
|
||||
# (c) 2007-2019 - Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# This program is part of Shorewall.
|
||||
#
|
||||
@@ -292,6 +292,8 @@ our $mangle;
|
||||
|
||||
our $sticky;
|
||||
|
||||
our $excludefw;
|
||||
|
||||
our $divertref; # DIVERT chain
|
||||
|
||||
our %validstates = ( NEW => 0,
|
||||
@@ -365,6 +367,10 @@ sub initialize( $ ) {
|
||||
#
|
||||
%actions = ();
|
||||
#
|
||||
# Count of 'all[+]=' encountered
|
||||
#
|
||||
$excludefw = 0;
|
||||
#
|
||||
# Action variants actually used. Key is <action>:<loglevel>:<tag>:<caller>:<params>; value is corresponding chain name
|
||||
#
|
||||
%usedactions = ();
|
||||
@@ -605,8 +611,8 @@ sub process_policy_actions( $$$ ) {
|
||||
#
|
||||
# Verify an NFQUEUE specification and return the appropriate ip[6]tables target
|
||||
#
|
||||
sub handle_nfqueue( $$ ) {
|
||||
my ($params, $allow_bypass ) = @_;
|
||||
sub handle_nfqueue( $ ) {
|
||||
my ($params) = @_;
|
||||
my ( $action, $bypass, $fanout );
|
||||
my ( $queue1, $queue2, $queuenum1, $queuenum2 );
|
||||
|
||||
@@ -619,7 +625,6 @@ sub handle_nfqueue( $$ ) {
|
||||
|
||||
if ( supplied $queue ) {
|
||||
if ( $queue eq 'bypass' ) {
|
||||
fatal_error "'bypass' is not allowed in this context" unless $allow_bypass;
|
||||
fatal_error "Invalid NFQUEUE options (bypass,$bypass)" if supplied $bypass;
|
||||
return 'NFQUEUE --queue-bypass';
|
||||
}
|
||||
@@ -647,7 +652,6 @@ sub handle_nfqueue( $$ ) {
|
||||
|
||||
if ( supplied $bypass ) {
|
||||
fatal_error "Invalid NFQUEUE option ($bypass)" if $bypass ne 'bypass';
|
||||
fatal_error "'bypass' is not allowed in this context" unless $allow_bypass;
|
||||
|
||||
$bypass =' --queue-bypass';
|
||||
} else {
|
||||
@@ -672,14 +676,42 @@ sub process_a_policy1($$$$$$$) {
|
||||
|
||||
my ( $client, $server, $originalpolicy, $loglevel, $synparams, $connlimit, $intrazone ) = @_;
|
||||
|
||||
my $clientwild = ( "\L$client" =~ /^all(\+)?$/ );
|
||||
my $clientwild = ( "\L$client" =~ /^all(\+)?(?:!(.+))?$/ );
|
||||
my $clientexclude;
|
||||
my %clientexcluded;
|
||||
|
||||
$intrazone ||= $clientwild && $1;
|
||||
if ( $clientwild ) {
|
||||
$intrazone ||= $1;
|
||||
|
||||
if ( $clientexclude = $2 ) {
|
||||
for my $client ( split_list( $clientexclude, 'zone' ) ) {
|
||||
fatal_error "Undefined zone ($client)" unless defined_zone( $client );
|
||||
$clientexcluded{$client} = 1;
|
||||
}
|
||||
|
||||
$client = 'all';
|
||||
}
|
||||
}
|
||||
|
||||
fatal_error "Undefined zone ($client)" unless $clientwild || defined_zone( $client );
|
||||
|
||||
my $serverwild = ( "\L$server" =~ /^all(\+)?/ );
|
||||
$intrazone ||= ( $serverwild && $1 );
|
||||
my $serverwild = ( "\L$server" =~ /^all(\+)?(?:!(.+))?/ );
|
||||
my $serverexclude;
|
||||
my %serverexcluded;
|
||||
|
||||
|
||||
if ( $serverwild ) {
|
||||
$intrazone ||= $1;
|
||||
|
||||
if ( $serverexclude = $2 ) {
|
||||
for my $server ( split_list( $serverexclude, 'zone' ) ) {
|
||||
fatal_error "Undefined zone ($server)" unless defined_zone( $server );
|
||||
$serverexcluded{$server} = 1;
|
||||
}
|
||||
|
||||
$server = 'all';
|
||||
}
|
||||
}
|
||||
|
||||
fatal_error "Undefined zone ($server)" unless $serverwild || defined_zone( $server );
|
||||
|
||||
@@ -687,7 +719,13 @@ sub process_a_policy1($$$$$$$) {
|
||||
|
||||
require_capability 'AUDIT_TARGET', ":audit", "s" if $audit;
|
||||
|
||||
my ( $policy, $pactions ) = split( /:/, $originalpolicy, 2 );
|
||||
my ( $policy, $pactions );
|
||||
|
||||
if ( $originalpolicy =~ /^NFQUEUE\((.*?)\)(?::?(.*))/ ) {
|
||||
( $policy, $pactions ) = ( "NFQUEUE($1)", $2 );
|
||||
} else {
|
||||
( $policy, $pactions ) = split( /:/, $originalpolicy, 2 );
|
||||
}
|
||||
|
||||
fatal_error "Invalid or missing POLICY ($originalpolicy)" unless $policy;
|
||||
|
||||
@@ -702,9 +740,7 @@ sub process_a_policy1($$$$$$$) {
|
||||
my $pactionref = process_policy_actions( $originalpolicy, $policy, $pactions );
|
||||
|
||||
if ( defined $queue ) {
|
||||
$policy = handle_nfqueue( $queue,
|
||||
0 # Don't allow 'bypass'
|
||||
);
|
||||
$policy = handle_nfqueue( $queue );
|
||||
} elsif ( $policy eq 'NONE' ) {
|
||||
fatal_error "NONE policy not allowed with \"all\""
|
||||
if $clientwild || $serverwild;
|
||||
@@ -762,20 +798,20 @@ sub process_a_policy1($$$$$$$) {
|
||||
|
||||
if ( $clientwild ) {
|
||||
if ( $serverwild ) {
|
||||
for my $zone ( @zonelist ) {
|
||||
for my $zone1 ( @zonelist ) {
|
||||
for my $zone ( grep( ! $clientexcluded{$_}, @zonelist ) ) {
|
||||
for my $zone1 ( grep( ! $serverexcluded{zone}, @zonelist ) ) {
|
||||
set_policy_chain $zone, $zone1, $chainref, $policy, $intrazone;
|
||||
print_policy $zone, $zone1, $originalpolicy, $chain;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
for my $zone ( all_zones ) {
|
||||
for my $zone ( grep( ! $clientexcluded{$_}, all_zones ) ) {
|
||||
set_policy_chain $zone, $server, $chainref, $policy, $intrazone;
|
||||
print_policy $zone, $server, $originalpolicy, $chain;
|
||||
}
|
||||
}
|
||||
} elsif ( $serverwild ) {
|
||||
for my $zone ( @zonelist ) {
|
||||
for my $zone ( grep( ! $serverexcluded{$_}, @zonelist ) ) {
|
||||
set_policy_chain $client, $zone, $chainref, $policy, $intrazone;
|
||||
print_policy $client, $zone, $originalpolicy, $chain;
|
||||
}
|
||||
@@ -802,11 +838,15 @@ sub process_a_policy() {
|
||||
|
||||
my ( $intrazone, $clientlist, $serverlist );
|
||||
|
||||
if ( $clientlist = ( $clients =~ /,/ ) ) {
|
||||
if ( $clients =~ /^all(\+)?!/ ) {
|
||||
$intrazone = $1;
|
||||
} elsif ( $clientlist = ( $clients =~ /,/ ) ) {
|
||||
$intrazone = ( $clients =~ s/\+$// );
|
||||
}
|
||||
|
||||
if ( $serverlist = ( $servers =~ /,/ ) ) {
|
||||
if ( $servers =~ /^all(\+)?!/ ) {
|
||||
$intrazone = $1;
|
||||
} elsif ( $serverlist = ( $servers =~ /,/ ) ) {
|
||||
$intrazone ||= ( $servers =~ s/\+$// );
|
||||
}
|
||||
|
||||
@@ -816,12 +856,14 @@ sub process_a_policy() {
|
||||
|
||||
if ( $clientlist || $serverlist ) {
|
||||
for my $client ( split_list( $clients, 'zone' ) ) {
|
||||
fatal_error "'all' is not allowed in a source zone list" if $clientlist && $client =~ /^all\b/;
|
||||
for my $server ( split_list( $servers, 'zone' ) ) {
|
||||
fatal_error "'all' is not allowed in a destination zone list" if $serverlist && $server =~ /^all\b/;
|
||||
process_a_policy1( $client, $server, $policy, $loglevel, $synparams, $connlimit, $intrazone ) if $intrazone || $client ne $server;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
process_a_policy1( $clients, $servers, $policy, $loglevel, $synparams, $connlimit, 0 );
|
||||
process_a_policy1( $clients, $servers, $policy, $loglevel, $synparams, $connlimit, $intrazone );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1564,8 +1606,8 @@ sub merge_levels ($$) {
|
||||
|
||||
return $subordinate if $subordinate =~ /^(?:FORMAT|COMMENT|DEFAULTS?)$/;
|
||||
|
||||
my @supparts = split /:/, $superior;
|
||||
my @subparts = split /:/, $subordinate;
|
||||
my @supparts = split_list2( $superior , 'Action' );
|
||||
my @subparts = split_list2( $subordinate , 'Action' );
|
||||
|
||||
my $subparts = @subparts;
|
||||
|
||||
@@ -2609,7 +2651,7 @@ sub process_rule ( $$$$$$$$$$$$$$$$$$$$ ) {
|
||||
#
|
||||
# Handle early matches
|
||||
#
|
||||
if ( $raw_matches =~ s/s*\+// ) {
|
||||
if ( $raw_matches =~ s/^s*\+// ) {
|
||||
$prerule = $raw_matches;
|
||||
$raw_matches = '';
|
||||
}
|
||||
@@ -2658,9 +2700,7 @@ sub process_rule ( $$$$$$$$$$$$$$$$$$$$ ) {
|
||||
$macro_nest_level--;
|
||||
goto EXIT;
|
||||
} elsif ( $actiontype & NFQ ) {
|
||||
$action = handle_nfqueue( $param,
|
||||
1 # Allow 'bypass'
|
||||
);
|
||||
$action = handle_nfqueue( $param );
|
||||
} elsif ( $actiontype & SET ) {
|
||||
require_capability( 'IPSET_MATCH', 'SET and UNSET rules', '' );
|
||||
fatal_error "$action rules require a set name parameter" unless $param;
|
||||
@@ -3659,6 +3699,7 @@ sub next_section() {
|
||||
#
|
||||
sub build_zone_list( $$$\$\$ ) {
|
||||
my ($fw, $input, $which, $intrazoneref, $wildref ) = @_;
|
||||
my $original_input = $input;
|
||||
my $any = ( $input =~ s/^any/all/ );
|
||||
my $exclude;
|
||||
my $rest;
|
||||
@@ -3687,9 +3728,25 @@ sub build_zone_list( $$$\$\$ ) {
|
||||
if ( $input eq 'all+' ) {
|
||||
$$intrazoneref = 1;
|
||||
} elsif ( ( $input eq 'all+-' ) || ( $input eq 'all-+' ) ) {
|
||||
unless ( $excludefw++ ) {
|
||||
if ( $any ) {
|
||||
warning_message "$original_input is deprecated in favor of 'any+!\$FW'";
|
||||
} else {
|
||||
warning_message "$original_input is deprecated in favor of 'all+!\$FW'";
|
||||
}
|
||||
}
|
||||
|
||||
$$intrazoneref = 1;
|
||||
$exclude{$fw} = 1;
|
||||
} elsif ( $input eq 'all-' ) {
|
||||
unless ( $excludefw++ ) {
|
||||
if ( $any ) {
|
||||
warning_message "any- is deprecated in favor of 'any!\$FW'";
|
||||
} else {
|
||||
warning_message "all- is deprecated in favor of 'all!\$FW'" unless $excludefw++;
|
||||
}
|
||||
}
|
||||
|
||||
$exclude{$fw} = 1;
|
||||
} else {
|
||||
fatal_error "Invalid $which ($input)";
|
||||
@@ -4889,7 +4946,7 @@ sub process_mangle_rule1( $$$$$$$$$$$$$$$$$$$ ) {
|
||||
#
|
||||
# Handle early matches
|
||||
#
|
||||
if ( $raw_matches =~ s/s*\+// ) {
|
||||
if ( $raw_matches =~ s/^s*\+// ) {
|
||||
$prerule = $raw_matches;
|
||||
$raw_matches = '';
|
||||
}
|
||||
@@ -5710,9 +5767,9 @@ sub process_snat1( $$$$$$$$$$$$ ) {
|
||||
fatal_error "Invalid IPv6 Address ($addr)" unless $addr =~ /^\[(.+)\]$/;
|
||||
|
||||
$addr = $1;
|
||||
$addr =~ s/\]-\[/-/;
|
||||
|
||||
if ( $addr =~ /^(.+)-(.+)$/ ) {
|
||||
fatal_error "Correct address range syntax is '[<addr1>-<addr2>]'" if $addr =~ /]-\[/;
|
||||
validate_range( $1, $2 );
|
||||
} else {
|
||||
validate_address $addr, 0;
|
||||
|
@@ -10,7 +10,7 @@
|
||||
# Modified by Tom Eastep for integration into the Shorewall distribution
|
||||
# published under GPL Version 2#
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# This program is part of Shorewall.
|
||||
#
|
||||
@@ -2284,11 +2284,11 @@ sub open_mangle_for_output( $ ) {
|
||||
#
|
||||
# For information about entries in this file, type "man shorewall-mangle"
|
||||
#
|
||||
# See http://shorewall.net/traffic_shaping.htm for additional information.
|
||||
# See http://shorewall.org/traffic_shaping.htm for additional information.
|
||||
# For usage in selecting among multiple ISPs, see
|
||||
# http://shorewall.net/MultiISP.html
|
||||
# http://shorewall.org/MultiISP.html
|
||||
#
|
||||
# See http://shorewall.net/PacketMarking.html for a detailed description of
|
||||
# See http://shorewall.org/PacketMarking.html for a detailed description of
|
||||
# the Netfilter/Shorewall packet marking mechanism.
|
||||
##############################################################################################################################################################
|
||||
#ACTION SOURCE DEST PROTO DEST SOURCE USER TEST LENGTH TOS CONNBYTES HELPER PROBABILITY DSCP SWITCH
|
||||
@@ -2300,11 +2300,11 @@ EOF
|
||||
#
|
||||
# For information about entries in this file, type "man shorewall6-mangle"
|
||||
#
|
||||
# See http://shorewall.net/traffic_shaping.htm for additional information.
|
||||
# See http://shorewall.org/traffic_shaping.htm for additional information.
|
||||
# For usage in selecting among multiple ISPs, see
|
||||
# http://shorewall.net/MultiISP.html
|
||||
# http://shorewall.org/MultiISP.html
|
||||
#
|
||||
# See http://shorewall.net/PacketMarking.html for a detailed description of
|
||||
# See http://shorewall.org/PacketMarking.html for a detailed description of
|
||||
# the Netfilter/Shorewall packet marking mechanism.
|
||||
#
|
||||
######################################################################################################################################################################
|
||||
@@ -2455,7 +2455,7 @@ sub setup_tc( $ ) {
|
||||
}
|
||||
}
|
||||
} elsif ( -f ( my $fn = find_file( 'tcrules' ) ) ) {
|
||||
warning_message "The tcrules file is no longer supported -- use '$product update' to convert $fn to an equivalent 'mangle' file";
|
||||
warning_message "The tcrules file is no longer supported -- use '$shorewallrc{product} update' to convert $fn to an equivalent 'mangle' file";
|
||||
}
|
||||
|
||||
if ( my $fn = open_file( 'mangle', 1, 1 ) ) {
|
||||
|
@@ -4,7 +4,7 @@
|
||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||
# (c) 2007-2016 - Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# This program is part of Shorewall.
|
||||
#
|
||||
|
@@ -3,9 +3,9 @@
|
||||
#
|
||||
# This program is under GPL [http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt]
|
||||
#
|
||||
# (c) 2007,2008,2009,2010,2011-2017 - Tom Eastep (teastep@shorewall.net)
|
||||
# (c) 2007-2019 - Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# This program is part of Shorewall.
|
||||
#
|
||||
@@ -222,6 +222,9 @@ use constant { IN_OUT => 1,
|
||||
IN => 2,
|
||||
OUT => 3 };
|
||||
|
||||
#
|
||||
# Zone types
|
||||
#
|
||||
use constant { FIREWALL => 1,
|
||||
IP => 2,
|
||||
BPORT => 4,
|
||||
@@ -231,6 +234,9 @@ use constant { FIREWALL => 1,
|
||||
LOCAL => 64,
|
||||
};
|
||||
|
||||
#
|
||||
# Interface option classification
|
||||
#
|
||||
use constant { SIMPLE_IF_OPTION => 1,
|
||||
BINARY_IF_OPTION => 2,
|
||||
ENUM_IF_OPTION => 3,
|
||||
@@ -247,11 +253,17 @@ use constant { SIMPLE_IF_OPTION => 1,
|
||||
IF_OPTION_WILDOK => 64
|
||||
};
|
||||
|
||||
#
|
||||
# 'ignore' option flags
|
||||
#
|
||||
use constant { NO_UPDOWN => 1,
|
||||
NO_SFILTER => 2 };
|
||||
|
||||
our %validinterfaceoptions;
|
||||
|
||||
#
|
||||
# Interface options that are implemented in /proc
|
||||
#
|
||||
our %procinterfaceoptions=( accept_ra => 1,
|
||||
arp_filter => 1,
|
||||
arp_ignore => 1,
|
||||
@@ -263,6 +275,9 @@ our %procinterfaceoptions=( accept_ra => 1,
|
||||
sourceroute => 1,
|
||||
);
|
||||
|
||||
#
|
||||
# Options that are not allowed with unmanaged interfaces
|
||||
#
|
||||
our %prohibitunmanaged = (
|
||||
blacklist => 1,
|
||||
bridge => 1,
|
||||
@@ -281,10 +296,15 @@ our %prohibitunmanaged = (
|
||||
upnp => 1,
|
||||
upnpclient => 1,
|
||||
);
|
||||
|
||||
#
|
||||
# Default values for options that admit an optional value
|
||||
#
|
||||
our %defaultinterfaceoptions = ( routefilter => 1 , wait => 60, accept_ra => 1 , ignore => 3, routeback => 1 );
|
||||
|
||||
our %maxoptionvalue = ( routefilter => 2, mss => 100000 , wait => 120 , ignore => NO_UPDOWN | NO_SFILTER, accept_ra => 2 );
|
||||
#
|
||||
# Maximum value for options that accept a range of values
|
||||
#
|
||||
our %maxoptionvalue = ( routefilter => 2, mss => 100000 , wait => 300 , ignore => NO_UPDOWN | NO_SFILTER, accept_ra => 2 );
|
||||
|
||||
our %validhostoptions;
|
||||
|
||||
@@ -701,7 +721,7 @@ sub determine_zones()
|
||||
}
|
||||
|
||||
#
|
||||
# Return true of we have any ipsec zones
|
||||
# Return true If we have any ipsec zones
|
||||
#
|
||||
sub haveipseczones() {
|
||||
for my $zoneref ( values %zones ) {
|
||||
@@ -872,6 +892,9 @@ sub single_interface( $ ) {
|
||||
@keys == 1 ? $keys[0] : '';
|
||||
}
|
||||
|
||||
#
|
||||
# This function adds an interface:network pair to a zone
|
||||
#
|
||||
sub add_group_to_zone($$$$$$)
|
||||
{
|
||||
my ($zone, $type, $interface, $networks, $options, $inherit_options) = @_;
|
||||
@@ -976,6 +999,9 @@ sub find_zone( $ ) {
|
||||
$zoneref;
|
||||
}
|
||||
|
||||
#
|
||||
# Access functions for zone members
|
||||
#
|
||||
sub zone_type( $ ) {
|
||||
find_zone( $_[0] )->{type};
|
||||
}
|
||||
@@ -990,26 +1016,44 @@ sub zone_mark( $ ) {
|
||||
$zoneref->{mark};
|
||||
}
|
||||
|
||||
#
|
||||
# Returns the zone table entry for the passed zone name
|
||||
#
|
||||
sub defined_zone( $ ) {
|
||||
$zones{$_[0]};
|
||||
}
|
||||
|
||||
#
|
||||
# Returns a list of all defined zones
|
||||
#
|
||||
sub all_zones() {
|
||||
@zones;
|
||||
}
|
||||
|
||||
#
|
||||
# Returns a list of zones in the firewall itself (the firewall zone and vserver zones)
|
||||
#
|
||||
sub on_firewall_zones() {
|
||||
grep ( ( $zones{$_}{type} & ( FIREWALL | VSERVER ) ) , @zones );
|
||||
}
|
||||
|
||||
#
|
||||
# Returns a list of zones excluding the firewall and vserver zones
|
||||
#
|
||||
sub off_firewall_zones() {
|
||||
grep ( ! ( $zones{$_}{type} & ( FIREWALL | VSERVER ) ) , @zones );
|
||||
}
|
||||
|
||||
#
|
||||
# Returns a list of zones excluding the firewall zones
|
||||
#
|
||||
sub non_firewall_zones() {
|
||||
grep ( ! ( $zones{$_}{type} & FIREWALL ) , @zones );
|
||||
}
|
||||
|
||||
#
|
||||
# Returns the list of zones that don't contain sub-zones
|
||||
#
|
||||
sub all_parent_zones() {
|
||||
#
|
||||
# Although the firewall zone is technically a parent zone, we let the caller decide
|
||||
@@ -1018,22 +1062,37 @@ sub all_parent_zones() {
|
||||
grep ( ! @{$zones{$_}{parents}} , off_firewall_zones );
|
||||
}
|
||||
|
||||
#
|
||||
# Returns a list of complex zones (ipsec or with multiple interface:subnets)
|
||||
#
|
||||
sub complex_zones() {
|
||||
grep( $zones{$_}{complex} , @zones );
|
||||
}
|
||||
|
||||
#
|
||||
# Returns a list of vserver zones
|
||||
#
|
||||
sub vserver_zones() {
|
||||
grep ( $zones{$_}{type} & VSERVER, @zones );
|
||||
}
|
||||
|
||||
#
|
||||
# Returns the name of the firewall zone
|
||||
#
|
||||
sub firewall_zone() {
|
||||
$firewall_zone;
|
||||
}
|
||||
|
||||
#
|
||||
# Returns a list of loopback zones
|
||||
#
|
||||
sub loopback_zones() {
|
||||
@loopback_zones;
|
||||
}
|
||||
|
||||
#
|
||||
# Returns a list of local zones
|
||||
#
|
||||
sub local_zones() {
|
||||
@local_zones;
|
||||
}
|
||||
@@ -1182,7 +1241,7 @@ sub process_interface( $$ ) {
|
||||
fatal_error "Invalid INTERFACE ($originalinterface)" if ! $interface || defined $extra;
|
||||
|
||||
if ( supplied $port ) {
|
||||
fatal_error qq("Virtual" interfaces are not supported -- see http://www.shorewall.net/Shorewall_and_Aliased_Interfaces.html) if $port =~ /^\d+$/;
|
||||
fatal_error qq("Virtual" interfaces are not supported -- see http://www.shorewall.org/Shorewall_and_Aliased_Interfaces.html) if $port =~ /^\d+$/;
|
||||
require_capability( 'PHYSDEV_MATCH', 'Bridge Ports', '');
|
||||
fatal_error "Your iptables is not recent enough to support bridge ports" unless $globals{KLUDGEFREE};
|
||||
|
||||
|
@@ -4,7 +4,7 @@
|
||||
#
|
||||
# (c) 2007,2008,2009,2010,2011,2014 - Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# This program is part of Shorewall.
|
||||
#
|
||||
@@ -34,6 +34,8 @@
|
||||
# --debug # Print stack trace on warnings and fatal error.
|
||||
# --log=<filename> # Log file
|
||||
# --log_verbosity=<number> # Log Verbosity range -1 to 2
|
||||
# --test # Used by the regression library to omit versions and time/dates
|
||||
# # from the generated script
|
||||
# --family=<number> # IP family; 4 = IPv4 (default), 6 = IPv6
|
||||
# --preview # Preview the ruleset.
|
||||
# --shorewallrc=<path> # Path to global shorewallrc file.
|
||||
|
@@ -4,7 +4,7 @@
|
||||
#
|
||||
# (c) 2010,2011,2014 - Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# Complete documentation is available at http://shorewall.net
|
||||
# Complete documentation is available at http://shorewall.org
|
||||
#
|
||||
# This program is part of Shorewall.
|
||||
#
|
||||
|
@@ -1,4 +1,4 @@
|
||||
# (c) 1999-2018 - Tom Eastep (teastep@shorewall.net)
|
||||
# (c) 1999-2019 - Tom Eastep (teastep@shorewall.net)
|
||||
#
|
||||
# This program is part of Shorewall.
|
||||
#
|
||||
@@ -897,6 +897,14 @@ detect_dynamic_gateway() { # $1 = interface
|
||||
fi
|
||||
done
|
||||
|
||||
if [ -z "$gateway" -a -n "$(mywhich nmcli)" ]; then
|
||||
if [ $g_family = 4 ]; then
|
||||
gateway=$(nmcli --fields DHCP4.OPTION,IP4.GATEWAY device show ${1} 2> /dev/null | sed -rn '/( routers = |IP4.GATEWAY:.*[1-9])/{s/.* //;p;q}')
|
||||
else
|
||||
gateway=$(nmcli --terse --fields IP6.GATEWAY device show ${1} 2> /dev/null | cut -f2- -d':')
|
||||
fi
|
||||
fi
|
||||
|
||||
[ -n "$gateway" ] && echo $gateway
|
||||
}
|
||||
|
||||
|
@@ -42,6 +42,7 @@ usage() {
|
||||
echo " up <interface>"
|
||||
echo " savesets <file>"
|
||||
echo " call <function> [ <parameter> ... ]"
|
||||
echo " help"
|
||||
echo " version"
|
||||
echo " info"
|
||||
echo
|
||||
@@ -54,6 +55,8 @@ usage() {
|
||||
echo " -c Save/restore iptables counters"
|
||||
echo " -V <verbosity> Set verbosity explicitly"
|
||||
echo " -R <file> Override RESTOREFILE setting"
|
||||
echo " -T Trace execution"
|
||||
echo " -D Debug iptables"
|
||||
exit $1
|
||||
}
|
||||
|
||||
@@ -109,20 +112,6 @@ reload_command() {
|
||||
# E X E C U T I O N B E G I N S H E R E #
|
||||
################################################################################
|
||||
#
|
||||
# Start trace if first arg is "debug" or "trace"
|
||||
#
|
||||
g_debug_iptables=
|
||||
|
||||
if [ $# -gt 1 ]; then
|
||||
if [ "x$1" = "xtrace" ]; then
|
||||
set -x
|
||||
shift
|
||||
elif [ "x$1" = "xdebug" ]; then
|
||||
g_debug_iptables=Yes
|
||||
shift
|
||||
fi
|
||||
fi
|
||||
#
|
||||
# Map VERBOSE to VERBOSITY for compatibility with old Shorewall[6]-lite installations
|
||||
#
|
||||
[ -z "$VERBOSITY" ] && [ -n "$VERBOSE" ] && VERBOSITY=$VERBOSE
|
||||
@@ -148,9 +137,11 @@ g_compiled=
|
||||
g_file=
|
||||
g_docker=
|
||||
g_dockeringress=
|
||||
g_dockernetwork=
|
||||
g_dockeriso=
|
||||
g_dockerisostage=
|
||||
g_forcereload=
|
||||
g_fallback=
|
||||
g_debug_iptables=
|
||||
|
||||
[ -n "$SERVICEDIR" ] && SUBSYSLOCK=
|
||||
|
||||
@@ -257,6 +248,14 @@ while [ $finished -eq 0 -a $# -gt 0 ]; do
|
||||
RESTOREFILE=$option
|
||||
option=
|
||||
;;
|
||||
T*)
|
||||
set -x;
|
||||
option=${option#T}
|
||||
;;
|
||||
D*)
|
||||
g_debug_iptables=Yes
|
||||
option=${option#D}
|
||||
;;
|
||||
*)
|
||||
usage 1
|
||||
;;
|
||||
|
@@ -1,6 +1,6 @@
|
||||
For instructions on using these sample configurations, please see
|
||||
|
||||
http://www.shorewall.net/shorewall_quickstart_guide.htm
|
||||
http://www.shorewall.org/shorewall_quickstart_guide.htm
|
||||
|
||||
Shorewall Samples
|
||||
Copyright (C) 2006 by the following authors:
|
||||
|
@@ -4,7 +4,7 @@
|
||||
# For information about entries in this file, type "man shorewall-interfaces"
|
||||
#
|
||||
# The manpage is also online at
|
||||
# http://www.shorewall.net/manpages/shorewall-interfaces.html
|
||||
# http://www.shorewall.org/manpages/shorewall-interfaces.html
|
||||
#
|
||||
###############################################################################
|
||||
?FORMAT 2
|
||||
|
@@ -4,7 +4,7 @@
|
||||
# For information about entries in this file, type "man shorewall-policy"
|
||||
#
|
||||
# The manpage is also online at
|
||||
# http://www.shorewall.net/manpages/shorewall-policy.html
|
||||
# http://www.shorewall.org/manpages/shorewall-policy.html
|
||||
#
|
||||
###############################################################################
|
||||
#SOURCE DEST POLICY LOGLEVEL RATE CONNLIMIT
|
||||
|
@@ -4,7 +4,7 @@
|
||||
# For information on the settings in this file, type "man shorewall-rules"
|
||||
#
|
||||
# The manpage is also online at
|
||||
# http://www.shorewall.net/manpages/shorewall-rules.html
|
||||
# http://www.shorewall.org/manpages/shorewall-rules.html
|
||||
#
|
||||
######################################################################################################################################################################################################
|
||||
#ACTION SOURCE DEST PROTO DEST SOURCE ORIGINAL RATE USER/ MARK CONNLIMIT TIME HEADERS SWITCH HELPER
|
||||
|
@@ -4,7 +4,7 @@
|
||||
#
|
||||
# For information about the settings in this file, type "man shorewall.conf"
|
||||
#
|
||||
# Manpage also online at http://www.shorewall.net/manpages/shorewall.conf.html
|
||||
# Manpage also online at http://www.shorewall.org/manpages/shorewall.conf.html
|
||||
###############################################################################
|
||||
# S T A R T U P E N A B L E D
|
||||
###############################################################################
|
||||
@@ -163,6 +163,8 @@ DISABLE_IPV6=No
|
||||
|
||||
DOCKER=No
|
||||
|
||||
DOCKER_BRIDGE=docker0
|
||||
|
||||
DELETE_THEN_ADD=Yes
|
||||
|
||||
DETECT_DNAT_IPADDRS=No
|
||||
@@ -191,8 +193,6 @@ IP_FORWARDING=On
|
||||
|
||||
KEEP_RT_TABLES=No
|
||||
|
||||
LOAD_HELPERS_ONLY=Yes
|
||||
|
||||
MACLIST_TABLE=filter
|
||||
|
||||
MACLIST_TTL=
|
||||
|
@@ -4,7 +4,7 @@
|
||||
# For information about this file, type "man shorewall-zones"
|
||||
#
|
||||
# The manpage is also online at
|
||||
# http://www.shorewall.net/manpages/shorewall-zones.html
|
||||
# http://www.shorewall.org/manpages/shorewall-zones.html
|
||||
#
|
||||
###############################################################################
|
||||
#ZONE TYPE OPTIONS IN OUT
|
||||
|
@@ -1,6 +1,6 @@
|
||||
For instructions on using this sample configuration, please see
|
||||
|
||||
http://www.shorewall.net/standalone.htm
|
||||
http://www.shorewall.org/standalone.htm
|
||||
|
||||
Shorewall Samples
|
||||
Copyright (C) 2006-2015 by the following authors:
|
||||
|
@@ -14,7 +14,7 @@
|
||||
# For information about the settings in this file, type "man shorewall.conf"
|
||||
#
|
||||
# The manpage is also online at
|
||||
# http://shorewall.net/manpages/shorewall.conf.html
|
||||
# http://shorewall.org/manpages/shorewall.conf.html
|
||||
#
|
||||
###############################################################################
|
||||
# S T A R T U P E N A B L E D
|
||||
@@ -174,6 +174,8 @@ DISABLE_IPV6=No
|
||||
|
||||
DOCKER=No
|
||||
|
||||
DOCKER_BRIDGE=docker0
|
||||
|
||||
DELETE_THEN_ADD=Yes
|
||||
|
||||
DETECT_DNAT_IPADDRS=No
|
||||
@@ -202,8 +204,6 @@ IP_FORWARDING=Off
|
||||
|
||||
KEEP_RT_TABLES=No
|
||||
|
||||
LOAD_HELPERS_ONLY=Yes
|
||||
|
||||
MACLIST_TABLE=filter
|
||||
|
||||
MACLIST_TTL=
|
||||
|
@@ -1,6 +1,6 @@
|
||||
For instructions on using these sample configurations, please see
|
||||
|
||||
http://www.shorewall.net/three-interface.htm
|
||||
http://www.shorewall.org/three-interface.htm
|
||||
|
||||
Shorewall Samples
|
||||
Copyright (C) 2006-2015 by the following authors:
|
||||
|
@@ -14,7 +14,7 @@
|
||||
# For information about the settings in this file, type "man shorewall.conf"
|
||||
#
|
||||
# The manpage is also online at
|
||||
# http://shorewall.net/manpages/shorewall.conf.html
|
||||
# http://shorewall.org/manpages/shorewall.conf.html
|
||||
#
|
||||
###############################################################################
|
||||
STARTUP_ENABLED=No
|
||||
@@ -171,6 +171,8 @@ DISABLE_IPV6=No
|
||||
|
||||
DOCKER=No
|
||||
|
||||
DOCKER_BRIDGE=docker0
|
||||
|
||||
DELETE_THEN_ADD=Yes
|
||||
|
||||
DETECT_DNAT_IPADDRS=No
|
||||
@@ -199,8 +201,6 @@ IP_FORWARDING=On
|
||||
|
||||
KEEP_RT_TABLES=No
|
||||
|
||||
LOAD_HELPERS_ONLY=Yes
|
||||
|
||||
MACLIST_TABLE=filter
|
||||
|
||||
MACLIST_TTL=
|
||||
|
@@ -11,7 +11,7 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# For information about entries in this file, type "man shorewall-snat"
|
||||
#
|
||||
# See http://shorewall.net/manpages/shorewall-snat.html for more information
|
||||
# See http://shorewall.org/manpages/shorewall-snat.html for more information
|
||||
###########################################################################################################################################
|
||||
#ACTION SOURCE DEST PROTO PORT IPSEC MARK USER SWITCH ORIGDEST PROBABILITY
|
||||
#
|
||||
|
@@ -1,6 +1,6 @@
|
||||
For instructions on using these sample configurations, please see
|
||||
|
||||
http://www.shorewall.net/two-interface.htm
|
||||
http://www.shorewall.org/two-interface.htm
|
||||
|
||||
Shorewall Samples
|
||||
Copyright (C) 2006-2015 by the following authors:
|
||||
|
@@ -14,7 +14,7 @@
|
||||
# For information about the settings in this file, type "man shorewall.conf"
|
||||
#
|
||||
# The manpage is also online at
|
||||
# http://shorewall.net/manpages/shorewall.conf.html
|
||||
# http://shorewall.org/manpages/shorewall.conf.html
|
||||
#
|
||||
###############################################################################
|
||||
# S T A R T U P E N A B L E D
|
||||
@@ -174,6 +174,8 @@ DISABLE_IPV6=No
|
||||
|
||||
DOCKER=No
|
||||
|
||||
DOCKER_BRIDGE=docker0
|
||||
|
||||
DELETE_THEN_ADD=Yes
|
||||
|
||||
DETECT_DNAT_IPADDRS=No
|
||||
@@ -202,8 +204,6 @@ IP_FORWARDING=On
|
||||
|
||||
KEEP_RT_TABLES=No
|
||||
|
||||
LOAD_HELPERS_ONLY=Yes
|
||||
|
||||
MACLIST_TABLE=filter
|
||||
|
||||
MACLIST_TTL=
|
||||
|
@@ -11,7 +11,7 @@
|
||||
#------------------------------------------------------------------------------
|
||||
# For information about entries in this file, type "man shorewall-snat"
|
||||
#
|
||||
# See http://shorewall.net/manpages/shorewall-snat.html for more information
|
||||
# See http://shorewall.org/manpages/shorewall-snat.html for more information
|
||||
###########################################################################################################################################
|
||||
#ACTION SOURCE DEST PROTO PORT IPSEC MARK USER SWITCH ORIGDEST PROBABILITY
|
||||
#
|
||||
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user