⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 shorewall.conf.5

📁 sharewall is very good
💻 5
📖 第 1 页 / 共 4 页
字号:
.\"     Title: shorewall.conf.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author].\" Generator: DocBook XSL Stylesheets v1.74.0 <http://docbook.sf.net/>.\"      Date: 03/19/2009.\"    Manual: [FIXME: manual].\"    Source: [FIXME: source].\"  Language: English.\".TH "SHOREWALL\&.CONF" "5" "03/19/2009" "[FIXME: source]" "[FIXME: manual]".\" -----------------------------------------------------------------.\" * (re)Define some macros.\" -----------------------------------------------------------------.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.\" toupper - uppercase a string (locale-aware).\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.de toupper.tr aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ\\$*.tr aabbccddeeffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz...\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.\" SH-xref - format a cross-reference to an SH section.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.de SH-xref.ie n \{\.\}.toupper \\$*.el \{\\\$*.\}...\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.\" SH - level-one heading that works better for non-TTY output.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.de1 SH.\" put an extra blank line of space above the head in non-TTY output.if t \{\.sp 1.\}.sp \\n[PD]u.nr an-level 1.set-an-margin.nr an-prevailing-indent \\n[IN].fi.in \\n[an-margin]u.ti 0.HTML-TAG ".NH \\n[an-level]".it 1 an-trap.nr an-no-space-flag 1.nr an-break-flag 1\." make the size of the head bigger.ps +3.ft B.ne (2v + 1u).ie n \{\.\" if n (TTY output), use uppercase.toupper \\$*.\}.el \{\.nr an-break-flag 0.\" if not n (not TTY), use normal case (not uppercase)\\$1.in \\n[an-margin]u.ti 0.\" if not n (not TTY), put a border/line under subheading.sp -.6\l'\n(.lu'.\}...\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.\" SS - level-two heading that works better for non-TTY output.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.de1 SS.sp \\n[PD]u.nr an-level 1.set-an-margin.nr an-prevailing-indent \\n[IN].fi.in \\n[IN]u.ti \\n[SN]u.it 1 an-trap.nr an-no-space-flag 1.nr an-break-flag 1.ps \\n[PS-SS]u\." make the size of the head bigger.ps +2.ft B.ne (2v + 1u).if \\n[.$] \&\\$*...\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.\" BB/BE - put background/screen (filled box) around block of text.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.de BB.if t \{\.sp -.5.br.in +2n.ll -2n.gcolor red.di BX.\}...de EB.if t \{\.if "\\$2"adjust-for-leading-newline" \{\.sp -1.\}.br.di.in.ll.gcolor.nr BW \\n(.lu-\\n(.i.nr BH \\n(dn+.5v.ne \\n(BHu+.5v.ie "\\$2"adjust-for-leading-newline" \{\\M[\\$1]\h'1n'\v'+.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[].\}.el \{\\M[\\$1]\h'1n'\v'-.5v'\D'P \\n(BWu 0 0 \\n(BHu -\\n(BWu 0 0 -\\n(BHu'\M[].\}.in 0.sp -.5v.nf.BX.in.sp .5v.fi.\}...\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.\" BM/EM - put colored marker in margin next to block of text.\" ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~.de BM.if t \{\.br.ll -2n.gcolor red.di BX.\}...de EM.if t \{\.br.di.ll.gcolor.nr BH \\n(dn.ne \\n(BHu\M[\\$1]\D'P -.75n 0 0 \\n(BHu -(\\n[.i]u - \\n(INu - .75n) 0 0 -\\n(BHu'\M[].in 0.nf.BX.in.fi.\}...\" -----------------------------------------------------------------.\" * set default formatting.\" -----------------------------------------------------------------.\" disable hyphenation.nh.\" disable justification (adjust text to left margin only).ad l.\" -----------------------------------------------------------------.\" * MAIN CONTENT STARTS HERE *.\" -----------------------------------------------------------------.SH "Name"shorewall.conf \- Shorewall global configuration file.SH "Synopsis".fam C.HP \w'\fB/etc/shorewall/shorewall\&.conf\fR\ 'u\fB/etc/shorewall/shorewall\&.conf\fR.fam.SH "Description".PPThis file sets options that apply to Shorewall as a whole\&..PPThe file consists of Shell comments (lines beginning with \'#\'), blank lines and assignment statements (\fIvariable\fR=\fIvalue\fR)\&..SH "OPTIONS".PPMany options have as their value a\fIlog\-level\fR\&. Log levels are a method of describing to syslog (8) the importance of a message and a number of parameters in this file have log levels as their value\&..PPThese levels are defined by syslog and are used to determine the destination of the messages through entries in /etc/syslog\&.conf (5)\&. The syslog documentation refers to these as "priorities"; Netfilter calls them "levels" and Shorewall also uses that term\&..PPValid levels are:.sp.if n \{\.RS 4.\}.fam C.ps -1.nf.BB lightgray       7       debug       6       info       5       notice       4       warning       3       err       2       crit       1       alert       0       emerg.EB lightgray.fi.fam.ps +1.if n \{\.RE.\}.PPFor most Shorewall logging, a level of 6 (info) is appropriate\&. Shorewall log messages are generated by NetFilter and are logged using facility \'kern\' and the level that you specifify\&. If you are unsure of the level to choose, 6 (info) is a safe bet\&. You may specify levels by name or by number\&..PPIf you have built your kernel with ULOG and/or NFLOG target support, you may also specify a log level of ULOG and/or NFLOG (must be all caps)\&. Rather than log its messages to syslogd, Shorewall will direct netfilter to log the messages via the ULOG or NFLOG target which will send them to a process called \'ulogd\'\&. ulogd is available with most Linux distributions (although it probably isn\'t installed by default)\&. Ulogd is also available from\m[blue]\fBhttp://www\&.netfilter\&.org/projects/ulogd/index\&.html\fR\m[]and can be configured to log all Shorewall message to their own log file.PPThe following options may be set in shorewall\&.conf\&..PP\fBACCEPT_DEFAULT=\fR{\fIaction\fR|\fImacro\fR|\fBnone\fR}.RS 4.RE.PP\fBDROP_DEFAULT=\fR{\fIaction\fR|\fImacro\fR|\fBnone\fR}.RS 4.RE.PP\fBREJECT_DEFAULT=\fR{\fIaction\fR|\fImacro\fR|\fBnone\fR}.RS 4.RE.PP\fBQUEUE_DEFAULT=\fR{\fIaction\fR|\fImacro\fR|\fBnone\fR}.RS 4.RE.PP\fBNFQUEUE_DEFAULT=\fR{\fIaction\fR|\fImacro\fR|\fBnone\fR} (Shorewall\-perl 4\&.0\&.3 and later).RS 4In earlier Shorewall versions, a "default action" for DROP and REJECT policies was specified in the file /usr/share/shorewall/actions\&.std\&..spTo allow for default rules to be applied when USE_ACTIONS=No, the DROP_DEFAULT, REJECT_DEFAULT, ACCEPT_DEFAULT, QUEUE_DEFAULT and NFQUEUE_DEFAULT options have been added\&..spDROP_DEFAULT describes the rules to be applied before a connection request is dropped by a DROP policy; REJECT_DEFAULT describes the rules to be applied if a connection request is rejected by a REJECT policy\&. The other three are similar for ACCEPT, QUEUE and NFQUEUE policies\&..spThe value applied to these may be:.RS 4a) The name of an            \fIaction\fR\&..RE.RS 4b) The name of a \fImacro\fR            (Shorewall\-shell only).RE.RS 4c) \fBNone\fR or \fBnone\fR.REThe default values are:.RS 4DROP_DEFAULT="Drop".RE.RS 4REJECT_DEFAULT="Reject".RE.RS 4ACCEPT_DEFAULT="none".RE.RS 4QUEUE_DEFAULT="none".RE.RS 4NFQUEUE_DEFAULT="None".REIf USE_ACTIONS=Yes, then these values refer to action\&.Drop and action\&.Reject respectively\&. If USE_ACTIONS=No, then these values refer to macro\&.Drop and macro\&.Reject\&..spIf you set the value of either option to "None" then no default action will be used and the default action or macro must be specified in\m[blue]\fBshorewall\-policy\fR\m[]\&\s-2\u[1]\d\s+2(5)\&..RE.PP\fBADD_IP_ALIASES=\fR[\fBYes\fR|\fBNo\fR].RS 4This parameter determines whether Shorewall automatically adds the external address(es) in\m[blue]\fBshorewall\-nat\fR\m[]\&\s-2\u[2]\d\s+2(5)\&. If the variable is set to\fBYes\fRor\fByes\fRthen Shorewall automatically adds these aliases\&. If it is set to\fBNo\fRor\fBno\fR, you must add these aliases yourself using your distribution\'s network configuration tools\&..spIf this variable is not set or is given an empty value (ADD_IP_ALIASES="") then ADD_IP_ALIASES=Yes is assumed\&..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.brAddresses added by ADD_IP_ALIASES=Yes are deleted and re\-added during shorewall restart\&. As a consequence, connections using those addresses may be severed\&..sp .5v.EM yellow.RE.RE.PP\fBADD_SNAT_ALIASES=\fR[\fBYes\fR|\fBNo\fR].RS 4This parameter determines whether Shorewall automatically adds the SNAT ADDRESS in\m[blue]\fBshorewall\-masq\fR\m[]\&\s-2\u[3]\d\s+2(5)\&. If the variable is set to\fBYes\fRor\fByes\fRthen Shorewall automatically adds these addresses\&. If it is set to\fBNo\fRor\fBno\fR, you must add these addresses yourself using your distribution\'s network configuration tools\&..spIf this variable is not set or is given an empty value (ADD_SNAT_ALIASES="") then ADD_SNAT_ALIASES=No is assumed\&..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.brAddresses added by ADD_SNAT_ALIASES=Yes are deleted and re\-added during shorewall restart\&. As a consequence, connections using those addresses may be severed\&..sp .5v.EM yellow.RE.RE.PP\fBADMINISABSENTMINDED=\fR[\fBYes\fR|\fBNo\fR].RS 4The value of this variable affects Shorewall\'s stopped state\&. When ADMINISABSENTMINDED=No, only traffic to/from those addresses listed in\m[blue]\fBshorewall\-routestopped\fR\m[]\&\s-2\u[4]\d\s+2(5) is accepted when Shorewall is stopped\&. When ADMINISABSENTMINDED=Yes, in addition to traffic to/from addresses in\m[blue]\fBshorewall\-routestopped\fR\m[]\&\s-2\u[4]\d\s+2(5), connections that were active when Shorewall stopped continue to work and all new connections from the firewall system itself are allowed\&. If this variable is not set or is given the empty value then ADMINISABSENTMINDED=No is assumed\&..RE.PP\fBAUTO_COMMENT=\fR[\fBYes\fR|\fBNo\fR].RS 4Added in Shorewall\-perl 4\&.1\&.5\&. If set, if there is not a current comment when a macro is invoked, the behavior is as if the first line of the macro file was "COMMENT <macro name>"\&. The AUTO_COMMENT option has a default value of \'Yes\'\&..RE.PP\fBBIGDPORTLISTS=\fR[\fBYes\fR|\fBNo\fR].RS 4Setting this option to \'Yes\' allows you to include arbitrarily long destination port lists in all configuration files\&..RE.PP\fBBLACKLIST_DISPOSITION=\fR[\fBDROP\fR|\fBREJECT\fR].RS 4This parameter determines the disposition of packets from blacklisted hosts\&. It may have the value DROP if the packets are to be dropped or REJECT if the packets are to be replied with an ICMP port unreachable reply or a TCP RST (tcp only)\&. If you do not assign a value or if you assign an empty value then DROP is assumed\&..RE.PP\fBBLACKLIST_LOGLEVEL=\fR[\fIlog\-level\fR].RS 4This parameter determines if packets from blacklisted hosts are logged and it determines the syslog level that they are to be logged at\&. Its value is a syslog level (Example: BLACKLIST_LOGLEVEL=debug)\&. If you do not assign a value or if you assign an empty value then packets from blacklisted hosts are not logged\&..RE.PP\fBBLACKLISTNEWONLY=\fR{\fBYes\fR|\fBNo\fR}.RS 4When set to\fBYes\fRor\fByes\fR, blacklists are only consulted for new connections\&. When set to\fBNo\fRor\fBno\fR, blacklists are consulted for every packet (will slow down your firewall noticably if you have large blacklists)\&. If the BLACKLISTNEWONLY option is not set or is set to the empty value then BLACKLISTNEWONLY=No is assumed\&..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\fBNote\fR.ps -1.brBLACKLISTNEWONLY=No is incompatible with FASTACCEPT=Yes\&..sp .5v.EM yellow.RE.RE.PP

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -