shorewall-core-5.2.3.4/0000775000000000000000000000000013531077634013322 5ustar rootrootshorewall-core-5.2.3.4/shorewallrc.default0000664000000000000000000000364313531060406017210 0ustar rootroot# # Default Shorewall 5.2 rc file # BUILD= #Default is to detect the build system HOST=linux #Generic Linux PREFIX=/usr #Top-level directory for shared files, libraries, etc. SHAREDIR=${PREFIX}/share #Directory for arch-neutral files. LIBEXECDIR=${PREFIX}/share #Directory for executable scripts. PERLLIBDIR=${PREFIX}/share/shorewall #Directory to install Shorewall Perl module directory CONFDIR=/etc #Directory where subsystem configurations are installed SBINDIR=/sbin #Directory where system administration programs are installed MANDIR=${PREFIX}/man #Directory where manpages are installed. INITDIR=/etc/init.d #Directory where SysV init scripts are installed. INITFILE=$PRODUCT #Name of the product's installed SysV init script INITSOURCE=init.sh #Name of the distributed file to be installed as the SysV init script ANNOTATED= #If non-zero, annotated configuration files are installed SERVICEDIR= #Directory where .service files are installed (systems running systemd only) SERVICEFILE= #Name of the file to install in $SYSTEMD. Default is $PRODUCT.service SYSCONFFILE= #Name of the distributed file to be installed in $SYSCONFDIR SYSCONFDIR= #Directory where SysV init parameter files are installed SPARSE= #If non-empty, only install $PRODUCT/$PRODUCT.conf in $CONFDIR VARLIB=/var/lib #Directory where product variable data is stored. VARDIR=${VARLIB}/$PRODUCT #Directory where product variable data is stored. DEFAULT_PAGER= #Pager to use if none specified in shorewall[6].conf shorewall-core-5.2.3.4/shorewallrc.openwrt0000664000000000000000000000351413531060406017257 0ustar rootroot# # OpenWRT/LEDE Shorewall 5.2 rc file # BUILD= #Default is to detect the build system HOST=openwrt PREFIX=/usr #Top-level directory for shared files, libraries, etc. SHAREDIR=${PREFIX}/share #Directory for arch-neutral files. LIBEXECDIR=${PREFIX}/share #Directory for executable scripts. PERLLIBDIR=${PREFIX}/share/shorewall #Directory to install Shorewall Perl module directory CONFDIR=/etc #Directory where subsystem configurations are installed SBINDIR=/sbin #Directory where system administration programs are installed MANDIR= #Directory where manpages are installed. INITDIR=/etc/init.d #Directory where SysV init scripts are installed. INITFILE=$PRODUCT #Name of the product's installed SysV init script INITSOURCE=init.openwrt.sh #Name of the distributed file to be installed as the SysV init script ANNOTATED= #If non-zero, annotated configuration files are installed SYSCONFDIR=${CONFDIR}/sysconfig #Directory where SysV init parameter files are installed SYSCONFFILE=sysconfig #Name of the distributed file to be installed in $SYSCONFDIR SERVICEDIR= #Directory where .service files are installed (systems running systemd only) SERVICEFILE= #Name of the file to install in $SYSTEMD. Default is $PRODUCT.service SPARSE= #If non-empty, only install $PRODUCT/$PRODUCT.conf in $CONFDIR VARLIB=/lib #Directory where product variable data is stored. VARDIR=${VARLIB}/$PRODUCT #Directory where product variable data is stored. DEFAULT_PAGER= #Pager to use if none specified in shorewall[6].conf shorewall-core-5.2.3.4/lib.uninstaller0000664000000000000000000000441113531060406016337 0ustar rootroot# # Shorewall 5.2 -- /usr/share/shorewall/lib.installer # # (c) 2017 - Tom Eastep (teastep@shorewall.net) # (c) 2017 - Matt Darfeuille (matdarf@gmail.com) # # Complete documentation is available at http://shorewall.net # # This program is part of Shorewall. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by the # Free Software Foundation, either version 2 of the license or, at your # option, any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # The purpose of this library is to hold those functions used by the products uninstaller. # ######################################################################################### fatal_error() { echo " ERROR: $@" >&2 exit 1 } split() { local ifs ifs=$IFS IFS=: set -- $1 echo $* IFS=$ifs } qt() { "$@" >/dev/null 2>&1 } mywhich() { local dir for dir in $(split $PATH); do if [ -x $dir/$1 ]; then return 0 fi done return 2 } remove_file() # $1 = file to remove { if [ -n "$1" ] ; then if [ -f $1 -o -h $1 ] ; then rm -f $1 echo "$1 Removed" fi fi } remove_directory() # $1 = directory to remove { if [ -n "$1" ] ; then if [ -d $1 ] ; then rm -rf $1 echo "$1 Removed" fi fi } remove_file_with_wildcard() # $1 = file with wildcard to remove { if [ -n "$1" ] ; then for f in $1; do if [ -d $f ] ; then rm -rf $f echo "$f Removed" elif [ -f $f -o -h $f ] ; then rm -f $f echo "$f Removed" fi done fi } restore_file() # $1 = file to restore { if [ -f ${1}-shorewall.bkout ]; then if (mv -f ${1}-shorewall.bkout $1); then echo echo "$1 restored" else exit 1 fi fi } shorewall-core-5.2.3.4/known_problems.txt0000664000000000000000000000534313531077634017127 0ustar rootroot1) On systems running Upstart, shorewall-init cannot reliably secure the firewall before interfaces are brought up. 2) The 'enable', 'reenable' and 'disable' commands do not work correctly in configurations with USE_DEFAULT_RT=No and optional providers listed in the DUPLICATE column. 3) While the 'ip' utility now accepts IPv6 routes with multiple 'nexthop' destinations, these routes are not balanced. They are rather instantiated as a sequence of single routes with different metrics. Furthermore, the 'ip route replace' command fails on such routes. Beginning with Shorewall6 5.0.15, the generated script uses a "delete..add.." sequence on these routes rather than a single "replace" command. 4) If more than one zone is excluded in a policy file entry, an error similar to the following is raised: ERROR: 'all' is not allowed in a source zone list /etc/shorewall/policy (line 8) Corrected in Shorewall 5.2.3.1 5) Shorewall 5.2 automatically converts and existing 'masq' file to an equivalent 'snat' file. Regrettably, Shorewall 5.2.3 broke that automatic update, such that the following error message was issued: Use of uninitialized value $Shorewall::Nat::rawcurrentline in pattern match (m//) at /usr/share/shorewall/Shorewall/Nat.pm line 511, <$currentfile> line nnn. and the generted 'masq' file contains only initial comments. Workaround: After upgrading to 5.2.3, issue this command: 'shorewall[6] update' Corrected in 5.2.3.2. 6) If an ipset is listed in the SPORT column, the compiler raises an error similar to: ERROR: Invalid ipset name () /etc/shorewall/rules (line 44) Corrected in 5.2.3.3. 7) If multi-queue NFQUEUE (e.g., NFQUEUE(0:1) ) is used as a policy, an error such as the following is incorrectly raised. ERROR: Invalid policy (NFQUEUE(0) /etc/shorewall/policy (line 15) Corrected in 5.2.3.4. 8) If multi-queue NFQUEUE( e.g., NFQUEUE(0:1,bypass) ) is passed to a macro, an error such as the following is incorrectly raised: ERROR: Invalid ACTION (PARAM:1c,bypass))) /usr/share/shorewall/macro.BitTorrent (line 12) from /etc/shorewall/rules (line 40) Corrected in 5.2.3.4. 9) If shorewall[6].conf doesn't set AUTOMAKE, the 'update' command will produce a new file with 'AUTOMAKE=Yes'. This results in an unexpected change of behavior. Corrected in 5.2.3.4. 10) Shorewall-rules(5) incorrectly states that the 'bypass' option to NFQUEUE causes the rule to be silently bypassed if there is no application attached to the queue. The actual behavior is that the rule acts like ACCEPT. Corrected in 5.2.3.4. shorewall-core-5.2.3.4/shorewallrc.debian.systemd0000664000000000000000000000307413531060406020473 0ustar rootroot# # Debian Shorewall 5.2 rc file # BUILD= #Default is to detect the build system HOST=debian PREFIX=/usr #Top-level directory for shared files, libraries, etc. SHAREDIR=${PREFIX}/share #Directory for arch-neutral files. LIBEXECDIR=${PREFIX}/share #Directory for executable scripts. PERLLIBDIR=${PREFIX}/share/shorewall #Directory to install Shorewall Perl module directory CONFDIR=/etc #Directory where subsystem configurations are installed SBINDIR=/sbin #Directory where system administration programs are installed MANDIR=${PREFIX}/share/man #Directory where manpages are installed. INITDIR= #Directory where SysV init scripts are installed. INITFILE= #Name of the product's installed SysV init script INITSOURCE=init.debian.sh #Name of the distributed file to be installed as the SysV init script ANNOTATED= #If non-empty, annotated configuration files are installed SYSCONFFILE=default.debian.systemd #Name of the distributed file to be installed in $SYSCONFDIR SERVICEFILE=$PRODUCT.service.debian #Name of the file to install in $SYSTEMD. Default is $PRODUCT.service SYSCONFDIR=/etc/default #Directory where SysV init parameter files are installed SERVICEDIR=/lib/systemd/system #Directory where .service files are installed (systems running systemd only) SPARSE=Yes #If non-empty, only install $PRODUCT/$PRODUCT.conf in $CONFDIR VARLIB=/var/lib #Directory where product variable data is stored. VARDIR=${VARLIB}/$PRODUCT #Directory where product variable data is stored. DEFAULT_PAGER=/usr/bin/less #Pager to use if none specified in shorewall[6].conf shorewall-core-5.2.3.4/shorewallrc.debian.sysvinit0000664000000000000000000000353213531060406020672 0ustar rootroot# # Debian Shorewall 5.2 rc file # BUILD= #Default is to detect the build system HOST=debian PREFIX=/usr #Top-level directory for shared files, libraries, etc. SHAREDIR=${PREFIX}/share #Directory for arch-neutral files. LIBEXECDIR=${PREFIX}/share #Directory for executable scripts. PERLLIBDIR=${PREFIX}/share/shorewall #Directory to install Shorewall Perl module directory CONFDIR=/etc #Directory where subsystem configurations are installed SBINDIR=/sbin #Directory where system administration programs are installed MANDIR=${PREFIX}/share/man #Directory where manpages are installed. INITDIR=/etc/init.d #Directory where SysV init scripts are installed. INITFILE=$PRODUCT #Name of the product's installed SysV init script INITSOURCE=init.debian.sh #Name of the distributed file to be installed as the SysV init script ANNOTATED= #If non-zero, annotated configuration files are installed SYSCONFFILE=default.debian.sysvinit #Name of the distributed file to be installed in $SYSCONFDIR SERVICEFILE= #Name of the file to install in $SYSTEMD. Default is $PRODUCT.service SYSCONFDIR=/etc/default #Directory where SysV init parameter files are installed SERVICEDIR= #Directory where .service files are installed (systems running systemd only) SPARSE=Yes #If non-empty, only install $PRODUCT/$PRODUCT.conf in $CONFDIR VARLIB=/var/lib #Directory where product variable data is stored. VARDIR=${VARLIB}/$PRODUCT #Directory where product variable data is stored. DEFAULT_PAGER=/usr/bin/less #Pager to use if none specified in shorewall[6].conf shorewall-core-5.2.3.4/manpages/0000775000000000000000000000000013531100032015070 5ustar rootrootshorewall-core-5.2.3.4/manpages/shorewall.80000664000000000000000000022541313453771371017217 0ustar rootroot'\" t .\" Title: shorewall .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.79.1 .\" Date: 04/11/2019 .\" Manual: Administrative Commands .\" Source: Administrative Commands .\" Language: English .\" .TH "SHOREWALL" "8" "04/11/2019" "Administrative Commands" "Administrative Commands" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .\" http://bugs.debian.org/507673 .\" http://lists.gnu.org/archive/html/groff/2009-02/msg00013.html .\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" ----------------------------------------------------------------- .\" * set default formatting .\" ----------------------------------------------------------------- .\" disable hyphenation .nh .\" disable justification (adjust text to left margin only) .ad l .\" ----------------------------------------------------------------- .\" * MAIN CONTENT STARTS HERE * .\" ----------------------------------------------------------------- .SH "NAME" shorewall \- Administration tool for Shoreline Firewall (Shorewall) .SH "SYNOPSIS" .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [options] \fBadd\ {\fR \fIinterface\fR[:\fIhost\-list\fR]... \fIzone\fR\fB\ |\fR\fI\ zone\ host\-list\fR\fB\ }\fR .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [options] \fBallow\fR \fIaddress\fR .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [options] \fBblacklist\fR \fIaddress\fR\ [\fIoption\fR\ \&.\&.\&.] .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [options] \fBcall\fR \fIfunction\fR\ [\fIparameter\fR\ \&.\&.\&.] .HP \w'\fBshorewall[6]\fR\ 'u \fBshorewall[6]\fR [\fBtrace\fR|\fBdebug\fR] [options] [\fBcheck\ |\ ck\ \fR] [\fB\-e\fR] [\fB\-d\fR] [\fB\-p\fR] [\fB\-r\fR] [\fB\-T\fR] [\fB\-i\fR] [\fIdirectory\fR] .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [options] \fBclear\fR\ [\fB\-f\fR] .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [options] \fBclose\fR\ {\ \fIopen\-number\fR\ |\ \fIsource\fR\fIdest\fR\ [\fIprotocol\fR\ [\ \fIport\fR\ ]]}\fI\ \fR .HP \w'\fBshorewall[6]\fR\ 'u \fBshorewall[6]\fR [\fBtrace\fR|\fBdebug\fR] [options] [\fBcompile\ |\ co\ \fR] [\fB\-e\fR] [\fB\-c\fR] [\fB\-d\fR] [\fB\-p\fR] [\fB\-T\fR] [\fB\-i\fR] [\fIdirectory\fR] [\fIpathname\fR] .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [options] \fBdelete\ {\fR \fIinterface\fR[:\fIhost\-list\fR]... \fIzone\fR\fB\ |\fR\fI\ zone\ host\-list\fR\fB\ }\fR .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [options] \fBdisable\fR {\ \fIinterface\fR\ |\ \fIprovider\fR\ } .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [options] \fBdrop\fR \fIaddress\fR .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR] [options] \fBdump\fR [\fB\-x\fR] [\fB\-l\fR] [\fB\-m\fR] [\fB\-c\fR] .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [options] \fBenable\fR {\ \fIinterface\fR\ |\ \fIprovider\fR\ } .HP \w'\fBshorewall[6]\fR\ 'u \fBshorewall[6]\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [options] \fBexport\fR [\fIdirectory1\fR] [\fIuser\fR@]\fIsystem\fR[\fB:\fR\fIdirectory2\fR] .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [options] \fBforget\fR [\fIfilename\fR] .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR] [options] \fBhelp\fR .HP \w'\fBshorewall[\-lite]\fR\ 'u \fBshorewall[\-lite]\fR [\fBtrace\fR|\fBdebug\fR] [options] \fBhits\fR\ [\fB\-t\fR] .HP \w'\fBshorewall[\-lite]\fR\ 'u \fBshorewall[\-lite]\fR [\fBtrace\fR|\fBdebug\fR] [options] \fBipcalc\fR {\fIaddress\fR\ \fImask\fR | \fIaddress\fR/\fIvlsm\fR} .HP \w'\fBshorewall[\-lite]\fR\ 'u \fBshorewall[\-lite]\fR [\fBtrace\fR|\fBdebug\fR] [options] \fBiprange\fR \fIaddress1\fR\fB\-\fR\fIaddress2\fR .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR] [options] \fBiptrace\fR \fIiptables\ match\ expression\fR .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [options] \fBlogdrop\fR \fIaddress\fR .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR] [options] \fBlogwatch\fR [\fB\-m\fR] [\fIrefresh\-interval\fR] .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [options] \fBlogreject\fR \fIaddress\fR .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR] [options] \fBnoiptrace\fR \fIiptables\ match\ expression\fR .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [options] \fBopen\fR\fI\ source\fR\fI\ dest\fR\ [\ \fIprotocol\fR\ [\ \fIport\fR\ ]\ ] .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [options] \fBreenable\fR {\ \fIinterface\fR\ |\ \fIprovider\fR\ } .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [options] \fBreject\fR \fIaddress\fR .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [options] \fBreload\fR [\fB\-n\fR] [\fB\-p\fR\ [\fB\-d\fR]] [\fB\-f\fR] [\fB\-c\fR] [\fB\-T\fR] [\fB\-i\fR] [\fB\-C\fR] [\fIdirectory\fR] .HP \w'\fBshorewall[6]\fR\ 'u \fBshorewall[6]\fR [\fBtrace\fR|\fBdebug\fR] [options] \fBremote\-getcaps\fR [\fB\-s\fR] [\fB\-R\fR] [\fB\-r\fR\ \fIroot\-user\-name\fR] [\fB\-T\fR] [\fB\-i\fR] [[\fB\-D\fR]\fIdirectory\fR] [\fIsystem\fR] .HP \w'\fBshorewall[6]\fR\ 'u \fBshorewall[6]\fR [\fBtrace\fR|\fBdebug\fR] [options] \fBremote\-getrc\fR [\fB\-s\fR] [\fB\-c\fR] [\fB\-r\fR\ \fIroot\-user\-name\fR] [\fB\-T\fR] [\fB\-i\fR] [[\fB\-D\fR]\fIdirectory\fR] [\fIsystem\fR] .HP \w'\fBshorewall[6]\fR\ 'u \fBshorewall[6]\fR [\fBtrace\fR|\fBdebug\fR] [options] \fBremote\-start\fR [\fB\-s\fR] [\fB\-c\fR] [\fB\-r\fR\ \fIroot\-user\-name\fR] [\fB\-T\fR] [\fB\-i\fR] [[\fB\-D\fR]\fIdirectory\fR] [\fIsystem\fR] .HP \w'\fBshorewall[6]\fR\ 'u \fBshorewall[6]\fR [\fBtrace\fR|\fBdebug\fR] [options] \fBremote\-reload\fR [\fB\-s\fR] [\fB\-c\fR] [\fB\-r\fR\ \fIroot\-user\-name\fR] [\fB\-T\fR] [\fB\-i\fR] [[\fB\-D\fR]\fIdirectory\fR] [\fIsystem\fR] .HP \w'\fBshorewall[6]\fR\ 'u \fBshorewall[6]\fR [\fBtrace\fR|\fBdebug\fR] [options] \fBremote\-restart\fR [\fB\-s\fR] [\fB\-c\fR] [\fB\-r\fR\ \fIroot\-user\-name\fR] [\fB\-T\fR] [\fB\-i\fR] [[\fB\-D\fR]\fIdirectory\fR] [\fIsystem\fR] .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [options] \fBreset\fR\ [\fIchain\fR\ \&.\&.\&.] .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [options] \fBrestart\fR [\fB\-n\fR] [\fB\-p\fR\ [\fB\-d\fR]] [\fB\-f\fR] [\fB\-c\fR] [\fB\-T\fR] [\fB\-i\fR] [\fB\-C\fR] [\fIdirectory\fR] .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [options] \fBrestore\fR\ [\fB\-n\fR]\ [\fB\-p\fR]\ [\fB\-C\fR] [\fIfilename\fR] .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [options] \fBrun\fR \fIcommand\fR [\fIparameter\ \&.\&.\&.\fR] .HP \w'\fBshorewall[6]\fR\ 'u \fBshorewall[6]\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [options] \fBsafe\-restart\fR [\fB\-d\fR] [\fB\-p\fR] [\fB\-t\fR\ \fItimeout\fR] [\fIdirectory\fR] .HP \w'\fBshorewall[6]\fR\ 'u \fBshorewall[6]\fR [\fBtrace\fR|\fBdebug\fR] [options] \fBsafe\-start\fR [\fB\-d\fR] [\fB\-p\fR] [\fB\-t\fR\ \fItimeout\fR] [\fIdirectory\fR] .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [options] \fBsave\fR\ [\fB\-C\fR] [\fIfilename\fR] .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [options] \fBsavesets\fR .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR] [options] {\fBshow\ |\ list\ |\ ls\ \fR} [\fB\-x\fR] \fB{bl|blacklists}\fR .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR] [options] {\fBshow\ |\ list\ |\ ls\ \fR} [\fB\-b\fR] [\fB\-x\fR] [\fB\-l\fR] [\fB\-t\fR\ {\fBfilter\fR|\fBmangle\fR|\fBnat\fR|\fBraw\fR}] [\fIchain\fR...] .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR] [options] {\fBshow\ |\ list\ |\ ls\ \fR} [\fB\-f\fR] \fBcapabilities\fR .HP \w'\fBshorewall[6]\fR\ 'u \fBshorewall[6]\fR [options] {\fBshow\ |\ list\ |\ ls\ \fR} [\fB\-f\fR] \fB{actions|macros}\fR .HP \w'\fBshorewall[6]\fR\ 'u \fBshorewall[6]\fR [\fBtrace\fR|\fBdebug\fR] [options] {\fBshow\ |\ list\ |\ ls\ \fR} \fBaction\fR\ \fIaction\fR .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR] [options] {\fBshow\ |\ list\ |\ ls\ \fR} {\fBclassifiers|connections|config|events|filters|ip|ipa|ipsec|zones|policies|marks\fR} .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR] [options] {\fBshow\ |\ list\ |\ ls\ \fR} \fBevent\fR\ \fIevent\fR .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR] [options] {\fBshow\ |\ list\ |\ ls\ \fR} [\fB\-c\fR] \fBrouting\fR .HP \w'\fBshorewall[6]\fR\ 'u \fBshorewall[6]\fR [\fBtrace\fR|\fBdebug\fR] [options] {\fBshow\ |\ list\ |\ ls\ \fR} \fBmacro\fR\ \fImacro\fR .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR] [options] {\fBshow\ |\ list\ |\ ls\ \fR} [\fB\-x\fR] {\fBmangle|nat|raw\fR} .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR] [options] {\fBshow\ |\ list\ |\ ls\ \fR} \fBsaves\fR .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR] [options] {\fBshow\ |\ list\ |\ ls\ \fR} [\fB\-m\fR] \fBlog\fR .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [options] \fBstart\fR [\fB\-n\fR] [\fB\-f\fR] [\fB\-p\fR] [\fB\-c\fR] [\fB\-T\fR\ [\fB\-i\fR]] [\fB\-C\fR] [\fIdirectory\fR] .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [options] \fBstop\fR\ [\fB\-f\fR] .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR] [options] \fBstatus\fR\ [\fB\-i\fR] .HP \w'\fBshorewall[6]\fR\ 'u \fBshorewall[6]\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [options] \fBtry\fR \fIdirectory\fR [\fItimeout\fR] .HP \w'\fBshorewall[6]\fR\ 'u \fBshorewall[6]\fR [\fBtrace\fR|\fBdebug\fR] [options] \fBupdate\fR [\fB\-b\fR] [\fB\-d\fR] [\fB\-r\fR] [\fB\-T\fR] [\fB\-a\fR] [\fB\-i\fR] [\fB\-A\fR] [\fIdirectory\fR] .HP \w'\fBshorewall[6][\-lite]\fR\ 'u \fBshorewall[6][\-lite]\fR [\fBtrace\fR|\fBdebug\fR] [options] \fBversion\fR\ [\fB\-a\fR] .SH "DESCRIPTION" .PP Beginning with Shorewall 5\&.1\&.0, the \fBshorewall\fR utility is used to control the Shoreline Firewall (Shorewall), Shorewall Firewall 6 (Shorewall6), Shorewall Firewall Lite (Shorewall\-lite) and Shorewall Firewall 6 Lite (Shorewall6\-lite)\&. The utility may be accessed under four different names: .PP \fBshorewall\fR .RS 4 Controls the Shorewall configuration when Shorewall is installed\&. If Shorewall is not installed, the \fBshorewall\fR command controls Shorewall\-lite if it is installed\&. If neither Shorewall nor Shorewall\-lite is installed, the \fBshorewall\fR command controls Shorewall6\-lite if it is installed\&. .RE .PP \fBshorewall6\fR .RS 4 The \fBshorewall6\fR command controls Shorewall6 when Shorewall6 is installed\&. .RE .PP shorewall\-lite .RS 4 The \fBshorewall\-lite\fR command controls Shorewall\-lite when Shorewall\-lite is installed\&. .RE .PP shorewall6\-lite .RS 4 The \fBshorewall6\-lite\fR command controls Shorewall6\-lite when Shorewall6\-lite is installed\&. .RE .PP Prior to Shorewall 5\&.1\&.0, these four commands were implemented as four separate program, each of which controlled only a single firewall package\&. This manpage serves to document both the Shorewall 5\&.1 and Shorewall 5\&.0 CLI\&. .SH "OPTIONS" .PP The \fBtrace\fR and \fBdebug\fR options are used for debugging\&. See \m[blue]\fBhttp://www\&.shorewall\&.net/starting_and_stopping_shorewall\&.htm#Trace\fR\m[]\&\s-2\u[1]\d\s+2\&. .PP The \fBnolock\fR option prevents the command from attempting to acquire the Shorewall lockfile\&. It is useful if you need to include \fBshorewall\fR commands in /etc/shorewall/started\&. .PP Other \fIoptions\fR are: .PP \fB\-4\fR .RS 4 Added in Shorewall 5\&.1\&.0\&. Causes the command to operate on the Shorewall configuration or the Shorewall\-lite configuration\&. It is the default when either of those products is installed and when the command is \fBshorewall\fR or \fBshorewall\-lite\fR\&. .RE .PP \fB\-6\fR .RS 4 Added in Shorewall 5\&.1\&.0\&. Causes the command to operate on the Shorewall6 or Shorewall6\-lite configuration\&. It is the default when only Shorewall6\-lite is installed and when the command is \fBshorewall6\fR or \fBshorewall6\-lite\fR\&. .RE .PP \fB\-l\fR .RS 4 Added in Shorewall 5\&.1\&.0\&. Causes the command to operate on either Shorewall\-lite or Shorewall\-6 lite and is the default when Shorewall is not installed or when the command is \fBshorewall\-lite\fR or \fBshorewall6\-lite\fR\&. .sp With all four firewall products (Shorewall, Shorewall6, Shorewall\-lite and Shorewall6\-lite) installed, the following table shows the correspondence between the name used to invoke the command and the \fBshorewall\fR command with the above three options\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .B Table\ \&1.\ \&All four products installed .TS allbox tab(:); . .TE .sp 1 The next table shows the correspondence when only Shorewall\-lite and Shorewall6\-lite are installed\&. .sp .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .B Table\ \&2.\ \&Only Shorewall\-lite and Shorewall6\-lite installed .TS allbox tab(:); . .TE .sp 1 .RE .PP \fB\-v\fR[\fIverbosity\fR] .RS 4 Alters the amount of output produced by the command\&. If neither the \fB\-v\fR nor \fB\-q\fR option are specified, the amount of output is determined by the VERBOSITY setting in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[2]\d\s+2(5) (\m[blue]\fBshorewall6\&.conf\fR\m[]\&\s-2\u[3]\d\s+2(5))\&. .sp When no \fIverbosity\fR is specified, each instance of this option causes 1 to be added to the effective verbosity\&. When \fIverbosity\fR (\-1,0,1 or 2) is given, the command is executed at the specified VERBOSITY\&. There may be no white\-space between \fB\-v\fR and the \fIverbosity\fR\&. .RE .PP \fB\-q\fR .RS 4 Alters the amount of output produced by the command\&. If neither the \fB\-v\fR nor \fB\-q\fR option are specified, the amount of output is determined by the VERBOSITY setting in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[2]\d\s+2(5) (\m[blue]\fBshorewall6\&.conf\fR\m[]\&\s-2\u[3]\d\s+2(5))\&. .sp Each instance of this option causes 1 to be subtracted from the effective verbosity\&. .RE .PP \fB\-t\fR .RS 4 Causes all progress messages to be timestamped\&. .RE .SH "COMMANDS" .PP The available commands are listed below\&. .PP \fBadd \fR{ \fIinterface\fR[:\fIhost\-list\fR]\&.\&.\&. \fIzone\fR | \fIzone\fR \fIhost\-list\fR } .RS 4 Adds a list of hosts or subnets to a dynamic zone usually used with VPN\*(Aqs\&. .sp The \fIinterface\fR argument names an interface defined in the \m[blue]\fBshorewall\-interfaces\fR\m[]\&\s-2\u[4]\d\s+2(5) (\m[blue]\fBshorewall6\-interfaces\fR\m[]\&\s-2\u[5]\d\s+2(5))file\&. A \fIhost\-list\fR is comma\-separated list whose elements are host or network addresses\&..if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCaution\fR .ps -1 .br The \fBadd\fR command is not very robust\&. If there are errors in the \fIhost\-list\fR, you may see a large number of error messages yet a subsequent \fBshorewall show zones\fR command will indicate that all hosts were added\&. If this happens, replace \fBadd\fR by \fBdelete\fR and run the same command again\&. Then enter the correct command\&. .sp .5v .RE .sp Beginning with Shorewall 4\&.5\&.9, the \fBdynamic_shared\fR zone option (\m[blue]\fBshorewall\-zones\fR\m[]\&\s-2\u[6]\d\s+2(5),\m[blue]\fBshorewall6\-zones\fR\m[]\&\s-2\u[7]\d\s+2(5)) allows a single ipset to handle entries for multiple interfaces\&. When that option is specified for a zone, the \fBadd\fR command has the alternative syntax in which the \fIzone\fR name precedes the \fIhost\-list\fR\&. .RE .PP \fBallow\fR \fIaddress\fR .RS 4 Re\-enables receipt of packets from hosts previously blacklisted by a \fBblacklist\fR, \fBdrop\fR, \fBlogdrop\fR, \fBreject\fR, or \fBlogreject\fR command\&. .RE .PP \fBblacklist\fR \fIaddress\fR [ \fIoption\fR \&.\&.\&. ] .RS 4 Added in Shorewall 5\&.0\&.8 and requires DYNAMIC_BLACKLIST=ipset\&.\&. in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[2]\d\s+2(5)\&. Causes packets from the given host or network \fIaddress\fR to be dropped, based on the setting of BLACKLIST in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[2]\d\s+2(5)\&. The \fIaddress\fR along with any \fIoption\fRs are passed to the \fBipset add\fR command\&. .sp If the \fBdisconnect\fR option is specified in the DYNAMIC_BLACKLISTING setting, then the effective VERBOSITY determines the amount of information displayed: .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} If the effective verbosity is > 0, then a message giving the number of conntrack flows deleted by the command is displayed\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} If the effective verbosity is > 1, then the conntrack table entries deleted by the command are also displayed\&. .RE .RE .PP \fBcall \fR\fB\fIfunction\fR\fR\fB [ \fR\fB\fIparameter\fR\fR\fB \&.\&.\&. ]\fR .RS 4 Added in Shorewall 4\&.6\&.10\&. Allows you to call a function in one of the Shorewall libraries or in your compiled script\&. function must name the shell function to be called\&. The listed parameters are passed to the function\&. .sp The function is first searched for in lib\&.base, lib\&.common, lib\&.cli and lib\&.cli\-std\&. If it is not found, the call command is passed to the generated script to be executed\&. .RE .PP \fBcheck\fR [\-\fBe\fR] [\-\fBd\fR] [\-\fBp\fR] [\-\fBr\fR] [\-\fBT\fR] [\-\fBi\fR] [\fIdirectory\fR] .RS 4 Not available with Shorewall[6]\-lite\&. .sp Compiles the configuration in the specified \fIdirectory\fR and discards the compiled output script\&. If no \fIdirectory\fR is given, then /etc/shorewall is assumed\&. .sp The \fB\-e\fR option causes the compiler to look for a file named capabilities\&. This file is produced using the command \fBshorewall\-lite show \-f capabilities > capabilities\fR on a system with Shorewall Lite installed\&. .sp The \fB\-d\fR option causes the compiler to be run under control of the Perl debugger\&. .sp The \fB\-p\fR option causes the compiler to be profiled via the Perl \fB\-wd:DProf\fR command\-line option\&. .sp The \fB\-r\fR option was added in Shorewall 4\&.5\&.2 and causes the compiler to print the generated ruleset to standard out\&. .sp The \fB\-T\fR option was added in Shorewall 4\&.4\&.20 and causes a Perl stack trace to be included with each compiler\-generated error and warning message\&. .sp The \fB\-i\fR option was added in Shorewall 4\&.6\&.0 and causes a warning message to be issued if the current line contains alternative input specifications following a semicolon (";")\&. Such lines will be handled incorrectly if INLINE_MATCHES is set to Yes in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[2]\d\s+2(5) (\m[blue]\fBshorewall6\&.conf\fR\m[]\&\s-2\u[3]\d\s+2(5))\&. .RE .PP \fBclear\fR [\-\fBf\fR] .RS 4 Clear will remove all rules and chains installed by Shorewall\&. The firewall is then wide open and unprotected\&. Existing connections are untouched\&. Clear is often used to see if the firewall is causing connection problems\&. .sp If \fB\-f\fR is given, the command will be processed by the compiled script that executed the last successful \fBstart\fR, \fBrestart\fR or \fBreload\fR command if that script exists\&. .RE .PP \fBclose\fR { \fIopen\-number\fR | \fIsource\fR \fIdest\fR [ \fIprotocol\fR [ \fIport\fR ] ] } .RS 4 Added in Shorewall 4\&.5\&.8\&. This command closes a temporary open created by the \fBopen\fR command\&. In the first form, an \fIopen\-number\fR specifies the open to be closed\&. Open numbers are displayed in the \fBnum\fR column of the output of the \fBshorewall show opens \fRcommand\&. .sp When the second form of the command is used, the parameters must match those given in the earlier \fBopen\fR command\&. .sp This command requires that the firewall be in the started state and that DYNAMIC_BLACKLIST=Yes in \m[blue]\fBshorewall\&.conf (5)\fR\m[]\&\s-2\u[2]\d\s+2\&. .RE .PP \fBcompile \fR[\-\fBe\fR] [\-\fBc\fR] [\-\fBd\fR] [\-\fBp\fR] [\-\fBT\fR] [\-\fBi\fR] [\fI directory \fR] [\fI pathname\fR ] .RS 4 Not available with shorewall[6]\-lite\&. .sp Compiles the current configuration into the executable file \fIpathname\fR\&. If a \fIdirectory\fR is supplied, Shorewall will look in that directory first for configuration files\&. If the \fIpathname\fR is omitted, the file firewall in the VARDIR (normally /var/lib/shorewall/) is assumed\&. A \fIpathname\fR of \*(Aq\-\*(Aq causes the compiler to send the generated script to it\*(Aqs standard output file\&. Note that \*(Aq\-v\-1\*(Aq is usually specified in this case (e\&.g\&., \fBshorewall \-v\-1 compile \-\- \-\fR) to suppress the \*(AqCompiling\&.\&.\&.\*(Aq message normally generated by /sbin/shorewall\&. .sp When \fB\-e\fR is specified, the compilation is being performed on a system other than where the compiled script will run\&. This option disables certain configuration options that require the script to be compiled where it is to be run\&. The use of \fB\-e\fR requires the presence of a configuration file named capabilities which may be produced using the command \fBshorewall\-lite show \-f capabilities > capabilities\fR on a system with Shorewall Lite installed .sp The \fB\-c\fR option was added in Shorewall 4\&.5\&.17 and causes conditional compilation of a script\&. The script specified by \fIpathname\fR (or implied if \fBpathname\fR is omitted) is compiled if it doesn\*(Aqt exist or if there is any file in the \fIdirectory\fR or in a directory on the CONFIG_PATH that has a modification time later than the file to be compiled\&. When no compilation is needed, a message is issued and an exit status of zero is returned\&. .sp The \fB\-d\fR option causes the compiler to be run under control of the Perl debugger\&. .sp The \fB\-p\fR option causes the compiler to be profiled via the Perl \fB\-wd:DProf\fR command\-line option\&. .sp The \fB\-T\fR option was added in Shorewall 4\&.4\&.20 and causes a Perl stack trace to be included with each compiler\-generated error and warning message\&. .sp The \fB\-i\fR option was added in Shorewall 4\&.6\&.0 and causes a warning message to be issued if the current line contains alternative input specifications following a semicolon (";")\&. Such lines will be handled incorrectly if INLINE_MATCHES is set to Yes in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[2]\d\s+2(5) (\m[blue]\fBshorewall6\&.conf\fR\m[]\&\s-2\u[3]\d\s+2(5))\&. .RE .PP \fBdelete \fR{ \fIinterface\fR[:\fIhost\-list\fR]\&.\&.\&. \fIzone\fR | \fIzone\fR \fIhost\-list\fR } .RS 4 The delete command reverses the effect of an earlier \fBadd\fR command\&. .sp The \fIinterface\fR argument names an interface defined in the \m[blue]\fBshorewall\-interfaces\fR\m[]\&\s-2\u[4]\d\s+2(5) (\m[blue]\fBshorewall6\-interfaces\fR\m[]\&\s-2\u[5]\d\s+2(5) file\&. A \fIhost\-list\fR is comma\-separated list whose elements are a host or network address\&. .sp Beginning with Shorewall 4\&.5\&.9, the \fBdynamic_shared\fR zone option (\m[blue]\fBshorewall\-zones\fR\m[]\&\s-2\u[6]\d\s+2(5), \m[blue]\fBshorewall6\-zones\fR\m[]\&\s-2\u[8]\d\s+2(5)) allows a single ipset to handle entries for multiple interfaces\&. When that option is specified for a zone, the \fBdelete\fR command has the alternative syntax in which the \fIzone\fR name precedes the \fIhost\-list\fR\&. .RE .PP \fBdisable \fR{ \fIinterface\fR | \fIprovider\fR } .RS 4 Added in Shorewall 4\&.4\&.26\&. Disables the optional provider associated with the specified \fIinterface\fR or \fIprovider\fR\&. Where more than one provider share a single network interface, a \fIprovider\fR name must be given\&. .sp Beginning with Shorewall 4\&.5\&.10, this command may be used with any optional network interface\&. \fIinterface\fR may be either the logical or physical name of the interface\&. The command removes any routes added from \m[blue]\fBshorewall\-routes\fR\m[]\&\s-2\u[9]\d\s+2(5) (\m[blue]\fBshorewall6\-routes\fR\m[]\&\s-2\u[10]\d\s+2(5))and any traffic shaping configuration for the interface\&. .RE .PP \fBdrop\fR \fIaddress\fR .RS 4 Causes traffic from the listed \fIaddress\fRes to be silently dropped\&. This command requires that the firewall be in the started state and that DYNAMIC_BLACKLIST=Yes in \m[blue]\fBshorewall\&.conf (5)\fR\m[]\&\s-2\u[2]\d\s+2\&. .RE .PP \fBdump \fR [\-\fBx\fR] [\-\fBl\fR] [\-\fBm\fR] [\-\fBc\fR] .RS 4 Produces a verbose report about the firewall configuration for the purpose of problem analysis\&. .sp The \fB\-x\fR option causes actual packet and byte counts to be displayed\&. Without that option, these counts are abbreviated\&. .sp The \fB\-m\fR option causes any MAC addresses included in Shorewall log messages to be displayed\&. .sp The \fB\-l\fR option causes the rule number for each Netfilter rule to be displayed\&. .sp The \fB\-c\fR option causes the route cache to be dumped in addition to the other routing information\&. .RE .PP \fBenable \fR{ \fIinterface\fR | \fIprovider\fR } .RS 4 Added in Shorewall 4\&.4\&.26\&. Enables the optional provider associated with the specified \fIinterface\fR or \fIprovider\fR\&. Where more than one provider share a single network interface, a \fIprovider\fR name must be given\&. .sp Beginning with Shorewall 4\&.5\&.10, this command may be used with any optional network interface\&. \fIinterface\fR may be either the logical or physical name of the interface\&. The command sets /proc entries for the interface, adds any route specified in \m[blue]\fBshorewall\-routes\fR\m[]\&\s-2\u[9]\d\s+2(5) (\m[blue]\fBshorewall6\-routes\fR\m[]\&\s-2\u[10]\d\s+2(5)) and installs the interface\*(Aqs traffic shaping configuration, if any\&. .RE .PP \fBexport \fR[\fI directory1\fR ] [\fI user\fR@]\fIsystem\fR[:\fIdirectory2\fR ] .RS 4 Not available with Shorewall[6]\-lite\&. .sp If \fIdirectory1\fR is omitted, the current working directory is assumed\&. .sp Allows a non\-root user to compile a shorewall script and stage it on a system (provided that the user has access to the system via ssh)\&. The command is equivalent to: .sp .if n \{\ .RS 4 .\} .nf \fB/sbin/shorewall compile \-e\fR \fIdirectory1\fR \fIdirectory1\fR\fB/firewall &&\e\fR \fBscp\fR directory1\fB/firewall\fR \fIdirectory1\fR\fB/firewall\&.conf\fR [\fIuser\fR@]\fBsystem\fR:[\fIdirectory2\fR] .fi .if n \{\ .RE .\} .sp In other words, the configuration in the specified (or defaulted) directory is compiled to a file called firewall in that directory\&. If compilation succeeds, then firewall and firewall\&.conf are copied to \fIsystem\fR using scp\&. .RE .PP \fBforget\fR [ \fIfilename\fR ] .RS 4 Deletes /var/lib/shorewall/\fIfilename\fR and /var/lib/shorewall/save\&. If no \fIfilename\fR is given then the file specified by RESTOREFILE in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[2]\d\s+2(5) (\m[blue]\fBshorewall6\&.conf\fR\m[]\&\s-2\u[3]\d\s+2(5)) is assumed\&. .RE .PP \fBhelp\fR .RS 4 Displays a syntax summary\&. .RE .PP \fBhits\fR [\-\fBt\fR] .RS 4 Generates several reports from Shorewall log messages in the current log file\&. If the \fB\-t\fR option is included, the reports are restricted to log messages generated today\&. Not available with Shorewall6[\-lite]\&. .RE .PP \fBipcalc\fR { address mask | address/vlsm } .RS 4 Ipcalc displays the network address, broadcast address, network in CIDR notation and netmask corresponding to the input[s]\&. Not available with Shorewall6[\-lite]\&. .RE .PP \fBiprange \fR\fIaddress1\fR\-\fIaddress2\fR .RS 4 Iprange decomposes the specified range of IP addresses into the equivalent list of network/host addresses\&. Not available with Shorewall6[\-lite]\&. .RE .PP \fBiptrace\fR \fIiptables match expression\fR .RS 4 This is a low\-level debugging command that causes iptables TRACE log records to be created\&. See iptables(8) for details\&. .sp The \fIiptables match expression\fR must be one or more matches that may appear in both the raw table OUTPUT and raw table PREROUTING chains\&. .sp The log message destination is determined by the currently\-selected IPv4 or IPv6 \m[blue]\fBlogging backend\fR\m[]\&\s-2\u[11]\d\s+2\&. .RE .PP \fBlist\fR .RS 4 \fBlist\fR is a synonym for \fBshow\fR \-\- please see below\&. .RE .PP \fBlogdrop\fR \fIaddress\fR .RS 4 Causes traffic from the listed \fIaddress\fRes to be logged then discarded\&. Logging occurs at the log level specified by the BLACKLIST_LOGLEVEL setting in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[2]\d\s+2 (5) (\m[blue]\fBshorewall6\&.conf\fR\m[]\&\s-2\u[3]\d\s+2(5))\&. This command requires that the firewall be in the started state and that DYNAMIC_BLACKLIST=Yes in \m[blue]\fBshorewall\&.conf (5)\fR\m[]\&\s-2\u[2]\d\s+2\&. .RE .PP \fBlogwatch \fR[\-\fBm\fR] [\fI refresh\-interval \fR] .RS 4 Monitors the log file specified by the LOGFILE option in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[2]\d\s+2(5) (\m[blue]\fBshorewall6\&.conf\fR\m[]\&\s-2\u[3]\d\s+2(5)) and produces an audible alarm when new Shorewall messages are logged\&. The \fB\-m\fR option causes the MAC address of each packet source to be displayed if that information is available\&. The \fIrefresh\-interval\fR specifies the time in seconds between screen refreshes\&. You can enter a negative number by preceding the number with "\-\-" (e\&.g\&., \fBshorewall logwatch \-\- \-30\fR)\&. In this case, when a packet count changes, you will be prompted to hit any key to resume screen refreshes\&. .RE .PP \fBlogreject\fR\fI address\fR .RS 4 Causes traffic from the listed \fIaddress\fRes to be logged then rejected\&. Logging occurs at the log level specified by the BLACKLIST_LOGLEVEL setting in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[2]\d\s+2 (5), (\m[blue]\fBshorewall6\&.conf\fR\m[]\&\s-2\u[3]\d\s+2(5))\&. This command requires that the firewall be in the started state and that DYNAMIC_BLACKLIST=Yes in \m[blue]\fBshorewall\&.conf (5)\fR\m[]\&\s-2\u[2]\d\s+2\&. .RE .PP \fBls\fR .RS 4 \fBls\fR is a synonym for \fBshow\fR \-\- please see below\&. .RE .PP \fBnoiptrace \fR\fIiptables match expression\fR .RS 4 This is a low\-level debugging command that cancels a trace started by a preceding \fBiptrace\fR command\&. .sp The \fIiptables match expression\fR must be one given in the \fBiptrace\fR command being canceled\&. .RE .PP \fBopen\fR \fIsource\fR \fIdest\fR [ \fIprotocol\fR [ \fIport\fR ] ] .RS 4 Added in Shorewall 4\&.6\&.8\&. This command requires that the firewall be in the started state and that DYNAMIC_BLACKLIST=Yes in \m[blue]\fBshorewall\&.conf (5)\fR\m[]\&\s-2\u[2]\d\s+2\&. The effect of the command is to temporarily open the firewall for connections matching the parameters\&. .sp The \fIsource\fR and \fIdest\fR parameters may each be specified as \fBall\fR if you don\*(Aqt wish to restrict the connection source or destination respectively\&. Otherwise, each must contain a host or network address or a valid DNS name\&. .sp The \fIprotocol\fR may be specified either as a number or as a name listed in /etc/protocols\&. The \fIport\fR may be specified numerically or as a name listed in /etc/services\&. .sp To reverse the effect of a successful \fBopen\fR command, use the \fBclose\fR command with the same parameters or simply restart the firewall\&. .sp Example: To open the firewall for SSH connections to address 192\&.168\&.1\&.1, the command would be: .sp .if n \{\ .RS 4 .\} .nf shorewall open all 192\&.168\&.1\&.1 tcp 22 .fi .if n \{\ .RE .\} .sp To reverse that command, use: .sp .if n \{\ .RS 4 .\} .nf shorewall close all 192\&.168\&.1\&.1 tcp 22 .fi .if n \{\ .RE .\} .RE .PP \fBreenable\fR{ \fIinterface\fR | \fIprovider\fR } .RS 4 Added in Shorewall 4\&.6\&.9\&. This is equivalent to a \fBdisable\fR command followed by an \fBenable\fR command on the specified \fIinterface\fR or \fIprovider\fR\&. .RE .PP \fBreject\fR\fI address\fR .RS 4 Causes traffic from the listed \fIaddress\fRes to be silently rejected\&. This command requires that the firewall be in the started state and that DYNAMIC_BLACKLIST=Yes in \m[blue]\fBshorewall\&.conf (5)\fR\m[]\&\s-2\u[2]\d\s+2\&. .RE .PP \fBreload \fR[\-\fBn\fR] [\-\fBp\fR] [\-\fBd\fR] [\-\fBf\fR] [\-\fBc\fR] [\-\fBT\fR] [\-\fBi\fR] [\-\fBC\fR] [ \fIdirectory\fR ] .RS 4 This command was re\-implemented in Shorewall 5\&.0\&.0\&. The pre\-5\&.0\&.0 \fBreload\fR command is now called \fBremote\-restart\fR (see below)\&. .PP Shorewall and Shorewall6 .RS 4 Reload is similar to \fBshorewall start\fR except that it assumes that the firewall is already started\&. Existing connections are maintained\&. If a \fIdirectory\fR is included in the command, Shorewall will look in that \fIdirectory\fR first for configuration files\&. .sp The \fB\-n\fR option causes Shorewall to avoid updating the routing table(s)\&. .sp The \fB\-p\fR option causes the connection tracking table to be flushed; the \fBconntrack\fR utility must be installed to use this option\&. .sp The \fB\-d\fR option causes the compiler to run under the Perl debugger\&. .sp The \fB\-f\fR option suppresses the compilation step and simply reused the compiled script which last started/restarted Shorewall, provided that /etc/shorewall and its contents have not been modified since the last start/restart\&. .sp The \fB\-c\fR option was added in Shorewall 4\&.4\&.20 and performs the compilation step unconditionally, overriding the AUTOMAKE setting in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[2]\d\s+2(5) (Shorewall and Shorewall6 only)\&. When both \fB\-f\fR and \fB\-c\fR are present, the result is determined by the option that appears last\&. .sp The \fB\-T\fR option was added in Shorewall 4\&.5\&.3 and causes a Perl stack trace to be included with each compiler\-generated error and warning message\&. .sp The \fB\-i\fR option was added in Shorewall 4\&.6\&.0 and causes a warning message to be issued if the current line contains alternative input specifications following a semicolon (";")\&. Such lines will be handled incorrectly if INLINE_MATCHES is set to Yes in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[2]\d\s+2(5) (\m[blue]\fBshorewall6\&.conf\fR\m[]\&\s-2\u[3]\d\s+2(5))\&.\&. .sp The \fB\-C\fR option was added in Shorewall 4\&.6\&.5 and is only meaningful when AUTOMAKE=Yes in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[2]\d\s+2(5) (\m[blue]\fBshorewall6\&.conf\fR\m[]\&\s-2\u[3]\d\s+2(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\&. .RE .PP Shorewall\-lite and Shorewall6\-lite .RS 4 Reload is similar to \fBshorewall start\fR except that it assumes that the firewall is already started\&. Existing connections are maintained\&. .sp The \fB\-n\fR option causes Shorewall to avoid updating the routing table(s)\&. .sp The \fB\-p\fR option causes the connection tracking table to be flushed; the \fBconntrack\fR utility must be installed to use this option\&. .sp The \fB\-C\fR option was added in Shorewall 4\&.6\&.5 If the existing firewall script is 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\&. .RE .RE .PP \fBremote\-getcaps\fR [\-\fBR\fR] [\-\fBr\fR \fIroot\-user\-name\fR] [ [ \-D ] \fIdirectory\fR ] [ \fIsystem\fR ] .RS 4 Added in Shoreall 5\&.2\&.0, this command executes \fBshorewall[6]\-lite show capabilities \-f > /var/lib/shorewall[6]\-lite/capabilities\fR on the remote \fIsystem\fR via ssh then the generated file is copied to \fIdirectory\fR on the local system\&. If no \fIdirectory\fR is given, the current working directory is assumed\&. .sp if \fB\-R\fR is included, the remote shorewallrc file is also copied to \fIdirectory\fR\&. .sp If \fB\-r\fR is included, it specifies that the root user on \fIsystem\fR is named \fIroot\-user\-name\fR rather than "root"\&. .RE .PP \fBremote\-getrc\fR [\-\fBc\fR] [\-\fBr\fR \fIroot\-user\-name\fR] [ [ \-D ] \fIdirectory\fR ] [ \fIsystem\fR ] .RS 4 Added in Shoreall 5\&.2\&.0, this command copies the shorewallrc file from the remote \fIsystem\fR to \fIdirectory\fR on the local system\&. If no \fIdirectory\fR is given, the current working directory is assumed\&. .sp if \fB\-c\fR is included, the remote capabilities are also copied to \fIdirectory\fR, as is done by the \fBremote\-getcaps\fR command\&. .sp If \fB\-r\fR is included, it specifies that the root user on \fIsystem\fR is named \fIroot\-user\-name\fR rather than "root"\&. .RE .PP \fBremote\-start\fR [\-\fBn\fR] [\-\fBs\fR] [\-\fBc\fR] [\-\fBr\fR \fIroot\-user\-name\fR] [\-\fBT\fR] [\-\fBi\fR] [ [ \-D ] \fIdirectory\fR ] [ \fIsystem\fR ] .RS 4 This command was renamed from \fBload\fR in Shorewall 5\&.0\&.0 and is only available in Shorewall and Shoreawall6\&. .sp If \fIdirectory\fR is omitted, the current working directory is assumed\&. Allows a non\-root user to compile a shorewall script and install it on a system (provided that the user has root access to the system via ssh)\&. The command is equivalent to: .sp .if n \{\ .RS 4 .\} .nf \fB/sbin/shorewall compile \-e\fR \fI\fIdirectory\fR\fR \fIdirectory\fR\fB/firewall &&\e\fR \fBscp\fR \fIdirectory\fR\fB/firewall\fR \fIdirectory\fR\fB/firewall\&.conf\fR \fBroot@\fR\fIsystem\fR\fB:/var/lib/shorewall\-lite/ &&\e\fR \fBssh root@\fR\fIsystem\fR \fB\*(Aq/sbin/shorewall\-lite start\*(Aq\fR .fi .if n \{\ .RE .\} .sp In other words, the configuration in the specified (or defaulted) directory is compiled to a file called firewall in that directory\&. If compilation succeeds, then firewall is copied to \fIsystem\fR using scp\&. If the copy succeeds, Shorewall Lite on \fIsystem\fR is started via ssh\&. Beginning with Shorewall 5\&.0\&.13, if \fIsystem\fR is omitted, then the FIREWALL option setting in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[12]\d\s+2(5) (\m[blue]\fBshorewall6\&.conf(5)\fR\m[]\&\s-2\u[3]\d\s+2) is assumed\&. In that case, if you want to specify a \fIdirectory\fR, then the \fB\-D\fR option must be given\&. .sp The \fB\-n\fR option causes Shorewall to avoid updating the routing table(s)\&. .sp If \fB\-s\fR is specified and the \fBstart\fR command succeeds, then the remote Shorewall\-lite configuration is saved by executing \fBshorewall\-lite save\fR via ssh\&. .sp if \fB\-c\fR is included, the command \fBshorewall[6]\-lite show capabilities \-f > /var/lib/shorewall[6]\-lite/capabilities\fR is executed via ssh then the generated file is copied to \fIdirectory\fR using scp\&. This step is performed before the configuration is compiled\&. .sp If \fB\-r\fR is included, it specifies that the root user on \fIsystem\fR is named \fIroot\-user\-name\fR rather than "root"\&. .sp The \fB\-T\fR option was added in Shorewall 4\&.5\&.3 and causes a Perl stack trace to be included with each compiler\-generated error and warning message\&. .RE .PP \fBremote\-reload \fR[\-\fBs\fR] [\-\fBc\fR] [\-\fBr\fR \fIroot\-user\-name\fR] [\-\fBT\fR] [\-\fBi\fR] [ [ \-D ] \fIdirectory\fR ] [ \fIsystem\fR ] .RS 4 This command was added in Shorewall 5\&.0\&.0 and is only available in Shorewall and Shorewall6\&. .sp If \fIdirectory\fR is omitted, the current working directory is assumed\&. Allows a non\-root user to compile a shorewall script and install it on a system (provided that the user has root access to the system via ssh)\&. The command is equivalent to: .sp .if n \{\ .RS 4 .\} .nf \fB/sbin/shorewall compile \-e\fR \fIdirectory\fR \fIdirectory\fR\fB/firewall &&\e\fR \fBscp\fR \fIdirectory\fR\fB/firewall\fR \fIdirectory\fR\fB/firewall\&.conf\fR \fBroot@\fR\fIsystem\fR\fB:/var/lib/shorewall\-lite/ &&\e\fR \fBssh root@\fR\fIsystem\fR \fB\*(Aq/sbin/shorewall\-lite reload\*(Aq\fR .fi .if n \{\ .RE .\} .sp In other words, the configuration in the specified (or defaulted) directory is compiled to a file called firewall in that directory\&. If compilation succeeds, then firewall is copied to \fIsystem\fR using scp\&. If the copy succeeds, Shorewall Lite on \fIsystem\fR is restarted via ssh\&. Beginning with Shorewall 5\&.0\&.13, if \fIsystem\fR is omitted, then the FIREWALL option setting in \m[blue]\fBshorewall6\&.conf(5)\fR\m[]\&\s-2\u[13]\d\s+2 (\m[blue]\fBshorewall6\&.conf\fR\m[]\&\s-2\u[3]\d\s+2(5)) is assumed\&. In that case, if you want to specify a \fIdirectory\fR, then the \fB\-D\fR option must be given\&. .sp If \fB\-s\fR is specified and the \fBrestart\fR command succeeds, then the remote Shorewall\-lite configuration is saved by executing \fBshorewall\-lite save\fR via ssh\&. .sp if \fB\-c\fR is included, the command \fBshorewall\-lite show capabilities \-f > /var/lib/shorewall\-lite/capabilities\fR is executed via ssh then the generated file is copied to \fIdirectory\fR using scp\&. This step is performed before the configuration is compiled\&. .sp If \fB\-r\fR is included, it specifies that the root user on \fIsystem\fR is named \fIroot\-user\-name\fR rather than "root"\&. .sp The \fB\-T\fR option was added in Shorewall 4\&.5\&.3 and causes a Perl stack trace to be included with each compiler\-generated error and warning message\&. .sp The \fB\-i\fR option was added in Shorewall 4\&.6\&.0 and causes a warning message to be issued if the current line contains alternative input specifications following a semicolon (";")\&. Such lines will be handled incorrectly if INLINE_MATCHES is set to Yes in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[2]\d\s+2(5) (\m[blue]\fBshorewall6\&.conf\fR\m[]\&\s-2\u[3]\d\s+2(5))\&. .RE .PP \fBremote\-restart \fR[\-\fBs\fR] [\-\fBc\fR] [\-\fBr\fR \fIroot\-user\-name\fR] [\-\fBT\fR] [\-\fBi\fR] [ [ \-D ] \fIdirectory\fR ] [ \fIsystem\fR ] .RS 4 This command was renamed from \fBreload\fR in Shorewall 5\&.0\&.0 and is available in Shorewall and Shorewall6 only\&. .sp If \fIdirectory\fR is omitted, the current working directory is assumed\&. Allows a non\-root user to compile a shorewall script and install it on a system (provided that the user has root access to the system via ssh)\&. The command is equivalent to: .sp .if n \{\ .RS 4 .\} .nf \fB/sbin/shorewall compile \-e\fR \fIdirectory\fR \fIdirectory\fR\fB/firewall &&\e\fR \fBscp\fR \fIdirectory\fR\fB/firewall\fR \fIdirectory\fR\fB/firewall\&.conf\fR \fBroot@\fR\fIsystem\fR\fB:/var/lib/shorewall\-lite/ &&\e\fR \fBssh root@\fR\fIsystem\fR \fB\*(Aq/sbin/shorewall\-lite restart\*(Aq\fR .fi .if n \{\ .RE .\} .sp In other words, the configuration in the specified (or defaulted) directory is compiled to a file called firewall in that directory\&. If compilation succeeds, then firewall is copied to \fIsystem\fR using scp\&. If the copy succeeds, Shorewall Lite on \fIsystem\fR is restarted via ssh\&. Beginning with Shorewall 5\&.0\&.13, if \fIsystem\fR is omitted, then the FIREWALL option setting in \m[blue]\fBshorewall6\&.conf(5)\fR\m[]\&\s-2\u[13]\d\s+2 (\m[blue]\fBshorewall6\&.conf\fR\m[]\&\s-2\u[3]\d\s+2(5)) is assumed\&. In that case, if you want to specify a \fIdirectory\fR, then the \fB\-D\fR option must be given\&. .sp If \fB\-s\fR is specified and the \fBrestart\fR command succeeds, then the remote Shorewall\-lite configuration is saved by executing \fBshorewall\-lite save\fR via ssh\&. .sp if \fB\-c\fR is included, the command \fBshorewall\-lite show capabilities \-f > /var/lib/shorewall\-lite/capabilities\fR is executed via ssh then the generated file is copied to \fIdirectory\fR using scp\&. This step is performed before the configuration is compiled\&. .sp If \fB\-r\fR is included, it specifies that the root user on \fIsystem\fR is named \fIroot\-user\-name\fR rather than "root"\&. .sp The \fB\-T\fR option was added in Shorewall 4\&.5\&.3 and causes a Perl stack trace to be included with each compiler\-generated error and warning message\&. .sp The \fB\-i\fR option was added in Shorewall 4\&.6\&.0 and causes a warning message to be issued if the current line contains alternative input specifications following a semicolon (";")\&. Such lines will be handled incorrectly if INLINE_MATCHES is set to Yes in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[2]\d\s+2(5) (\m[blue]\fBshorewall6\&.conf\fR\m[]\&\s-2\u[3]\d\s+2(5)\&. .RE .PP \fBreset [\fR\fB\fIchain\fR\fR\fB, \&.\&.\&.]\fR .RS 4 Resets the packet and byte counters in the specified \fIchain\fR(s)\&. If no \fIchain\fR is specified, all the packet and byte counters in the firewall are reset\&. .sp Beginning with Shorewall 5\&.0\&.0, \fIchain\fR may be composed of both a table name and a chain name separated by a colon (e\&.g\&., mangle:PREROUTING)\&. Chain names following that don\*(Aqt include a table name are assumed to be in that same table\&. If no table name is given in the command, the filter table is assumed\&. .RE .PP \fBrestart \fR[\-\fBn\fR] [\-\fBp\fR] [\-\fBd\fR] [\-\fBf\fR] [\-\fBc\fR] [\-\fBT\fR] [\-\fBi\fR] [\-\fBC\fR] [ \fIdirectory\fR ] .RS 4 Beginning with Shorewall 5\&.0\&.0, this command performs a true restart\&. The firewall is completely stopped as if a \fBstop\fR command had been issued then it is started again\&. .PP Shorewall and Shorewall6 .RS 4 If a \fIdirectory\fR is included in the command, Shorewall will look in that \fIdirectory\fR first for configuration files\&. .sp The \fB\-n\fR option causes Shorewall to avoid updating the routing table(s)\&. .sp The \fB\-p\fR option causes the connection tracking table to be flushed; the \fBconntrack\fR utility must be installed to use this option\&. .sp The \fB\-d\fR option causes the compiler to run under the Perl debugger\&. .sp The \fB\-f\fR option suppresses the compilation step and simply reused the compiled script which last started/restarted Shorewall, provided that /etc/shorewall and its contents have not been modified since the last start/restart\&. .sp The \fB\-c\fR option was added in Shorewall 4\&.4\&.20 and performs the compilation step unconditionally, overriding the AUTOMAKE setting in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[2]\d\s+2(5)\&. When both \fB\-f\fR and \fB\-c\fR are present, the result is determined by the option that appears last\&. .sp The \fB\-T\fR option was added in Shorewall 4\&.5\&.3 and causes a Perl stack trace to be included with each compiler\-generated error and warning message\&. .sp The \fB\-i\fR option was added in Shorewall 4\&.6\&.0 and causes a warning message to be issued if the current line contains alternative input specifications following a semicolon (";")\&. Such lines will be handled incorrectly if INLINE_MATCHES is set to Yes in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[2]\d\s+2(5)\&. .sp The \fB\-C\fR option was added in Shorewall 4\&.6\&.5 and is only meaningful when AUTOMAKE=Yes in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[2]\d\s+2(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\&. .RE .PP Shorewall\-lite and Shorewall6\-lite .RS 4 The \fB\-n\fR option causes Shorewall to avoid updating the routing table(s)\&. .sp The \fB\-p\fR option causes the connection tracking table to be flushed; the \fBconntrack\fR utility must be installed to use this option\&. .sp The \fB\-C\fR option was added in Shorewall 4\&.6\&.5 If the existing firewall script is 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\&. .RE .RE .PP \fBrestore \fR [\-\fBn\fR] [\-\fBp\fR] [\-\fBC\fR] [ \fIfilename\fR ] .RS 4 Restore Shorewall to a state saved using the \fBshorewall save\fR command\&. Existing connections are maintained\&. The \fIfilename\fR names a restore file in /var/lib/shorewall created using \fBshorewall save\fR; if no \fIfilename\fR is given then Shorewall will be restored from the file specified by the RESTOREFILE option in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[2]\d\s+2(5) (\m[blue]\fBshorewall6\&.conf\fR\m[]\&\s-2\u[3]\d\s+2(5))\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBCaution\fR .ps -1 .br If your iptables ruleset depends on variables that are detected at run\-time, either in your params file or by Shorewall\-generated code, \fBrestore\fR will use the values that were current when the ruleset was saved, which may be different from the current values\&. .sp .5v .RE The \fB\-n\fR option causes Shorewall to avoid updating the routing table(s)\&. .sp The \fB\-p\fR option, added in Shorewall 4\&.6\&.5, causes the connection tracking table to be flushed; the \fBconntrack\fR utility must be installed to use this option\&. .sp The \fB\-C\fR option was added in Shorewall 4\&.6\&.5\&. If the \fB\-C\fR option was specified during \fBshorewall save\fR, then the counters saved by that operation will be restored\&. .RE .PP \fBrun \fR\fIcommand\fR [ \fIparameter\fR \&.\&.\&. ] .RS 4 Added in Shorewall 4\&.6\&.3\&. Executes \fIcommand\fR in the context of the generated script passing the supplied \fIparameter\fRs\&. Normally, the \fIcommand\fR will be a function declared in lib\&.private\&. .sp Before executing the \fIcommand\fR, the script will detect the configuration, setting all SW_* variables and will run your init extension script with $COMMAND = \*(Aqrun\*(Aq\&. .sp If there are files in the CONFIG_PATH that were modified after the current firewall script was generated, the following warning message is issued: .RS 4 WARNING: /var/lib/shorewall/firewall is not up to date .RE .RE .PP \fBsafe\-reload \fR[\-\fBd\fR] [\-\fBp\fR] [\-\fBt \fR\fItimeout\fR ] [ \fIdirectory\fR ] .RS 4 Added in Shorewall 5\&.0\&.0, this command performs the same function as did \fBsafe_restart\fR in earlier releases\&. The command is available in Shorewall and Shorewall6 only\&. .sp Only allowed if Shorewall is running\&. The current configuration is saved in /var/lib/shorewall/safe\-reload (see the save command below) then a \fBshorewall reload\fR is done\&. You will then be prompted asking if you want to accept the new configuration or not\&. If you answer "n" or if you fail to answer within 60 seconds (such as when your new configuration has disabled communication with your terminal), the configuration is restored from the saved configuration\&. If a directory is given, then Shorewall will look in that directory first when opening configuration files\&. .sp Beginning with Shorewall 4\&.5\&.0, you may specify a different \fItimeout\fR value using the \fB\-t\fR option\&. The numeric \fItimeout\fR may optionally be followed by an \fBs\fR, \fBm\fR or \fBh\fR suffix (e\&.g\&., 5m) to specify seconds, minutes or hours respectively\&. If the suffix is omitted, seconds is assumed\&. .RE .PP \fBsafe\-restart \fR[\-\fBd\fR] [\-\fBp\fR] [\-\fBt \fR\fItimeout\fR ] [ \fIdirectory\fR ] .RS 4 Only allowed if Shorewall[6] is running and is not available in Shorewall\-lite and Shorewall6\-lite\&. The current configuration is saved in /var/lib/shorewall/safe\-restart (see the save command below) then a \fBshorewall restart\fR is done\&. You will then be prompted asking if you want to accept the new configuration or not\&. If you answer "n" or if you fail to answer within 60 seconds (such as when your new configuration has disabled communication with your terminal), the configuration is restored from the saved configuration\&. If a directory is given, then Shorewall will look in that directory first when opening configuration files\&. .sp Beginning with Shorewall 4\&.5\&.0, you may specify a different \fItimeout\fR value using the \fB\-t\fR option\&. The numeric \fItimeout\fR may optionally be followed by an \fBs\fR, \fBm\fR or \fBh\fR suffix (e\&.g\&., 5m) to specify seconds, minutes or hours respectively\&. If the suffix is omitted, seconds is assumed\&. .RE .PP \fBsafe\-start\fR\fB \fR[\-\fBd\fR] [\-\fBp\fR] [\-\fBt\fR\fItimeout\fR ] [ \fIdirectory\fR ] .RS 4 Shorewall is started normally\&. You will then be prompted asking if everything went all right\&. If you answer "n" or if you fail to answer within 60 seconds (such as when your new configuration has disabled communication with your terminal), a shorewall clear is performed for you\&. If a directory is given, then Shorewall will look in that directory first when opening configuration files\&. .sp Beginning with Shorewall 4\&.5\&.0, you may specify a different \fItimeout\fR value using the \fB\-t\fR option\&. The numeric \fItimeout\fR may optionally be followed by an \fBs\fR, \fBm\fR or \fBh\fR suffix (e\&.g\&., 5m) to specify seconds, minutes or hours respectively\&. If the suffix is omitted, seconds is assumed\&. .sp This command is available in Shorewall and Shorewall6 only\&. .RE .PP \fBsave \fR [\-\fBC\fR] [ \fIfilename\fR ] .RS 4 Creates a snapshot of the currently running firewall\&. The dynamic blacklist is stored in /var/lib/shorewall/save\&. The state of the firewall is stored in /var/lib/shorewall/\fIfilename\fR for use by the \fBshorewall restore\fR command\&. If \fIfilename\fR is not given then the state is saved in the file specified by the RESTOREFILE option in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[2]\d\s+2(5) (\m[blue]\fBshorewall6\&.conf\fR\m[]\&\s-2\u[3]\d\s+2(5))\&. .sp The \fB\-C\fR option, added in Shorewall 4\&.6\&.5, causes the iptables packet and byte counters to be saved along with the chains and rules\&. .RE .PP \fBsavesets\fR .RS 4 Added in shorewall 4\&.6\&.8\&. Performs the same action as the \fBstop\fR command with respect to saving ipsets (see the SAVE_IPSETS option in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[2]\d\s+2 (5) (\m[blue]\fBshorewall6\&.conf\fR\m[]\&\s-2\u[3]\d\s+2(5))\&. This command may be used to proactively save your ipset contents in the event that a system failure occurs prior to issuing a \fBstop\fR command\&. .RE .PP \fBshow\fR .RS 4 The show command can have a number of different arguments: .PP \fBaction \fR\fB\fIaction\fR\fR .RS 4 Lists the named action file\&. Available on Shorewall and Shorewall6 only\&. .RE .PP \fBactions\fR .RS 4 Produces a report about the available actions (built\-in, standard and user\-defined)\&. Available on Shorewall and Shorewall6 only\&. .RE .PP \fBbl|blacklists\fR [\-\fBx\fR] .RS 4 Added in Shorewall 4\&.6\&.2\&. Displays the dynamic chain along with any chains produced by entries in shorewall\-blrules(5)\&. The \fB\-x\fR option is passed directly through to iptables and causes actual packet and byte counts to be displayed\&. Without this option, those counts are abbreviated\&. .RE .PP [\-\fBf\fR] \fBcapabilities\fR .RS 4 Displays your kernel/iptables capabilities\&. The \fB\-f\fR option causes the display to be formatted as a capabilities file for use with \fBcompile \-e\fR\&. .RE .PP [\-\fBb\fR] [\-\fBx\fR] [\-\fBl\fR] [\-\fBt\fR {\fBfilter\fR|\fBmangle\fR|\fBnat\fR|\fBraw\fR}] [ \fIchain\fR\&.\&.\&. ] .RS 4 The rules in each \fIchain\fR are displayed using the \fBiptables \-L\fR \fIchain\fR \fB\-n \-v\fR command\&. If no \fIchain\fR is given, all of the chains in the filter table are displayed\&. The \fB\-x\fR option is passed directly through to iptables and causes actual packet and byte counts to be displayed\&. Without this option, those counts are abbreviated\&. The \fB\-t\fR option specifies the Netfilter table to display\&. The default is \fBfilter\fR\&. .sp The \fB\-b\fR (\*(Aqbrief\*(Aq) option causes rules which have not been used (i\&.e\&. which have zero packet and byte counts) to be omitted from the output\&. Chains with no rules displayed are also omitted from the output\&. .sp The \fB\-l\fR option causes the rule number for each Netfilter rule to be displayed\&. .sp If the \-\fBt\fR option and the \fBchain\fR keyword are both omitted and any of the listed \fIchain\fRs do not exist, a usage message is displayed\&. .RE .PP \fBclassifiers|filters\fR .RS 4 Displays information about the packet classifiers defined on the system as a result of traffic shaping configuration\&. .RE .PP \fBconfig\fR .RS 4 Displays distribution\-specific defaults\&. .RE .PP \fBconnections [\fR\fB\fIfilter_parameter\fR\fR\fB \&.\&.\&.]\fR .RS 4 Displays the IP connections currently being tracked by the firewall\&. .sp If the \fBconntrack\fR utility is installed, beginning with Shorewall 4\&.6\&.11 the set of connections displayed can be limited by including conntrack filter parameters (\-p , \-s, \-\-dport, etc)\&. See conntrack(8) for details\&. .RE .PP \fBevent\fR\fI event\fR .RS 4 Added in Shorewall 4\&.5\&.19\&. Displays the named event\&. .RE .PP \fBevents\fR .RS 4 Added in Shorewall 4\&.5\&.19\&. Displays all events\&. .RE .PP \fBip\fR .RS 4 Displays the system\*(Aqs IPv4 configuration\&. .RE .PP \fBipa\fR .RS 4 Added in Shorewall 4\&.4\&.17\&. Displays the per\-IP accounting counters (\m[blue]\fBshorewall\-accounting\fR\m[]\&\s-2\u[14]\d\s+2 (5), \m[blue]\fBshorewall6\-accounting\fR\m[]\&\s-2\u[15]\d\s+2(5))\&. .RE .PP \fBipsec\fR .RS 4 Added in Shorewall 5\&.1\&.0\&. Displays the contents of the IPSEC Security Policy Database (SPD) and Security Association Database (SAD)\&. SAD keys are not displayed\&. .RE .PP [\-\fBm\fR] \fBlog\fR .RS 4 Displays the last 20 Shorewall messages from the log file specified by the LOGFILE option in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[2]\d\s+2(5) (\m[blue]\fBshorewall6\&.conf\fR\m[]\&\s-2\u[3]\d\s+2(5))\&. The \fB\-m\fR option causes the MAC address of each packet source to be displayed if that information is available\&. .RE .PP \fBmacros\fR .RS 4 Displays information about each macro defined on the firewall system (Shorewall and Shorewall6 only) .RE .PP \fBmacro \fR\fImacro\fR .RS 4 Added in Shorewall 4\&.4\&.6\&. Displays the file that implements the specified \fImacro\fR (usually /usr/share/shorewall/macro\&.\fImacro\fR)\&. Available only in Shorewall and Shorewall6\&. .RE .PP [\-\fBx\fR] \fBmangle\fR .RS 4 Displays the Netfilter mangle table using the command \fBiptables \-t mangle \-L \-n \-v\fR\&. The \fB\-x\fR option is passed directly through to iptables and causes actual packet and byte counts to be displayed\&. Without this option, those counts are abbreviated\&. .RE .PP \fBmarks\fR .RS 4 Added in Shorewall 4\&.4\&.26\&. Displays the various fields in packet marks giving the min and max value (in both decimal and hex) and the applicable mask (in hex)\&. .RE .PP [\-\fBx\fR] \fBnat\fR .RS 4 Displays the Netfilter nat table using the command \fBiptables \-t nat \-L \-n \-v\fR\&. The \fB\-x\fR option is passed directly through to iptables and causes actual packet and byte counts to be displayed\&. Without this option, those counts are abbreviated\&. .RE .PP \fBopens\fR .RS 4 Added in Shorewall 4\&.5\&.8\&. Displays the iptables rules in the \*(Aqdynamic\*(Aq chain created through use of the \fBopen \fRcommand\&.\&. .RE .PP \fBpolicies\fR .RS 4 Added in Shorewall 4\&.4\&.4\&. Displays the applicable policy between each pair of zones\&. Note that implicit intrazone ACCEPT policies are not displayed for zones associated with a single network where that network doesn\*(Aqt specify \fBrouteback\fR\&. .RE .PP \fBrc\fR .RS 4 Added in Shorewall 5\&.2\&.0\&. Displays the contents of $SHAREDIR/shorewall/shorewallrc\&. .RE .PP [\-\fBc\fR]\fB routing\fR .RS 4 Displays the system\*(Aqs IPv4 routing configuration\&. The\fB \-c\fR option causes the route cache to be displayed along with the other routing information\&. .RE .PP [\-\fBx\fR] \fBraw\fR .RS 4 Displays the Netfilter raw table using the command \fBiptables \-t raw \-L \-n \-v\fR\&. The \fB\-x\fR option is passed directly through to iptables and causes actual packet and byte counts to be displayed\&. Without this option, those counts are abbreviated\&. .RE .PP saves .RS 4 Added in Shorewall 5\&.2\&.0\&. Lists snapshots created by the \fBsave\fR command\&. Each snapshot is listed with the date and time when it was taken\&. If there is a snapshot with the name specified in the RESTOREFILE option in \m[blue]\fBshorewall\&.conf(5\fR\m[]\&\s-2\u[12]\d\s+2), that snapshot is listed as the \fIdefault\fR snapshot for the \fBrestore\fR command\&. .RE .PP \fBtc\fR .RS 4 Displays information about queuing disciplines, classes and filters\&. .RE .PP \fBzones\fR .RS 4 Displays the current composition of the Shorewall zones on the system\&. .RE .RE .PP \fBstart \fR\fB \fR[\-\fBn\fR] [\-\fBp\fR] [\-\fBd\fR] [\-\fBf\fR] [\-\fBc\fR] [\-\fBT\fR] [\-\fBi\fR] [\-\fBC\fR] [ \fIdirectory\fR ] .RS 4 .PP Shorewall and Shorewall6 .RS 4 Start shorewall[6]\&. Existing connections through shorewall managed interfaces are untouched\&. New connections will be allowed only if they are allowed by the firewall rules or policies\&. If a \fIdirectory\fR is included in the command, Shorewall will look in that \fIdirectory\fR first for configuration files\&. If \fB\-f\fR is specified, the saved configuration specified by the RESTOREFILE option in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[2]\d\s+2(5) (\m[blue]\fBshorewall6\&.conf\fR\m[]\&\s-2\u[3]\d\s+2(5)) will be restored if that saved configuration exists and has been modified more recently than the files in /etc/shorewall\&. When \fB\-f\fR is given, a \fIdirectory\fR may not be specified\&. .sp Update: In Shorewall 4\&.4\&.20, a new LEGACY_FASTSTART option was added to \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[2]\d\s+2(5) (\m[blue]\fBshorewall6\&.conf\fR\m[]\&\s-2\u[3]\d\s+2(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 started/restarted the firewall)\&. .sp The \fB\-n\fR option causes Shorewall to avoid updating the routing table(s)\&. .sp The \fB\-p\fR option causes the connection tracking table to be flushed; the \fBconntrack\fR utility must be installed to use this option\&. .sp The \fB\-c\fR option was added in Shorewall 4\&.4\&.20 and performs the compilation step unconditionally, overriding the AUTOMAKE setting in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[2]\d\s+2(5) (\m[blue]\fBshorewall6\&.conf\fR\m[]\&\s-2\u[3]\d\s+2(5))\&. When both \fB\-f\fR and \fB\-c\fRare present, the result is determined by the option that appears last\&. .sp The \fB\-T\fR option was added in Shorewall 4\&.5\&.3 and causes a Perl stack trace to be included with each compiler\-generated error and warning message\&. .sp The \-i option was added in Shorewall 4\&.6\&.0 and causes a warning message to be issued if the current line contains alternative input specifications following a semicolon (";")\&. Such lines will be handled incorrectly if INLINE_MATCHES is set to Yes in \m[blue]\fBshorewall\&.conf(5)\fR\m[]\&\s-2\u[2]\d\s+2 (\m[blue]\fBshorewall6\&.conf\fR\m[]\&\s-2\u[3]\d\s+2(5))\&. .sp The \fB\-C\fR option was added in Shorewall 4\&.6\&.5 and is only meaningful when the \fB\-f\fR option is also specified\&. If the previously\-saved configuration is restored, and if the \fB\-C\fR option was also specified in the \fBsave\fR command, then the packet and byte counters will be restored\&. .RE .PP Shorewall\-lite and Shorewall6\-lite .RS 4 Start Shorewall[6] Lite\&. Existing connections through shorewall[6]\-lite managed interfaces are untouched\&. New connections will be allowed only if they are allowed by the firewall rules or policies\&. .sp The \fB\-p\fR option causes the connection tracking table to be flushed; the \fBconntrack\fR utility must be installed to use this option\&. .sp The \fB\-n\fR option prevents the firewall script from modifying the current routing configuration\&. .sp The \fB\-f\fR option was added in Shorewall 4\&.6\&.5\&. If the RESTOREFILE named in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[12]\d\s+2(5) exists, is executable and is not older than the current filewall script, then that saved configuration is restored\&. .sp The \fB\-C\fR option was added in Shorewall 4\&.6\&.5 and is only meaningful when the \fB\-f\fR option is also specified\&. If the previously\-saved configuration is restored, and if the \fB\-C\fR option was also specified in the \fBsave\fR command, then the packet and byte counters will be restored\&. .RE .RE .PP \fBstop\fR [\-\fBf\fR] .RS 4 Stops the firewall\&. All existing connections, except those listed in \m[blue]\fBshorewall\-routestopped\fR\m[]\&\s-2\u[16]\d\s+2(5) or permitted by the ADMINISABSENTMINDED option in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[2]\d\s+2(5), are taken down\&. The only new traffic permitted through the firewall is from systems listed in \m[blue]\fBshorewall\-routestopped\fR\m[]\&\s-2\u[16]\d\s+2(5) or by ADMINISABSENTMINDED\&. .sp If \fB\-f\fR is given, the command will be processed by the compiled script that executed the last successful \fBstart\fR, \fBrestart\fR or \fBreload\fR command if that script exists\&. .RE .PP \fBstatus\fR [\-\fBi\fR] .RS 4 Produces a short report about the state of the Shorewall\-configured firewall\&. .sp The \fB\-i \fRoption was added in Shorewall 4\&.6\&.2 and causes the status of each optional or provider interface to be displayed\&. .RE .PP \fBtry\fR \fIdirectory\fR [ \fItimeout\fR ] .RS 4 This command is available in Shorewall and Shorewall6 only\&. .sp If Shorewall[6] is started then the firewall state is saved to a temporary saved configuration (/var/lib/shorewall/\&.try)\&. Next, if Shorewall[6] is currently started then a \fBrestart\fR command is issued using the specified configuration \fIdirectory\fR; otherwise, a \fBstart\fR command is performed using the specified configuration \fIdirectory\fR\&. if an error occurs during the compilation phase of the \fBrestart\fR or \fBstart\fR, the command terminates without changing the Shorewall[6] state\&. If an error occurs during the \fBrestart\fR phase, then a \fBshorewall restore\fR is performed using the saved configuration\&. If an error occurs during the \fBstart\fR phase, then Shorewall is cleared\&. If the \fBstart\fR/\fBrestart\fR succeeds and a \fItimeout\fR is specified then a \fBclear\fR or \fBrestore\fR is performed after \fItimeout\fR seconds\&. .sp Beginning with Shorewall 4\&.5\&.0, the numeric \fItimeout\fR may optionally be followed by an \fBs\fR, \fBm\fR or \fBh\fR suffix (e\&.g\&., 5m) to specify seconds, minutes or hours respectively\&. If the suffix is omitted, seconds is assumed\&. .RE .PP \fBupdate \fR [\-\fBd\fR] [\-\fBr\fR] [\-\fBT\fR] [\-\fBa\fR] [\-\fBi\fR] [\-\fBA\fR] [ \fIdirectory\fR ] .RS 4 This command is available only in Shorewall and Shorewall6\&. .sp Added in Shorewall 4\&.4\&.21 and causes the compiler to update /etc/shorewall/shorewall\&.conf then validate the configuration\&. The update will add options not present in the old file with their default values, and will move deprecated options with non\-defaults to a deprecated options section at the bottom of the file\&. Your existing shorewall\&.conf file is renamed shorewall\&.conf\&.bak\&. .sp The command was extended over the years with a set of options that caused additional configuration updates\&. .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Convert an existing blacklist file into an equivalent blrules file\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Convert an existing routestopped file into an equivalent stoppedrules file\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Convert existing tcrules and tos files into an equivalent mangle file\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Convert an existing notrack file into an equivalent conntrack file\&. .RE .sp .RS 4 .ie n \{\ \h'-04'\(bu\h'+03'\c .\} .el \{\ .sp -1 .IP \(bu 2.3 .\} Convert FORMAT, SECTION and COMMENT entries into ?FORMAT, ?SECTION and ?COMMENT directives\&. .RE .sp In each case, the old file is renamed with a \&.bak suffix\&. .sp In Shorewall 5\&.0\&.0, the options were eliminated and the \fBupdate\fR command performs all of the updates described above\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBImportant\fR .ps -1 .br There are some notable restrictions with the \fBupdate\fR command: .sp .RS 4 .ie n \{\ \h'-04' 1.\h'+01'\c .\} .el \{\ .sp -1 .IP " 1." 4.2 .\} Converted rules will be appended to the existing file; if there is no existing file in the CONFIG_PATH, one will be created in the directory specified in the command or in the first entry in the CONFIG_PATH (normally /etc/shorewall) otherwise\&. .RE .sp .RS 4 .ie n \{\ \h'-04' 2.\h'+01'\c .\} .el \{\ .sp -1 .IP " 2." 4.2 .\} Existing comments in the file being converted will not be transferred to the output file\&. .RE .sp .RS 4 .ie n \{\ \h'-04' 3.\h'+01'\c .\} .el \{\ .sp -1 .IP " 3." 4.2 .\} With the exception of the notrack\->conntrack conversion, INCLUDEd files will be expanded inline in the output file\&. .RE .sp .RS 4 .ie n \{\ \h'-04' 4.\h'+01'\c .\} .el \{\ .sp -1 .IP " 4." 4.2 .\} Columns in the output file will be separated by a single tab character; there is no attempt made to otherwise align the columns\&. .RE .sp .RS 4 .ie n \{\ \h'-04' 5.\h'+01'\c .\} .el \{\ .sp -1 .IP " 5." 4.2 .\} Prior to Shorewall 5\&.0\&.15, shell variables will be expanded in the output file\&. .RE .sp .RS 4 .ie n \{\ \h'-04' 6.\h'+01'\c .\} .el \{\ .sp -1 .IP " 6." 4.2 .\} Prior to Shorewall 5\&.0\&.15, lines omitted by compiler directives (?if \&.\&.\&.\&., etc\&.) will not appear in the output file\&. .if n \{\ .sp .\} .RS 4 .it 1 an-trap .nr an-no-space-flag 1 .nr an-break-flag 1 .br .ps +1 \fBImportant\fR .ps -1 .br Because the translation of the \*(Aqblacklist\*(Aq and \*(Aqroutestopped\*(Aq files is not 1:1, omitted lines and compiler directives are not transferred to the converted files\&. If either are present, the compiler issues a warning: .sp .if n \{\ .RS 4 .\} .nf WARNING: "Omitted rules and compiler directives were not translated .fi .if n \{\ .RE .\} .sp .5v .RE .RE .sp .5v .RE The \fB\-a\fR option causes the updated shorewall\&.conf file to be annotated with documentation\&. .sp The \fB\-i\fR option was added in Shorewall 4\&.6\&.0 and causes a warning message to be issued if the current line contains alternative input specifications following a semicolon (";")\&. Such lines will be handled incorrectly if INLINE_MATCHES is set to Yes in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[2]\d\s+2(5)\&. .sp The \fB\-A\fR option is included for compatibility with Shorewall 4\&.6 and is equivalent to specifying the \fB\-i\fR option\&. .sp For a description of the other options, see the \fBcheck\fR command above\&. .RE .PP \fBversion\fR [\-\fBa\fR] .RS 4 Displays Shorewall\*(Aqs version\&. The \fB\-a\fR option is included for compatibility with earlier Shorewall releases and is ignored\&. .RE .SH "EXIT STATUS" .PP In general, when a command succeeds, status 0 is returned; when the command fails, a non\-zero status is returned\&. .PP The \fBstatus\fR command returns exit status as follows: .PP 0 \- Firewall is started\&. .PP 3 \- Firewall is stopped or cleared .PP 4 \- Unknown state; usually means that the firewall has never been started\&. .SH "ENVIRONMENT" .PP Two environmental variables are recognized by Shorewall: .PP SHOREWALL_INIT_SCRIPT .RS 4 When set to 1, causes Std out to be redirected to the file specified in the STARTUP_LOG option in \m[blue]\fBshorewall\&.conf(5)\fR\m[]\&\s-2\u[12]\d\s+2\&. .RE .PP SW_LOGGERTAG .RS 4 Added in Shorewall 5\&.0\&.8\&. When set to a non\-empty value, that value is passed to the logger utility in its \-t (\-\-tag) option\&. .RE .SH "FILES" .PP /etc/shorewall/* .PP /etc/shorewall6/* .SH "SEE ALSO" .RS 4 \m[blue]\fBhttp://www\&.shorewall\&.net/starting_and_stopping_shorewall\&.htm\fR\m[]\&\s-2\u[17]\d\s+2 \- Describes operational aspects of Shorewall\&. .RE .RS 4 \m[blue]\fBshorewall\-files(5)\fR\m[]\&\s-2\u[18]\d\s+2 \- Describes the various configuration files along with features and conventions common to those files\&. .RE .RS 4 \m[blue]\fBshorewall\-names(5)\fR\m[]\&\s-2\u[19]\d\s+2 \- Describes naming of objects within a Shorewall configuration\&. .RE .RS 4 \m[blue]\fBshorewall\-addresses(5)\fR\m[]\&\s-2\u[20]\d\s+2 \- Describes how to specify addresses within a Shorewall configuration\&. .RE .RS 4 \m[blue]\fBshorewall\-exclusion(5)\fR\m[]\&\s-2\u[21]\d\s+2 \- Describes how to exclude certain hosts and/or networks from matching a rule\&. .RE .RS 4 \m[blue]\fBshorewall\-nesting(5)\fR\m[]\&\s-2\u[22]\d\s+2 \- Describes how to nest one Shorewall zone inside another\&. .RE .SH "NOTES" .IP " 1." 4 http://www.shorewall.net/starting_and_stopping_shorewall.htm#Trace .RS 4 \%http://www.shorewall.org/starting_and_stopping_shorewall.htm#Trace .RE .IP " 2." 4 shorewall.conf .RS 4 \%http://www.shorewall.org/manpages/shorewall.conf.html .RE .IP " 3." 4 shorewall6.conf .RS 4 \%http://www.shorewall.org/manpages6/shorewall6.conf.html .RE .IP " 4." 4 shorewall-interfaces .RS 4 \%http://www.shorewall.org/manpages/shorewall-interfaces.html .RE .IP " 5." 4 shorewall6-interfaces .RS 4 \%http://www.shorewall.org/manpages6/shorewall6-interfaces.html .RE .IP " 6." 4 shorewall-zones .RS 4 \%http://www.shorewall.org/manpages/shorewall-zones.html .RE .IP " 7." 4 shorewall6-zones .RS 4 \%http://www.shorewall.org??? .RE .IP " 8." 4 shorewall6-zones .RS 4 \%http://www.shorewall.org/manpages6/shorewall6-zones.html .RE .IP " 9." 4 shorewall-routes .RS 4 \%http://www.shorewall.org/manpages/shorewall-routes.html .RE .IP "10." 4 shorewall6-routes .RS 4 \%http://www.shorewall.org/manpages/shorewall6-routes.html .RE .IP "11." 4 logging backend .RS 4 \%http://www.shorewall.org/shorewall_logging.html#Backends .RE .IP "12." 4 shorewall.conf .RS 4 \%http://www.shorewall.orgshorewall.conf.html .RE .IP "13." 4 shorewall6.conf(5) .RS 4 \%http://www.shorewall.orgshorewall6.conf.html .RE .IP "14." 4 shorewall-accounting .RS 4 \%http://www.shorewall.org/manpages/shorewall-accounting.html .RE .IP "15." 4 shorewall6-accounting .RS 4 \%http://www.shorewall.org/manpages6/shorewall6-accounting.html .RE .IP "16." 4 shorewall-routestopped .RS 4 \%http://www.shorewall.org/manpages/shorewall-routestopped.html .RE .IP "17." 4 http://www.shorewall.net/starting_and_stopping_shorewall.htm .RS 4 \%http://www.shorewall.org/starting_and_stopping_shorewall.htm .RE .IP "18." 4 shorewall-files(5) .RS 4 \%http://www.shorewall.orgshorewall-files.html .RE .IP "19." 4 shorewall-names(5) .RS 4 \%http://www.shorewall.orgshorewall-names.html .RE .IP "20." 4 shorewall-addresses(5) .RS 4 \%http://www.shorewall.orgshorewall-addresses.html .RE .IP "21." 4 shorewall-exclusion(5) .RS 4 \%http://www.shorewall.orgshorewall-exclusion.html .RE .IP "22." 4 shorewall-nesting(5) .RS 4 \%http://www.shorewall.orgshorewall-nesting.html .RE shorewall-core-5.2.3.4/configure.pl0000775000000000000000000001405313531077634015646 0ustar rootroot#! /usr/bin/perl -w # # Shorewall Packet Filtering Firewall configuration program - V5.2 # # (c) 2012, 2014 - Tom Eastep (teastep@shorewall.net) # # Shorewall documentation is available at http://www.shorewall.net # # This program is part of Shorewall. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by the # Free Software Foundation, either version 2 of the license or, at your # option, any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # Usage: ./configure.pl