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

📄 screend.8

📁 <B>Digital的Unix操作系统VAX 4.2源码</B>
💻 8
字号:
.TH screend 8.SH Namescreend \- Internet (IP) gateway screening daemon.SH Syntax.B /usr/etc/screend[.B \-d] [.B \-c] [.B \-l] [.B \-f.I configfile] [.B \-L.I logfile] [.B \-s] [.B \-r].SH Description.NXR "screend server daemon".NXR "Internet gateway screening daemon"The.PN screenddaemon is used in conjunction with thegateway screen facility to decide which IP packets should be forwarded when the system is acting as an IP gateway.  Only the super-user may runthis program.  .PPBefore using .PN screendyou must add the following line to your system configuration file:.EXpseudo-device      gwscreen.EEAfter editing the system configuration file you must rebuildthe kernel, and reboot the system.  For information onrebuilding the kernel see the\fIGuide to Configuration File Maintenance\fPand the .MS doconfig 8reference page..PPWhen.PN screendis started, it reads the configuration file specified(\fIconfigfile\fR) and then processes packets according to theinstructions in that file..PPThe kernel screening facility must be enabled using.MS screenmode 8 before.PN screendhas any effect.(When screening is disabled, packets are forwarded by the kernelaccording to its usual procedures.).PPIt is possible to run more than one copy of.PN screendat a time, although it is not recommended.You might do this, however, when the configuration file is changed.Because theconfiguration file is read only at program startup, you must restart.PN screendwhen the file is changed.  To avoid any service interruption, youshould start a new instance of.PN screend before killing the old one..SH Options.IP \-d 5Prints large amounts of debugging information.  This is notmeant for normal use..IP \-cChecks the syntax of the configuration file but does not actuallyprocess any packets..IP \-lTurns on logging for all packets (normally, packets are logged onlyif requested in the configuration file)..IP "\-f \fIconfigfile\fP"Specifies the configuration file.  If not specified, the default,.PN /etc/screend.conf , is used..IP "\-L \fIlogfile\fP"Specifies that logging records should be appended to the given file.There is no default logging file.This may be specified simultaneously with .PN \-s , in which case each logging record is stored by both means..IP \-sSpecifies that logging records should be logged using.MS syslog 8 ..IP \-rSpecifies that logging records should include the rule numberof the configuration file rule responsible for the action logged.This is useful for debugging configuration file problems.See the section in this reference page on Rule Numbers..SH Configuration FileThis is an informal guide to the grammar of the.PN screendconfiguration file.  It is intended for readers whoare familiar with the basic concepts of the IP protocol family,including the distinction between the terms ``network'' and ``subnet.''.PPLexical structure:.RS.IP Comments Can either be C-style comments, delimited by/* and */or csh-style comments begun with a number sign (\&#) and terminated by the end of a line.  Comments do not nest..IP Case Significant in reserved words (all are lower-case).This is actually a benefit, because if a host name happensto conflict with a reserved word, you can use thehost name in upper-case..IP "Host names"Must begin with a letter but may containdigits, minus signs (\-), dots ( . ), and underscores (\&_ ).  The same is true of network,subnet, and netmask names.  Hosts can also be identified by their IP address, in dotted quad notation (for example, ``128.45.40.15'')..IP Numbers May be in decimal or in hex (0x0 notation).Octal notation is not allowed.  Decimal notation is the preferred method..IP "Protocol names" Specified as they are found in .PN /etc/protocols .These can also be given as numbers..IP "Port names" For TCP or UDP, specified as they are in.PN /etc/services .These can also be given as numbers (host byte order)..IP "ICMP type codes" Must be chosen from the following list, or given asnumbers:.IP.\"	###################################################.\" Documentation writer: PLEASE do not change this back to a "tbl".\" table, or it won't work with the online "man" command!.\"	###################################################.\".TS.ta +\w'addressmaskrequest  'u +\w'addressmaskreply  'uecho	echoreply	sourcequenchredirect	unreachable	timeexceededparameterproblem	timestamp	timestampreplyinformationrequest	informationreply	addressmaskrequest	addressmaskreply	.\".TE.IP "White space" All white space is the same (including newlines)..RE.PPGeneral syntax rules:.IP The configuration file consists of specifications terminated bysemicolons..IP There are three kinds of specifications:.RS.IP "default-action specification" There should only be one of these (the lastone is the one that counts); it specifies what action to takeif no action specification matches a packet..IP "subnet mask specifications" Specifies the subnet mask usedfor a given network..IP "action specifications" Specifies a class of packets andthe action to take when such a packet is received..RE.IPSpecifications can appear in any order, but the evaluationorder of action specifications is the order in whichthey appear in the file..PPIn BNF, this is:.EX 0\fI<configuration-file>\fR ::= \{ \fI<specification>\fR | \fI<configuration-file>\fR \fI<specification>\fR }\fI<specification>\fR ::= \{ \fI<default-action>\fR | \fI<subnet-spec>\fR | \fI<action-spec>\fR }.EE.PPThe syntax for a default-action specification is:.EX 0\fI<default-action>\fR ::= \\fBdefault\fR {\fBaccept\fR | \fBreject\fR} [\fBnotify\fR] [\fBlog\fR] \fB;\fR.EENote that.PN "default accept notify;" is not legal.If not specified, the default-action is .PN reject ..PPThe syntax for subnet mask specifications is:.EX 0\fI<subnet-spec>\fR ::= \\fBfor\fR \fI<network>\fR \fBnetmask is\fR \fI<maskval>\fR \fB;\fR.EEThe \fI<network>\fR is either a network name or a dotted-quad address,such as ``36.0.0.0''.  The number ``36'' is not a reasonable value.\fI<Maskval>\fR is either a name (treated as a hostname) or a dotted-quadaddress, such as ``255.255.255.0'' (bits are \fIon\fR for the networkand subnet fields.).PPThe syntax for action specifications is:.EX 0\fI<action-spec>\fR ::= \\fBfrom\fR \fI<object>\fR \fBto\fR \fI<object>\fR \{\fBaccept\fR | \fBreject\fR} [\fBnotify\fR] [\fBlog\fR] \fB;\fR.EESuch a specificationsays that packets flowing this way between this pair ofobjects(defined below) should either be accepted or rejected.  If .PN notifyis specified, when a packet is rejected an ICMP error message isreturned to the source.  If .PN log is specified, this packet and its disposition are logged..PPConceptually, for each packet the action specifications aresearched in the order they appear in the configuration file, untilone matches.  The specified action is then performed.  If no specificationmatches, the default action is performed..PPTo simplify the configuration file, the following syntax may be used to indicate that the same action should be performedon packets flowing in either direction between the specified pairof objects:.EX 0\fI<action-spec>\fR ::= \\fBbetween\fR \fI<object>\fR \fBand\fR \fI<object>\fR \{\fBaccept\fR | \fBreject\fR} [\fBnotify\fR] [\fBlog\fR] \fB;\fR.EENote that this has the same effect as specifying the two unidirectional rules, with theforward direction listed first..PPAn object is a specification of the source or destinationof a packet.The syntax for object specifications is somewhat complex, since certain fields are optional:.EX 0\fI<object>\fR ::= \{ \fI<address-spec>\fR | \fI<port-spec>\fR | \\fI<address-spec>\fR \fI<port-spec>\fR }.EEIf the \fI<address-spec>\fR is not given, any host will match.If the \fI<port-spec>\fR is not given, any protocol and port will match..EX 0\fI<address-spec>\fR ::= \{ \fI<net-spec>\fR | \fI<subnet-spec>\fR | \fI<host-spec>\fR | \fBany\fR }\fI<net-spec>\fR ::= \{ \fBnet\fR \fI<name-or-addr>\fR | \fBnet\-not\fR \fI<name-or-addr>\fR }\fI<subnet-spec>\fR ::= \{ \fBsubnet\fR \fI<name-or-addr>\fR | \fBsubnet\-not\fR \fI<name-or-addr>\fR }\fI<host-spec>\fR ::= \{ \fBhost\fR \fI<name-or-addr>\fR | \fBhost\-not\fR \fI<name-or-addr>\fR }.EEThe .PN \-not convention means that the object specification matchesif the specified field does.I nothave the specifiedvalue.  In the following example, packets not fromnic.ddn.mil are dropped..EXfrom host\-not nic.ddn.mil to host any reject;.EEThe ``subnet'' and ``subnet\-not''forms match against theentire address under the subnet mask (for example, if thenetmask for net 36 is ``255.255.0.0'', then ``subnet36.8.0.0'' matches a packet address of 36.8.0.1)..PP.EX 0		\fI<name-or-addr>\fR ::= \{ \fI<name>\fR | \fI<dotted-quad>\fR | \fBany\fR }\fI<port-spec>\fR ::= { \fBproto\fR \fI<proto-name-or-number>\fR.RS | \fBicmp type\fR \fI<type-name-or-number>\fR \| \fBicmp type\-not\fR \fI<type-name-or-number>\fR| \fBtcp port\fR \fI<port-name-or-number>\fR \| \fBtcp port\-not\fR \fI<port-name-or-number>\fR| \fBudp port\fR \fI<port-name-or-number>\fR \| \fBudp port\-not\fR \fI<port-name-or-number>\fR }.RE\fI<proto-name-or-number>\fR ::= { \fI<name>\fR | \fI<number>\fR }\fI<type-name-or-number>\fR ::= \{ \fI<name>\fR | \fI<number>\fR | \fBany\fR |  \fBinfotype\fR }\fI<port-name-or-number>\fR ::= \{ \fI<name>\fR | \fI<number>\fR | \fBany\fR | \fBreserved\fR  | \fBxserver\fR }.EE``Reserved'' ports are those reserved by 4.2BSD Unix forprivileged processes.``Xserver'' ports are those used by X11 window system servers.``Infotype'' ICMP packets are those that arepurely informational: echo, timestamp, information, and addressmaskrequests, and the corresponding replies..SH RestrictionsIP gateways are allowed tofragment IP datagrams if they are too large to be forwarded in one piece.Only the first fragment of a datagram carries enough informationto make certain kinds of accept/reject decisions.The .PN screenddaemon can only handle fragments if it sees the first fragment of adatagram before it sees any subsequent fragments.Also, only a limited rate of fragmented packet arrival can beaccommodated by the program (fragmentation is, in general, a bad idea).Finally, if more than one instance of.PN screendis running, most likely this will result in significant loss offragments..PPThe current implementation does not forward packets that containIP header options.  This is because several of these options canbe used to subvert checks based on the IP header destination address..PPIf a host .I name given in an object specification has more thanone IP address associated with it,.PN screenddoes not understand that all these addresses should be checked.Only the first (primary) address of the host is used.  This maylead to erroneous operation in some cases (possibly including asecurity hole), so a warning is printed if the configuration filecontains such names.  (Note that you probably will not see this warningif.PN screendis only started in .PN /etc/rc .).SH ExamplesThis following is an example of the syntax; it is not intended tobe used in an actual installation:.EX# Example configuration filedefault reject;for 36.0.0.0 netmask is 255.255.0.0;from subnet 36.8.0.0 to net milnet reject notify;from host nic.ddn.mil to host any accept;from host any to net arpanet tcp port telnet accept;from host any to host any icmp type redirect reject log;from host any to subnet 36.10.0.0 tcp port-not reserved reject;.EE.SH Rule NumbersIf the .PN \-r option is given, log records contain a notationof the rule number responsible for the action being logged.A rule is a ``from ... to ...'' specificationin the configuration file; rules are numbered in order starting withzero.Note that ``between ... and ...'' specifications expand to two``from ... to ... '' rules, each numbered individually.The default action, whether explicitly stated or not, isnot numbered; it is referred to distinctively in the log..SH DiagnosticsDuring argument processing and configuration file parsing,various diagnostics may be issued.  During normal operation,only serious internal inconsistencies result in diagnostics.(See the Restrictions section about warning messages in someborderline cases.)Except in debug mode (.PN \-d ), most diagnostics are logged using.MS syslog 8 ..PPOnce an hour, a statistics report is made using.MS syslog 8that shows the number of packets processed since the program wasstarted, the hit rate of an internal cache buffer, and the numberof packets dropped because they arrived too rapidly..SH Files.TP 25.PN /etc/screend.conf       default configuration file.SH See Alsoscreen(2), screenmode(8), screenstat(8)

⌨️ 快捷键说明

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