📄 shorewall.8
字号:
.spif\fB\-c\fRis included, the command\fBshorewall\-lite show capabilities \-f > /var/lib/shorewall\-lite/capabilities\fRis executed via ssh then the generated file is copied to\fIdirectory\fRusing scp\&. This step is performed before the configuration is compiled\&..spIf\fB\-r\fRis included, it specifies that the root user on\fIsystem\fRis named\fIroot\-user\-name\fRrather than "root"\&..spThe\fB\-C\fRoption determines the compiler to use (Shorewall\-shell or Shorewall\-perl)\&. If not specified, the SHOREWALL_COMPILER setting in\m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[1]\d\s+2(5) determines the compiler to use\&..RE.PP\fBreset\fR.RS 4All the packet and byte counters in the firewall are reset\&..RE.PP\fBrestart\fR.RS 4Restart is similar to\fBshorewall start\fRexcept that it assumes that the firewall is already started\&. Existing connections are maintained\&. If a\fIdirectory\fRis included in the command, Shorewall will look in that\fIdirectory\fRfirst for configuration files\&..spThe\fB\-n\fRoption causes Shorewall to avoid updating the routing table(s)\&..spThe\fB\-p\fRoption causes the connection tracking table to be flushed; the\fBconntrack\fRutility must be installed to use this option\&..spThe\fB\-f\fRoption suppresses the compilation step and simply reused the compiled script which last started/restarted Shorewall\&..spThe\fB\-C\fRoption determines the compiler to use (Shorewall\-shell or Shorewall\-perl)\&. If not specified, the SHOREWALL_COMPILER setting in\m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[1]\d\s+2(5) determines the compiler to use\&..if n \{\.sp.\}.RS 4.BM yellow.it 1 an-trap.nr an-no-space-flag 1.nr an-break-flag 1.br.ps +1\fBWarning\fR.ps -1.brIf you use Shorewall\'s multi\-ISP feature, you are stronly advised against using the \-C option of the\fBrestart\fRcommand when switching between Shorewall\-shell and Shorewall\-perl\&. The only supported way to switch compilers is to\fBshorewall stop\fRfollowed by\fBshorewall start \-C\fR\fIcompiler\fR.sp .5v.EM yellow.RE.RE.PP\fBrestore\fR.RS 4Restore Shorewall to a state saved using the\fBshorewall save\fRcommand\&. Existing connections are maintained\&. The\fIfilename\fRnames a restore file in /var/lib/shorewall created using\fBshorewall save\fR; if no\fIfilename\fRis 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 4Only 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\fRis 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\&..spThe\fB\-C\fRoption determines the compiler to use (Shorewall\-shell or Shorewall\-perl)\&. If not specified, the SHOREWALL_COMPILER setting in\m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[1]\d\s+2(5) determines the compiler to use\&..if n \{\.sp.\}.RS 4.BM yellow.it 1 an-trap.nr an-no-space-flag 1.nr an-break-flag 1.br.ps +1\fBWarning\fR.ps -1.brIf you use Shorewall\'s multi\-ISP feature, you are stronly advised against using the \-C option of the\fBsafe\-restart\fRcommand when switching between Shorewall\-shell and Shorewall\-perl\&. The only supported way to switch compilers is to\fBshorewall stop\fRfollowed by\fBshorewall safe\-start \-C\fR\fIcompiler\fR.sp .5v.EM yellow.RE.RE.PP\fBsafe\-start\fR.RS 4Shorewall 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\&..spThe\fB\-C\fRoption determines the compiler to use (Shorewall\-shell or Shorewall\-perl)\&. If not specified, the SHOREWALL_COMPILER setting in\m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[1]\d\s+2(5) determines the compiler to use\&..RE.PP\fBsave\fR.RS 4The dynamic blacklist is stored in /var/lib/shorewall/save\&. The state of the firewall is stored in /var/lib/shorewall/\fIfilename\fRfor use by the\fBshorewall restore\fRand\fBshorewall \-f start\fRcommands\&. If\fIfilename\fRis 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 4The show command can have a number of different arguments:.PP\fBactions\fR.RS 4Produces a report about the available actions (built\-in, standard and user\-defined)\&..RE.PP\fBcapabilities\fR.RS 4Displays your kernel/iptables capabilities\&. The\fB\-f\fRoption causes the display to be formatted as a capabilities file for use with\fBcompile \-e\fR\&..RE.PP[ [ \fBchain\fR ] \fIchain\fR\&.\&.\&. ].RS 4The rules in each\fIchain\fRare displayed using the\fBiptables \-L\fR\fIchain\fR\fB\-n \-v\fRcommand\&. If no\fIchain\fRis given, all of the chains in the filter table are displayed\&. The\fB\-x\fRoption 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\fRoption specifies the Netfilter table to display\&. The default is\fBfilter\fR\&..spIf the\fBt\fRoption and the\fBchain\fRkeyword are both omitted and any of the listed\fIchain\fRs do not exist, a usage message is displayed\&..RE.PP\fBclassifiers|filters\fR.RS 4Displays information about the packet classifiers defined on the system as a result of traffic shaping configuration\&..RE.PP\fBconfig\fR.RS 4Dispays distribution\-specific defaults\&..RE.PP\fBconnections\fR.RS 4Displays the IP connections currently being tracked by the firewall\&..RE.PP\fBlog\fR.RS 4Displays 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\fRoption causes the MAC address of each packet source to be displayed if that information is available\&..RE.PP\fBmacros\fR.RS 4Displays information about each macro defined on the firewall system\&..RE.PP\fBmangle\fR.RS 4Displays the Netfilter mangle table using the command\fBiptables \-t mangle \-L \-n \-v\fR\&.The\fB\-x\fRoption 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\fBnat\fR.RS 4Displays the Netfilter nat table using the command\fBiptables \-t nat \-L \-n \-v\fR\&.The\fB\-x\fRoption 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\fBraw\fR.RS 4Displays the Netfilter raw table using the command\fBiptables \-t raw \-L \-n \-v\fR\&.The\fB\-x\fRoption 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 4Displays information about queuing disciplines, classes and filters\&..RE.PP\fBzones\fR.RS 4Displays the current composition of the Shorewall zones on the system\&..RE.RE.PP\fBstart\fR.RS 4Start 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\fRis included in the command, Shorewall will look in that\fIdirectory\fRfirst for configuration files\&. If\fB\-f\fRis 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\fRis given, a\fIdirectory\fRmay not be specified\&..spThe\fB\-n\fRoption causes Shorewall to avoid updating the routing table(s)\&..spThe\fB\-p\fRoption causes the connection tracking table to be flushed; the\fBconntrack\fRutility must be installed to use this option\&..spThe\fB\-C\fRoption determines the compiler to use (Shorewall\-shell or Shorewall\-perl)\&. If not specified, the SHOREWALL_COMPILER setting in\m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[1]\d\s+2(5) determines the compiler to use\&..RE.PP\fBstop\fR.RS 4Stops the firewall\&. All existing connections, except those listed in\m[blue]\fBshorewall\-routestopped\fR\m[]\&\s-2\u[3]\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[3]\d\s+2(5) or by ADMINISABSENTMINDED\&..spThe\fB\-f\fRoption was added in Shorewall 4\&.0\&.3\&. If\fB\-f\fRis given, the command will be processed by the compiled script that executed the last successful\fBstart\fR,\fBrestart\fRor\fBrefresh\fRcommand if that script exists\&..RE.PP\fBstatus\fR.RS 4Produces a short report about the state of the Shorewall\-configured firewall\&..RE.PP\fBtry\fR.RS 4If Shorewall is started then the firewall state is saved to a temporary saved configuration (\FC/var/lib/shorewall/\&.try\F[])\&. Next, if Shorewall is currently started then a\fBrestart\fRcommand is issued; otherwise, a\fBstart\fRcommand is performed\&. if an error occurs during the compliation phase of the\fBrestart\fRor\fBstart\fR, the command terminates without changing the Shorewall state\&. If an error occurs during the\fBrestart\fRphase, then a\fBshorewall restore\fRis performed using the saved configuration\&. If an error occurs during the\fBstart\fRphase, then Shorewall is cleared\&. If the\fBstart\fR/\fBrestart\fRsucceeds and a\fItimeout\fRis specified then a\fBclear\fRor\fBrestore\fRis performed after\fItimeout\fRseconds\&..spThe\fB\-C\fRoption determines the compiler to use (Shorewall\-shell or Shorewall\-perl)\&. If not specified, the SHOREWALL_COMPILER setting in\m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[1]\d\s+2(5) determines the compiler to use\&..RE.PP\fBversion\fR.RS 4Displays Shorewall\'s version\&. If the\fB\-a\fRoption is included, the versions of Shorewall\-shell and/or Shorewall\-perl will also be displayed\&..RE.SH "FILES".PP/etc/shorewall/.SH "See ALSO".PP\m[blue]\fBhttp://www\&.shorewall\&.net/starting_and_stopping_shorewall\&.htm\fR\m[].PPshorewall\-accounting(5), shorewall\-actions(5), shorewall\-blacklist(5), shorewall\-hosts(5), shorewall\-interfaces(5), shorewall\-ipsec(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\-route_rules(5), shorewall\-routestopped(5), shorewall\-rules(5), shorewall\&.conf(5), shorewall\-tcclasses(5), shorewall\-tcdevices(5), shorewall\-tcrules(5), shorewall\-tos(5), shorewall\-tunnels(5), shorewall\-zones(5).SH "Notes".IP " 1." 4shorewall.conf.RS 4\%http://www.shorewall.net/manpages/shorewall.conf.html.RE.IP " 2." 4shorewall-interfaces.RS 4\%http://www.shorewall.net/manpages/shorewall-interfaces.html.RE.IP " 3." 4shorewall-routestopped.RS 4\%http://www.shorewall.net/manpages/shorewall-routestopped.html.RE
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -