'\" t .\" Title: shorewall .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.1 .\" Date: 03/16/2017 .\" Manual: Administrative Commands .\" Source: Administrative Commands .\" Language: English .\" .TH "SHOREWALL" "8" "03/16/2017" "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\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBadd\ {\fR \fIinterface\fR[:\fIhost\-list\fR]... \fIzone\fR\fB\ |\fR\fI\ zone\ host\-list\fR\fB\ }\fR .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBallow\fR \fIaddress\fR .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBblacklist\fR \fIaddress\fR\ [\fIoption\fR\ \&.\&.\&.] .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBcall\fR \fIfunction\fR\ [\fIparameter\fR\ \&.\&.\&.] .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] [\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\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBclear\fR\ [\fB\-f\fR] .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBclose\fR\ {\ \fIopen\-number\fR\ |\ \fIsource\fR\fIdest\fR\ [\fIprotocol\fR\ [\ \fIport\fR\ ]]}\fI\ \fR .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] [\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\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBdelete\ {\fR \fIinterface\fR[:\fIhost\-list\fR]... \fIzone\fR\fB\ |\fR\fI\ zone\ host\-list\fR\fB\ }\fR .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBdisable\fR {\ \fIinterface\fR\ |\ \fIprovider\fR\ } .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBdrop\fR \fIaddress\fR .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] \fBdump\fR [\fB\-x\fR] [\fB\-l\fR] [\fB\-m\fR] [\fB\-c\fR] .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBenable\fR {\ \fIinterface\fR\ |\ \fIprovider\fR\ } .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBexport\fR [\fIdirectory1\fR] [\fIuser\fR@]\fIsystem\fR[\fB:\fR\fIdirectory2\fR] .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBforget\fR [\fIfilename\fR] .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] \fBhelp\fR .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] \fBhits\fR\ [\fB\-t\fR] .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] \fBipcalc\fR {\fIaddress\fR\ \fImask\fR | \fIaddress\fR/\fIvlsm\fR} .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] \fBiprange\fR \fIaddress1\fR\fB\-\fR\fIaddress2\fR .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] \fBiptrace\fR \fIiptables\ match\ expression\fR .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBlogdrop\fR \fIaddress\fR .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] \fBlogwatch\fR [\fB\-m\fR] [\fIrefresh\-interval\fR] .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBlogreject\fR \fIaddress\fR .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] \fBnoiptrace\fR \fIiptables\ match\ expression\fR .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\-\fIoptions\fR] \fBopen\fR\fI\ source\fR\fI\ dest\fR\ [\ \fIprotocol\fR\ [\ \fIport\fR\ ]\ ] .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBreenable\fR {\ \fIinterface\fR\ |\ \fIprovider\fR\ } .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBrefresh\fR\ [\fB\-n\fR]\ [\fB\-d\fR]\ [\fB\-T\fR]\ [\fB\-i\fR]\ [\-\fBD\fR\ \fIdirectory\fR\ ]\ [\fIchain\fR...] .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBreject\fR \fIaddress\fR .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] \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\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] \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\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] \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\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBreset\fR\ [\fIchain\fR\ \&.\&.\&.] .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \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\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBrestore\fR\ [\fB\-n\fR]\ [\fB\-p\fR]\ [\fB\-C\fR] [\fIfilename\fR] .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBrun\fR \fIcommand\fR [\fIparameter\ \&.\&.\&.\fR] .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBsafe\-restart\fR [\fB\-d\fR] [\fB\-p\fR] [\fB\-t\fR\ \fItimeout\fR] [\fIdirectory\fR] .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] \fBsafe\-start\fR [\fB\-d\fR] [\fB\-p\fR] [\fB\-t\fR\ \fItimeout\fR] [\fIdirectory\fR] .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBsave\fR\ [\fB\-C\fR] [\fIfilename\fR] .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBsavesets\fR .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] {\fBshow\ |\ list\ |\ ls\ \fR} [\fB\-x\fR] \fB{bl|blacklists}\fR .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] {\fBshow\ |\ list\ |\ ls\ \fR} [\fB\-b\fR] [\fB\-x\fR] [\fB\-l\fR] [\fB\-t\fR\ {\fBfilter\fR|\fBmangle\fR|\fBnat\fR|\fBraw|rawpost\fR}] [\fIchain\fR...] .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] {\fBshow\ |\ list\ |\ ls\ \fR} [\fB\-f\fR] \fBcapabilities\fR .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] {\fBshow\ |\ list\ |\ ls\ \fR} {\fBactions|classifiers|connections|config|events|filters|ip|ipa|macros|zones|policies|marks\fR} .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] {\fBshow\ |\ list\ |\ ls\ \fR} \fBevent\fR\ \fIevent\fR .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] {\fBshow\ |\ list\ |\ ls\ \fR} [\fB\-c\fR] \fBrouting\fR .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] {\fBshow\ |\ list\ |\ ls\ \fR} \fBmacro\fR\ \fImacro\fR .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] {\fBshow\ |\ list\ |\ ls\ \fR} [\fB\-x\fR] {\fBmangle|nat|raw|rawpost\fR} .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] {\fBshow\ |\ list\ |\ ls\ \fR} \fBtc\fR .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] {\fBshow\ |\ list\ |\ ls\ \fR} [\fB\-m\fR] \fBlog\fR .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \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\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBstop\fR\ [\fB\-f\fR] .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] \fBstatus\fR\ [\fB\-i\fR] .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBtry\fR \fIdirectory\fR [\fItimeout\fR] .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] \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\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] \fBversion\fR\ [\fB\-a\fR] .SH "DESCRIPTION" .PP The shorewall utility is used to control the Shoreline Firewall (Shorewall)\&. .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 The \fIoptions\fR control the amount of output that the command produces\&. They consist of a sequence of the letters \fBv\fR and \fBq\fR\&. If the options are omitted, the amount of output is determined by the setting of the VERBOSITY parameter in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[2]\d\s+2(5)\&. Each \fBv\fR adds one to the effective verbosity and each \fBq\fR subtracts one from the effective VERBOSITY\&. Alternatively, \fBv\fR may be followed immediately with one of \-1,0,1,2 to specify a specify VERBOSITY\&. There may be no white\-space between \fBv\fR and the VERBOSITY\&. .PP The \fIoptions\fR may also include the letter \fBt\fR which causes all progress messages to be timestamped\&. .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[3]\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[4]\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 \fBdrop\fR, \fBlogdrop\fR, \fBreject\fR, or \fBlogreject\fR command\&. Beginning with Shorewall 5\&.0\&.10, this command can also re\-enable addresses blacklisted using the \fBblacklist\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 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)\&. .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 \fBrefresh\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\&. .RE .PP \fBcompile \fR[\-\fBe\fR] [\-\fBc\fR] [\-\fBd\fR] [\-\fBp\fR] [\-\fBT\fR] [\-\fBi\fR] [\fI directory \fR] [\fI pathname\fR ] .RS 4 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)\&. .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[3]\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[4]\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[5]\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\&. .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[5]\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 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) 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\&. .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]\&. .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\&. .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 \m[blue]\fBlogging backend\fR\m[]\&\s-2\u[6]\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)\&. .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) 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)\&. .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 \fBrefresh \fR [\-\fBn\fR] [\-\fBd\fR] [\-\fBT\fR] [\-i] [\-\fBD \fR\fIdirectory\fR ] [ \fIchain\fR\&.\&.\&. ] .RS 4 All steps performed by \fBrestart\fR are performed by \fBrefresh\fR with the exception that \fBrefresh\fR only recreates the chains specified in the command while \fBrestart\fR recreates the entire Netfilter ruleset\&. If no \fIchain\fR is given, the static blacklisting chain \fBblacklst\fR is assumed\&. .sp The listed chains are assumed to be in the filter table\&. You can refresh chains in other tables by prefixing the chain name with the table name followed by ":" (e\&.g\&., nat:net_dnat)\&. Chain names which follow are assumed to be in that table until the end of the list or until an entry in the list names another table\&. Built\-in chains such as FORWARD may not be refreshed\&. .sp The \fB\-n\fR option was added in Shorewall 4\&.5\&.3 causes Shorewall to avoid updating the routing table(s)\&. .sp The \fB\-d\fR option was added in Shorewall 4\&.5\&.3 causes the compiler to run under the Perl debugger\&. .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\-D\fR option was added in Shorewall 4\&.5\&.3 and causes Shorewall to look in the given \fIdirectory\fR first for configuration files\&. .sp Example: .sp .if n \{\ .RS 4 .\} .nf \fBshorewall refresh net2fw nat:net_dnat\fR #Refresh the \*(Aqnet2loc\*(Aq chain in the filter table and the \*(Aqnet_dnat\*(Aq chain in the nat table .fi .if n \{\ .RE .\} .sp The \fBrefresh\fR command has slightly different behavior\&. When no chain name is given to the \fBrefresh\fR command, the mangle table is refreshed along with the blacklist chain (if any)\&. This allows you to modify /etc/shorewall/tcrulesand install the changes using \fBrefresh\fR\&. .RE .PP \fBreject\fR\fI address\fR .RS 4 Causes traffic from the listed \fIaddress\fRes to be silently rejected\&. .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)\&. .sp 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)\&. 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 \fBremote\-start\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\&. .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]\fBshorewall6\&.conf(5)\fR\m[]\&\s-2\u[7]\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 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\-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)\&. .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\&. .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[7]\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 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)\&. .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\&. .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[7]\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 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)\&. .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\&. .sp 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 \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)\&. .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\&. .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 is running\&. 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\&. .RE .PP \fBsave \fR [\-\fBC\fR] [ \fIfilename\fR ] .RS 4 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 and \fBshorewall \-f start\fR commands\&. 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)\&. .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))\&. 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 \fBactions\fR .RS 4 Produces a report about the available actions (built\-in, standard and user\-defined)\&. .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|\fBrawpost\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[8]\d\s+2 (5))\&. .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)\&. 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\&. .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)\&. .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 [\-\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 \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 Start shorewall\&. 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) 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)\&. 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)\&. 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\&. .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 \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[9]\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[9]\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 \fBrefresh\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 If Shorewall is started then the firewall state is saved to a temporary saved configuration (/var/lib/shorewall/\&.try)\&. Next, if Shorewall 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 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 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[10]\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/ .SH "SEE ALSO" .PP \m[blue]\fBhttp://www\&.shorewall\&.net/starting_and_stopping_shorewall\&.htm\fR\m[]\&\s-2\u[11]\d\s+2 .PP shorewall\-accounting(5), shorewall\-actions(5), shorewall\-blacklist(5), shorewall\-hosts(5), shorewall_interfaces(5), shorewall\-ipsets(5), shorewall\-maclist(5), shorewall\-masq(5), shorewall\-nat(5), shorewall\-netmap(5), shorewall\-params(5), shorewall\-policy(5), shorewall\-providers(5), shorewall\-proxyarp(5), shorewall\-rtrules(5), shorewall\-routestopped(5), shorewall\-rules(5), shorewall\&.conf(5), shorewall\-secmarks(5), shorewall\-tcclasses(5), shorewall\-tcdevices(5), shorewall\-tcrules(5), shorewall\-tos(5), shorewall\-tunnels(5), shorewall\-zones(5) .SH "NOTES" .IP " 1." 4 http://www.shorewall.net/starting_and_stopping_shorewall.htm#Trace .RS 4 \%http://www.shorewall.net/starting_and_stopping_shorewall.htm#Trace .RE .IP " 2." 4 shorewall.conf .RS 4 \%http://www.shorewall.net/manpages/shorewall.conf.html .RE .IP " 3." 4 shorewall-interfaces .RS 4 \%http://www.shorewall.net/manpages/shorewall-interfaces.html .RE .IP " 4." 4 shorewall-zones .RS 4 \%http://www.shorewall.net/manpages/shorewall-zones.html .RE .IP " 5." 4 shorewall-routes .RS 4 \%http://www.shorewall.net/manpages/shorewall-routes.html .RE .IP " 6." 4 logging backend .RS 4 \%http://www.shorewall.net/shorewall_logging.html#Backends .RE .IP " 7." 4 shorewall6.conf(5) .RS 4 \%http://www.shorewall.netshorewall6.conf.html .RE .IP " 8." 4 shorewall-accounting .RS 4 \%http://www.shorewall.net/manpages/shorewall-accounting.html .RE .IP " 9." 4 shorewall-routestopped .RS 4 \%http://www.shorewall.net/manpages/shorewall-routestopped.html .RE .IP "10." 4 shorewall.conf(5) .RS 4 \%http://www.shorewall.netshorewall.conf.html .RE .IP "11." 4 http://www.shorewall.net/starting_and_stopping_shorewall.htm .RS 4 \%http://www.shorewall.net/starting_and_stopping_shorewall.htm .RE