'\" t .\" Title: shorewall .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.75.2 .\" Date: 06/28/2012 .\" Manual: [FIXME: manual] .\" Source: [FIXME: source] .\" Language: English .\" .TH "SHOREWALL" "8" "06/28/2012" "[FIXME: source]" "[FIXME: manual]" .\" ----------------------------------------------------------------- .\" * 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 .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] [\-\fIoptions\fR] \fBcheck\fR [\fB\-e\fR] [\fB\-d\fR] [\fB\-p\fR] [\fB\-r\fR] [\fB\-T\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] [\-\fIoptions\fR] \fBcompile\fR [\fB\-e\fR] [\fB\-d\fR] [\fB\-p\fR] [\fB\-T\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 .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] .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] [\-\fIoptions\fR] \fBload\fR [\fB\-s\fR] [\fB\-c\fR] [\fB\-r\fR\ \fIroot\-user\-name\fR] [\fB\-T\fR] [\fIdirectory\fR] \fIsystem\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 [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBrefresh\fR\ [\fB\-n\fR]\ [\fB\-d\fR]\ [\fB\-T\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] \fBreload\fR [\fB\-s\fR] [\fB\-c\fR] [\fB\-r\fR\ \fIroot\-user\-name\fR] [\fB\-T\fR] [\fIdirectory\fR] \fIsystem\fR .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBreset\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] [\fIdirectory\fR] .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBrestore\fR [\fIfilename\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 [\fIfilename\fR] .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] \fBshow\fR [\fB\-x\fR] [\fB\-l\fR] [\fB\-t\fR\ {\fBfilter\fR|\fBmangle\fR|\fBnat\fR|\fBraw|rawpost\fR}] [[\fBchain\fR]\ \fIchain\fR...] .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] \fBshow\fR [\fB\-f\fR] \fBcapabilities\fR .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] \fBshow\fR {\fBactions|classifiers|connections|config|filters|ip|ipa|macros|zones|policies|marks\fR} .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] \fBshow\fR \fBmacro\fR\ \fImacro\fR .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] \fBshow\fR [\fB\-x\fR] {\fBmangle|nat|routing|raw|rawpost\fR} .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] \fBshow\fR \fBtc\fR .HP \w'\fBshorewall\fR\ 'u \fBshorewall\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] \fBshow\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] [\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 .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] [\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[]\&. .PP The nolock \fBoption\fR 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[1]\d\s+2(5)\&. Each \fBv\fR adds one to the effective verbosity and each \fBq\fR subtracts one from the effective VERBOSITY\&. Anternately, \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 .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[2]\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 .RE .PP \fBallow\fR .RS 4 Re\-enables receipt of packets from hosts previously blacklisted by a \fBdrop\fR, \fBlogdrop\fR, \fBreject\fR, or \fBlogreject\fR command\&. .RE .PP \fBcheck\fR .RS 4 Compiles the configuraton 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\&. .RE .PP \fBclear\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 \fBcompile\fR .RS 4 Compiles the current configuration into the executable file \fIpathname\fR\&. If a directory 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 \-e 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 \-e requires the presense 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\-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\&. .RE .PP \fBdelete\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[2]\d\s+2(5) file\&. A \fIhost\-list\fR is comma\-separated list whose elements are a host or network address\&. .RE .PP \fBdisable\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\&. .RE .PP \fBdrop\fR .RS 4 Causes traffic from the listed \fIaddress\fRes to be silently dropped\&. .RE .PP \fBdump\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\&. 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\&. .RE .PP \fBenable\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\&. .RE .PP \fBexport\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 .RS 4 Deletes /var/lib/shorewall/\fIfilenam\fRe 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[1]\d\s+2(5) is assumed\&. .RE .PP \fBhelp\fR .RS 4 Displays a syntax summary\&. .RE .PP \fBhits\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 .RS 4 Ipcalc displays the network address, broadcast address, network in CIDR notation and netmask corresponding to the input[s]\&. .RE .PP \fBiprange\fR .RS 4 Iprange decomposes the specified range of IP addresses into the equivalent list of network/host addresses\&. .RE .PP \fBiptrace\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 trace records are written to the kernel\*(Aqs log buffer with faciility = kernel and priority = warning, and they are routed from there by your logging daemon (syslogd, rsyslog, syslog\-ng, \&.\&.\&.) \-\- Shorewall has no control over where the messages go; consult your logging daemon\*(Aqs documentation\&. .RE .PP \fBload\fR .RS 4 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\&. .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\&. .RE .PP \fBlogdrop\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[1]\d\s+2 (5)\&. .RE .PP \fBlogwatch\fR .RS 4 Monitors the log file specified by the LOGFILE option in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[1]\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 .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[1]\d\s+2 (5)\&. .RE .PP \fBnoiptrace\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 cancelled\&. .RE .PP \fBrefresh\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 \fRoption 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 \-\fBD\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 \fBreload\fR .RS 4 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\&. .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\&. .RE .PP \fBreset\fR .RS 4 All the packet and byte counters in the firewall are reset\&. .RE .PP \fBrestart\fR .RS 4 Restart 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 \fRoption 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[1]\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\&. .RE .PP \fBrestore\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[1]\d\s+2(5)\&. .RE .PP \fBsafe\-restart\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 .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 .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[1]\d\s+2(5)\&. .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 \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 [ [ \fBchain\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\-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 Dispays distribution\-specific defaults\&. .RE .PP \fBconnections\fR .RS 4 Displays the IP connections currently being tracked by the firewall\&. .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[3]\d\s+2 (5))\&. .RE .PP \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[1]\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 .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 \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 \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 \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 \fBrouting\fR .RS 4 Displays the system\*(Aqs IPv4 routing configuration\&. .RE .PP \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 .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[1]\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[1]\d\s+2(5)\&. When LEGACY_FASTSTART=No, the modificaiotn 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[1]\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\&. .RE .PP \fBstop\fR .RS 4 Stops the firewall\&. All existing connections, except those listed in \m[blue]\fBshorewall\-routestopped\fR\m[]\&\s-2\u[4]\d\s+2(5) or permitted by the ADMINISABSENTMINDED option in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[1]\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[4]\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 .RS 4 Produces a short report about the state of the Shorewall\-configured firewall\&. .RE .PP \fBtry\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; otherwise, a \fBstart\fR command is performed\&. if an error occurs during the compliation 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 .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 \fB\-a\fR option causes the updated shorewall\&.conf file to be annotated with documentation\&. .sp The \fB\-b\fR option was added in Shorewall 4\&.4\&.26 and causes legacy blacklisting rules (\m[blue]\fBshorewall\-blacklist\fR\m[]\&\s-2\u[5]\d\s+2 (5) ) to be converted to entries in the blrules file (\m[blue]\fBshorewall\-blrules\fR\m[]\&\s-2\u[6]\d\s+2 (5) )\&. The blacklist keyword is removed from \m[blue]\fBshorewall\-zones\fR\m[]\&\s-2\u[7]\d\s+2 (5), \m[blue]\fBshorewall\-interfaces\fR\m[]\&\s-2\u[2]\d\s+2 (5) and \m[blue]\fBshorewall\-hosts\fR\m[]\&\s-2\u[8]\d\s+2 (5)\&. The unmodified files are saved with a \&.bak suffix\&. .sp For a description of the other options, see the \fBcheck\fR command above\&. .RE .PP \fBversion\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 "FILES" .PP /etc/shorewall/ .SH "SEE ALSO" .PP \m[blue]\fBhttp://www\&.shorewall\&.net/starting_and_stopping_shorewall\&.htm\fR\m[] .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 shorewall.conf .RS 4 \%http://www.shorewall.net/manpages/shorewall.conf.html .RE .IP " 2." 4 shorewall-interfaces .RS 4 \%http://www.shorewall.net/manpages/shorewall-interfaces.html .RE .IP " 3." 4 shorewall-accounting .RS 4 \%http://www.shorewall.net/manpages/manpages/shorewall-accounting.html .RE .IP " 4." 4 shorewall-routestopped .RS 4 \%http://www.shorewall.net/manpages/shorewall-routestopped.html .RE .IP " 5." 4 shorewall-blacklist .RS 4 \%http://www.shorewall.net/manpages/shorewall-blacklist.html .RE .IP " 6." 4 shorewall-blrules .RS 4 \%http://www.shorewall.net/manpages/shorewall-blrules.html .RE .IP " 7." 4 shorewall-zones .RS 4 \%http://www.shorewall.net/manpages/shorewall-zones.html .RE .IP " 8." 4 shorewall-hosts .RS 4 \%http://www.shorewall.net/manpages/shorewall-hosts.html .RE