'\" t .\" Title: shorewall6-lite .\" 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 "SHOREWALL6\-LITE" "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" shorewall6-lite \- Administration tool for Shoreline 6 Firewall Lite (Shorewall6 Lite) .SH "SYNOPSIS" .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBadd\fR \fIinterface\fR[:\fIhost\-list\fR]... \fIzone\fR .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBallow\fR \fIaddress\fR .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBblacklist\fR \fIaddress\fR .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBcall\fR \fIfunction\fR\ [\fIparameter\fR\ \&.\&.\&.] .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBclear\fR\ [\fB\-f\fR] .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\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'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBclose\fR\fI\ source\fR\fI\ dest\fR\ [\ \fIprotocol\fR\ [\ \fIport\fR\ ]\ ] .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBdelete\fR \fIinterface\fR[:\fIhost\-list\fR]... \fIzone\fR .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBdisable\fR {\ \fIinterface\fR\ |\ \fIprovider\fR\ } .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBdrop\fR \fIaddress\fR .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] \fBdump\fR [\fB\-x\fR] [\fB\-l\fR] [\fB\-m\fR] [\fB\-c\fR] .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBenable\fR {\ \fIinterface\fR\ |\ \fIprovider\fR\ } .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBforget\fR [\fIfilename\fR] .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] \fBhelp\fR .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] \fBhits\fR\ [\fB\-t\fR] .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] \fBiptrace\fR \fIiptables\ match\ expression\fR .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBlogdrop\fR \fIaddress\fR .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] \fBlogwatch\fR [\fB\-m\fR] [\fIrefresh\-interval\fR] .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBlogreject\fR \fIaddress\fR .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] \fBnoiptrace\fR \fIiptables\ match\ expression\fR .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBopen\fR\fI\ source\fR\fI\ dest\fR\ [\ \fIprotocol\fR\ [\ \fIport\fR\ ]\ ] .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBreenable\fR {\ \fIinterface\fR\ |\ \fIprovider\fR\ } .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBreject\fR \fIaddress\fR .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBreset\fR .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBrestart\fR [\fB\-n\fR] [\fB\-p\fR] [\fB\-C\fR] .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBrestore\fR [\fB\-C\fR] [\fIfilename\fR] .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBrun\fR command [\fIparameter\ \&.\&.\&.\fR] .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBsave\fR [\fB\-C\fR] [\fIfilename\fR] .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBsavesets\fR .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\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}] [[\fBchain\fR]\ \fIchain\fR...] .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] {\fBshow\ |\ list\ |\ ls\ \fR} [\fB\-f\fR] \fBcapabilities\fR .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] {\fBshow\ |\ list\ |\ ls\ \fR} [\fB\-x\fR] \fB{bl|blacklists}\fR .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] {\fBshow\ |\ list\ |\ ls\ \fR} {\fBclassifiers|connections|config|events|filters|ip|ipa|zones|policies|marks\fR} .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] {\fBshow\ |\ list\ |\ ls\ \fR} \fBevent\fR\ \fIevent\fR .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] {\fBshow\ |\ list\ |\ ls\ \fR} [\fB\-c\fR] \fBrouting\fR .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] {\fBshow\ |\ list\ |\ ls\ \fR} [\fB\-x\fR] {\fBmangle|nat|raw|rawpost\fR} .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] {\fBshow\ |\ list\ |\ ls\ \fR} \fBtc\fR .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] {\fBshow\ |\ list\ |\ ls\ \fR} [\fB\-m\fR] \fBlog\fR .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBstart\fR [\fB\-n\fR] [\fB\-p\fR] [\fB\-f\fR] [\fB\-C\fR] .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR\ [\fBnolock\fR]] [\-\fIoptions\fR] \fBstop\fR .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] \fBstatus\fR\ [\fB\-i\fR] .HP \w'\fBshorewall6\-lite\fR\ 'u \fBshorewall6\-lite\fR [\fBtrace\fR|\fBdebug\fR] [\-\fIoptions\fR] \fBversion\fR\ [\fB\-a\fR] .SH "DESCRIPTION" .PP The shorewall6\-lite utility is used to control the Shoreline Firewall Lite (Shorewall Lite)\&. .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 \fBnolock\fR option prevents the command from attempting to acquire the shorewall6\-lite lockfile\&. It is useful if you need to include \fBshorewall\fR commands in the started\m[blue]\fBextension script\fR\m[]\&\s-2\u[1]\d\s+2\&. .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]\fBshorewall6\&.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\&. Alternately, \fBv\fR may be followed immediately with one of \-1,0,1,2 to 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 \fBshorewall6\-lite 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\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]\fBshorewall6\&.conf\fR\m[]\&\s-2\u[4]\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]\fBshorewall6\&.conf\fR\m[]\&\s-2\u[4]\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 and lib\&.cli\&. If it is not found, the call command is passed to the generated script to be executed\&. .RE .PP \fBclear \fR\fB \fR[\-\fBf\fR] .RS 4 Clear will remove all rules and chains installed by shorewall6\-lite\&. 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, \fBreload\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 \fBshorewall6\-lite 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 \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\&. .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\&. .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 shorewall6\-lite 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\&. .RE .PP \fBforget \fR[ \fIfilename\fR ] .RS 4 Deletes /var/lib/shorewall6\-lite/\fIfilename\fR and /var/lib/shorewall6\-lite/save\&. If no \fIfilename\fR is given then the file specified by RESTOREFILE in \m[blue]\fBshorewall6\&.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 .RS 4 Generates several reports from shorewall6\-lite 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 \fBiptrace \fR\fIip6tables 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 trace records are written to the kernel\*(Aqs log buffer with facility = kernel and priority = warning, and they are routed from there by your logging daemon (syslogd, rsyslog, syslog\-ng, \&.\&.\&.) \-\- shorewall6\-lite has no control over where the messages go; consult your logging daemon\*(Aqs documentation\&. .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]\fBshorewall6\&.conf\fR\m[]\&\s-2\u[2]\d\s+2 (5)\&. .RE .PP \fBlogwatch \fR[\-\fBm\fR] [\fIrefresh\-interval\fR] .RS 4 Monitors the log file specified by the LOGFILE option in \m[blue]\fBshorewall6\&.conf\fR\m[]\&\s-2\u[2]\d\s+2(5) and produces an audible alarm when new shorewall6\-lite messages are logged\&. .sp The \fB\-m\fR option causes the MAC address of each packet source to be displayed if that information is available\&. .sp 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\&., \fBshorewall6\-lite 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\fIaddress\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]\fBshorewall6\&.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\fIip6tables 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 \fIip6tables 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]\fBshorewall6\&.conf (5)\fR\m[]\&\s-2\u[4]\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 2001:470:b:227::1, the command would be: .sp .if n \{\ .RS 4 .\} .nf shorewall6\-lite open all 2001:470:b:227::1 tcp 22 .fi .if n \{\ .RE .\} .sp To reverse that command, use: .sp .if n \{\ .RS 4 .\} .nf shorewall6\-lite close all 2001:470:b:227::1 tcp 22 .fi .if n \{\ .RE .\} .RE .PP \fBreenable\fR{ \fIinterface\fR | \fIprovider\fR } .RS 4 Added in Shorewall 4\&.6\&.9\&. This is equivalent to a \fBdisable\fR command followed by an \fBenable\fR command on the specified \fIinterface\fR or \fIprovider\fR\&. .RE .PP \fBreject\fR\fI address\fR .RS 4 Causes traffic from the listed \fIaddress\fRes to be silently rejected\&. .RE .PP \fBreload \fR[\-n] [\-p] [\-\fBC\fR] .RS 4 Added in Shorewall 5\&.0\&.0, \fBreload\fR is similar to \fBshorewall6\-lite start\fR except that it assumes that the firewall is already started\&. Existing connections are maintained\&. .sp The \fB\-n\fR option causes shorewall6\-lite to avoid updating the routing table(s)\&. .sp The \fB\-p\fR option causes the connection tracking table to be flushed; the \fBconntrack\fR utility must be installed to use this option\&. .sp The \fB\-C\fR option was added in Shorewall 4\&.6\&.5\&. If the specified (or implicit) firewall script is the one that generated the current running configuration, then the running netfilter configuration will be reloaded as is so as to preserve the iptables packet and byte counters\&. .RE .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\&. .RE .PP \fBrestart \fR[\-n] [\-p] [\-\fBC\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 The \fB\-n\fR option causes shorewall6\-lite to avoid updating the routing table(s)\&. .sp The \fB\-p\fR option causes the connection tracking table to be flushed; the \fBconntrack\fR utility must be installed to use this option\&. .sp The \fB\-C\fR option was added in Shorewall 4\&.6\&.5\&. If the specified (or implicit) firewall script is the one that generated the current running configuration, then the running netfilter configuration will be reloaded as is so as to preserve the iptables packet and byte counters\&. .RE .PP \fBrestore \fR[\-\fBn\fR] [\-\fBp\fR] [\-\fBC\fR] [ \fIfilename\fR ] .RS 4 Restore shorewall6\-lite to a state saved using the \fBshorewall6\-lite save\fR command\&. Existing connections are maintained\&. The \fIfilename\fR names a restore file in /var/lib/shorewall6\-lite created using \fBshorewall6\-lite save\fR; if no \fIfilename\fR is given then shorewall6\-lite will be restored from the file specified by the RESTOREFILE option in \m[blue]\fBshorewall6\&.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 ip6tables 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\-C\fR option was added in Shorewall 4\&.6\&.5\&. If the \fB\-C\fR option was specified during \fBshorewall7\-lite 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 command, the script will detect the configuration, setting all SW_* variables and will run your init extension script with $COMMAND = \*(Aqrun\*(Aq\&. .RE .PP \fBsave \fR[\-\fBC\fR] [ \fIfilename\fR ] .RS 4 The dynamic blacklist is stored in /var/lib/shorewall6\-lite/save\&. The state of the firewall is stored in /var/lib/shorewall6\-lite/\fIfilename\fR for use by the \fBshorewall6\-lite restore\fR command\&. If \fIfilename\fR is not given then the state is saved in the file specified by the RESTOREFILE option in \m[blue]\fBshorewall6\&.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 ip6tables 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]\fBshorewall6\&.conf\fR\m[]\&\s-2\u[4]\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 [\-\fBx\fR] \fBbl|blacklists\fR .RS 4 Added in Shorewall 4\&.6\&.2\&. Displays the dynamic chain along with any chains produced by entries in shorewall6\-blrules(5)\&.The \fB\-x\fR option is passed directly through to ip6tables 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\&. .sp 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\&. .sp 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 \fB\-t\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[5]\d\s+2 (5))\&. .RE .PP [\-\fBm\fR] \fBlog\fR .RS 4 Displays the last 20 shorewall6\-lite messages from the log file specified by the LOGFILE option in \m[blue]\fBshorewall6\&.conf\fR\m[]\&\s-2\u[2]\d\s+2(5)\&. .sp The \fB\-m\fR option causes the MAC address of each packet source to be displayed if that information is available\&. .RE .PP [\-\fBx\fR] \fBmangle\fR .RS 4 Displays the Netfilter mangle table using the command \fBip6tables \-t mangle \-L \-n \-v\fR\&.The \fB\-x\fR option is passed directly through to ip6tables 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 \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 [\-\fBx\fR] \fBnat\fR .RS 4 Displays the Netfilter nat table using the command \fBip6tables \-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 [\-\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 [\-\fBc\fR]\fB \fR\fBrouting\fR .RS 4 Displays the system\*(Aqs IPv4 routing configuration\&. The \-c option causes the route cache to be displayed in addition to the other routing information\&. .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[\-\fBp\fR] [\-\fBn\fR] [\fB\-f\fR] [\-\fBC\fR] .RS 4 Start Shorewall6 Lite\&. Existing connections through shorewall6\-lite managed interfaces are untouched\&. New connections will be allowed only if they are allowed by the firewall rules or policies\&. .sp The \fB\-p\fR option causes the connection tracking table to be flushed; the \fBconntrack\fR utility must be installed to use this option\&. .sp The \fB\-n\fR option prevents the firewall script from modifying the current routing configuration\&. .sp The \fB\-f\fR option was added in Shorewall 4\&.6\&.5\&. If the RESTOREFILE named in \m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[2]\d\s+2(5) exists, is executable and is not older than the current filewall script, then that saved configuration is restored\&. .sp The \fB\-C\fR option was added in Shorewall 4\&.6\&.5 and is only meaningful when the \fB\-f\fR option is also specified\&. If the previously\-saved configuration is restored, and if the \fB\-C\fR option was also specified in the \fBsave\fR command, then the packet and byte counters will be restored\&. .RE .PP \fBstop \fR\fB \fR[\-\fBf\fR] .RS 4 Stops the firewall\&. All existing connections, except those listed in \m[blue]\fBshorewall\-routestopped\fR\m[]\&\s-2\u[6]\d\s+2(5) or permitted by the ADMINISABSENTMINDED option in \m[blue]\fBshorewall6\&.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[6]\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\&. .sp The \fB\-i\fR option was added in Shorewall 4\&.6\&.2 and causes the status of each optional or provider interface to be displayed\&. .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 Shorewall6\-lite: .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]\fBshorewall6\&.conf(5)\fR\m[]\&\s-2\u[7]\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 "SEE ALSO" .PP \m[blue]\fBhttp://www\&.shorewall\&.net/starting_and_stopping_shorewall\&.htm\fR\m[] .PP shorewall6\-accounting(5), shorewall6\-actions(5), shorewall6\-blacklist(5), shorewall6\-hosts(5), shorewall_interfaces(5), shorewall6\-ipsets(5), shorewall6\-maclist(5), shorewall6\-masq(5), shorewall6\-netmap(5), shorewall6\-params(5), shorewall6\-policy(5), shorewall6\-providers(5), shorewall6\-proxyarp(5), shorewall6\-rtrules(5), shorewall6\-routestopped(5), shorewall6\-rules(5), shorewall6\&.conf(5), shorewall6\-secmarks(5), shorewall6\-tcclasses(5), shorewall6\-tcdevices(5), shorewall6\-tcrules(5), shorewall6\-tos(5), shorewall6\-tunnels(5), shorewall6\-zones(5) .SH "NOTES" .IP " 1." 4 extension script .RS 4 \%http://www.shorewall.net../shorewall_extension_scripts.html .RE .IP " 2." 4 shorewall6.conf .RS 4 \%http://www.shorewall.netshorewall.conf.html .RE .IP " 3." 4 shorewall-interfaces .RS 4 \%http://www.shorewall.netshorewall-interfaces.html .RE .IP " 4." 4 shorewall6.conf .RS 4 \%http://www.shorewall.net/manpages6/shorewall6.conf.html .RE .IP " 5." 4 shorewall-accounting .RS 4 \%http://www.shorewall.netmanpages/shorewall-accounting.html .RE .IP " 6." 4 shorewall-routestopped .RS 4 \%http://www.shorewall.netshorewall-routestopped.html .RE .IP " 7." 4 shorewall6.conf(5) .RS 4 \%http://www.shorewall.netshorewall6.conf.html .RE