📄 shorewall-hosts.5
字号:
.\" Title: shorewall-hosts.\" 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\-HOSTS" "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"hosts \- Shorewall file.SH "Synopsis".fam C.HP \w'\fB/etc/shorewall/hosts\fR\ 'u\fB/etc/shorewall/hosts\fR.fam.SH "Description".PPThis file is used to define zones in terms of subnets and/or individual IP addresses\&. Most simple setups don\'t need to (should not) place anything in this file\&..PPThe order of entries in this file is not significant in determining zone composition\&. Rather, the order that the zones are declared in\m[blue]\fBshorewall\-zones\fR\m[]\&\s-2\u[1]\d\s+2(5) determines the order in which the records in this file are interpreted\&..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.br.PPThe only time that you need this file is when you have more than one zone connected through a single interface\&..sp .5v.EM yellow.RE.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.br.PPIf you have an entry for a zone and interface in\m[blue]\fBshorewall\-interfaces\fR\m[]\&\s-2\u[2]\d\s+2(5) then do not include any entries in this file for that same (zone, interface) pair\&..sp .5v.EM yellow.RE.PPThe columns in the file are as follows\&..PP\fBZONE\fR \- \fIzone\-name\fR.RS 4The name of a zone declared in\m[blue]\fBshorewall\-zones\fR\m[]\&\s-2\u[1]\d\s+2(5)\&. You may not list the firewall zone in this column\&..RE.PP\fBHOST(S)\fR \- \fIinterface\fR:{[{\fIaddress\-or\-range\fR[\fB,\fR\fIaddress\-or\-range\fR]\&.\&.\&.|\fB+\fR\fIipset\fR}[\fIexclusion\fR].RS 4The name of an interface defined in the\m[blue]\fBshorewall\-interfaces\fR\m[]\&\s-2\u[2]\d\s+2(5) file followed by a colon (":") and a comma\-separated list whose elements are either:.sp.RS 4.ie n \{\\h'-04' 1.\h'+01'\c.\}.el \{\.sp -1.IP " 1." 4.2.\}The IP\fIaddress\fRof a host\&..RE.sp.RS 4.ie n \{\\h'-04' 2.\h'+01'\c.\}.el \{\.sp -1.IP " 2." 4.2.\}A network in CIDR format\&..RE.sp.RS 4.ie n \{\\h'-04' 3.\h'+01'\c.\}.el \{\.sp -1.IP " 3." 4.2.\}An IP address range of the form\fIlow\&.address\fR\-\fIhigh\&.address\fR\&. Your kernel and iptables must have iprange match support\&..RE.sp.RS 4.ie n \{\\h'-04' 4.\h'+01'\c.\}.el \{\.sp -1.IP " 4." 4.2.\}The name of an\fIipset\fR\&..RE.RS 4You may also exclude certain hosts through use of an\fIexclusion\fR(see\m[blue]\fBshorewall\-exclusion\fR\m[]\&\s-2\u[3]\d\s+2(5)\&..RE.PPOPTIONS (Optional) \- [\fIoption\fR[\fB,\fR\fIoption\fR]\&.\&.\&.].RS 4A comma\-separated list of options from the following list\&. The order in which you list the options is not significant but the list must have no embedded white space\&..PP\fBmaclist\fR.RS 4Connection requests from these hosts are compared against the contents of\m[blue]\fBshorewall\-maclist\fR\m[]\&\s-2\u[4]\d\s+2(5)\&. If this option is specified, the interface must be an ethernet NIC or equivalent and must be up before Shorewall is started\&..RE.PP\fBrouteback\fR.RS 4Shorewall should set up the infrastructure to pass packets from this/these address(es) back to themselves\&. This is necessary if hosts in this group use the services of a transparent proxy that is a member of the group or if DNAT is used to send requests originating from this group to a server in the group\&..RE.PP\fBblacklist\fR.RS 4This option only makes sense for ports on a bridge\&..spCheck packets arriving on this port against the\m[blue]\fBshorewall\-blacklist\fR\m[]\&\s-2\u[5]\d\s+2(5) file\&..RE.PP\fBtcpflags\fR.RS 4Packets arriving from these hosts are checked for certain illegal combinations of TCP flags\&. Packets found to have such a combination of flags are handled according to the setting of TCP_FLAGS_DISPOSITION after having been logged according to the setting of TCP_FLAGS_LOG_LEVEL\&..RE.PP\fBnosmurfs\fR.RS 4This option only makes sense for ports on a bridge\&..spFilter packets for smurfs (packets with a broadcast address as the source)\&..spSmurfs will be optionally logged based on the setting of SMURF_LOG_LEVEL in\m[blue]\fBshorewall\&.conf\fR\m[]\&\s-2\u[6]\d\s+2(5)\&. After logging, the packets are dropped\&..RE.PP\fBipsec\fR.RS 4The zone is accessed via a kernel 2\&.6 ipsec SA\&. Note that if the zone named in the ZONE column is specified as an IPSEC zone in the\m[blue]\fBshorewall\-zones\fR\m[]\&\s-2\u[1]\d\s+2(5) file then you do NOT need to specify the \'ipsec\' option here\&..RE.PPbroadcast.RS 4(Only supported by Shorewall\-perl)\&. Used when you want to include limited broadcasts (destination IP address 255\&.255\&.255\&.255) from the firewall to this zone\&. Only necessary when:.sp.RS 4.ie n \{\\h'-04' 1.\h'+01'\c.\}.el \{\.sp -1.IP " 1." 4.2.\}The network specified in the HOST(S) column does not include 255\&.255\&.255\&.255\&..RE.sp.RS 4.ie n \{\\h'-04' 2.\h'+01'\c.\}.el \{\.sp -1.IP " 2." 4.2.\}The zone does not have an entry for this interface in\m[blue]\fBshorewall\-interfaces\fR\m[]\&\s-2\u[2]\d\s+2(5)\&..RE.RE.PPdestonly.RS 4(Only supported by Shorewall\-perl)\&. Normally used with the Multi\-cast IP address range (224\&.0\&.0\&.0/4)\&. Specifies that traffic will be sent to the specified net(s) but that no traffic will be received from the net(s)\&..RE.RE.SH "Examples".PPExample 1.RS 4The firewall runs a PPTP server which creates a ppp interface for each remote client\&. The clients are assigned IP addresses in the network 192\&.168\&.3\&.0/24 and in a zone named \'vpn\'\&..sp.if n \{\.RS 4.\}.fam C.ps -1.nf.BB lightgray#ZONE HOST(S) OPTIONSvpn ppp+:192\&.168\&.3\&.0/24.EB lightgray.fi.fam.ps +1.if n \{\.RE.\}.spIf you are running a Shorewall version prior to 4\&.1\&.4, it is especially recommended to define such a zone using this file rather than\m[blue]\fBshorewall\-interfaces\fR\m[]\&\s-2\u[2]\d\s+2(8) if there is another zone that uses a fixed PPP interface (for example, if the \'net\' zone always interfaces through ppp0)\&. See\m[blue]\fBshorewall\-nesting\fR\m[]\&\s-2\u[7]\d\s+2(8) for additional information\&..RE.SH "FILES".PP/etc/shorewall/hosts.SH "See ALSO".PPshorewall(8), shorewall\-accounting(5), shorewall\-actions(5), shorewall\-blacklist(5), shorewall\-interfaces(5), shorewall\-ipsec(5), shorewall\-maclist(5), shorewall\-masq(5), shorewall\-nat(5), shorewall\-nesting(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-zones.RS 4\%http://www.shorewall.net/manpages/shorewall-zones.html.RE.IP " 2." 4shorewall-interfaces.RS 4\%http://www.shorewall.net/manpages/shorewall-interfaces.html.RE.IP " 3." 4shorewall-exclusion.RS 4\%http://www.shorewall.net/manpages/shorewall-exclusion.html.RE.IP " 4." 4shorewall-maclist.RS 4\%http://www.shorewall.net/manpages/shorewall-maclist.html.RE.IP " 5." 4shorewall-blacklist.RS 4\%http://www.shorewall.net/manpages/shorewall-blacklist.html.RE.IP " 6." 4shorewall.conf.RS 4\%http://www.shorewall.net/manpages/shorewall.conf.html.RE.IP " 7." 4shorewall-nesting.RS 4\%http://www.shorewall.net/manpages/shorewall-nesting.html.RE
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -