📄 tcpd.8
字号:
.TH TCPD 8.SH NAMEtcpd \- access control facility for internet services.SH DESCRIPTION.PPThe \fItcpd\fR program can be set up to monitor incoming requests for\fItelnet\fR, \fIfinger\fR, \fIftp\fR, \fIexec\fR, \fIrsh\fR,\fIrlogin\fR, \fItftp\fR, \fItalk\fR, \fIcomsat\fR and other servicesthat have a one-to-one mapping onto executable files..PPThe program supports both 4.3BSD-style sockets and System V.4-styleTLI. Functionality may be limited when the protocol underneath TLI isnot an internet protocol..PPOperation is as follows: whenever a request for service arrives, the\fIinetd\fP daemon is tricked into running the \fItcpd\fP programinstead of the desired server. \fItcpd\fP logs the request and doessome additional checks. When all is well, \fItcpd\fP runs theappropriate server program and goes away..PPOptional features are: pattern-based access control, client usernamelookups with the RFC 931 etc. protocol, protection against hosts thatpretend to have someone elses host name, and protection against hoststhat pretend to have someone elses network address..SH LOGGINGConnections that are monitored by.I tcpdare reported through the \fIsyslog\fR(3) facility. Each record containsa time stamp, the client host name and the name of the requestedservice. The information can be useful to detect unwanted activities,especially when logfile information from several hosts is merged..PPIn order to find out where your logs are going, examine the syslogconfiguration file, usually /etc/syslog.conf..SH ACCESS CONTROLOptionally,.I tcpdsupports a simple form of access control that is based on patternmatching. The access-control software provides hooks for the executionof shell commands when a pattern fires. For details, see the\fIhosts_access\fR(5) manual page..SH HOST NAME VERIFICATIONThe authentication scheme of some protocols (\fIrlogin, rsh\fR) relieson host names. Some implementations believe the host name that they getfrom any random name server; other implementations are more careful butuse a flawed algorithm..PP.I tcpdverifies the client host name that is returned by the address->name DNSserver by looking at the host name and address that are returned by thename->address DNS server. If any discrepancy is detected,.I tcpdconcludes that it is dealing with a host that pretends to have someoneelses host name..PPIf the sources are compiled with -DPARANOID,.I tcpdwill drop the connection in case of a host name/address mismatch.Otherwise, the hostname can be matched with the \fIPARANOID\fR wildcard,after which suitable action can be taken..SH HOST ADDRESS SPOOFINGOptionally,.I tcpddisables source-routing socket options on every connection that itdeals with. This will take care of most attacks from hosts that pretendto have an address that belongs to someone elses network. UDP servicesdo not benefit from this protection. This feature must be turned onat compile time..SH RFC 931When RFC 931 etc. lookups are enabled (compile-time option) \fItcpd\fRwill attempt to establish the name of the client user. This willsucceed only if the client host runs an RFC 931-compliant daemon.Client user name lookups will not work for datagram-orientedconnections, and may cause noticeable delays in the case of connectionsfrom PCs..SH EXAMPLESThe details of using \fItcpd\fR depend on pathname information that wascompiled into the program..SH EXAMPLE 1This example applies when \fItcpd\fR expects that the original networkdaemons will be moved to an "other" place..PPIn order to monitor access to the \fIfinger\fR service, move theoriginal finger daemon to the "other" place and install tcpd in theplace of the original finger daemon. No changes are required toconfiguration files..nf.sp.in +5# mkdir /other/place# mv /usr/etc/in.fingerd /other/place# cp tcpd /usr/etc/in.fingerd.fi.PPThe example assumes that the network daemons live in /usr/etc. On somesystems, network daemons live in /usr/sbin or in /usr/libexec, or haveno `in.\' prefix to their name..SH EXAMPLE 2This example applies when \fItcpd\fR expects that the network daemonsare left in their original place..PPIn order to monitor access to the \fIfinger\fR service, perform thefollowing edits on the \fIinetd\fR configuration file (usually \fI/etc/inetd.conf\fR or \fI/etc/inet/inetd.conf\fR):.nf.sp.ti +5finger stream tcp nowait nobody /usr/etc/in.fingerd in.fingerd.spbecomes:.sp.ti +5finger stream tcp nowait nobody /some/where/tcpd in.fingerd.sp.fi.PPThe example assumes that the network daemons live in /usr/etc. On somesystems, network daemons live in /usr/sbin or in /usr/libexec, thedaemons have no `in.\' prefix to their name, or there is no useridfield in the inetd configuration file..PPSimilar changes will be needed for the other services that are to becovered by \fItcpd\fR. Send a `kill -HUP\' to the \fIinetd\fR(8)process to make the changes effective. AIX users may also have toexecute the `inetimp\' command..SH EXAMPLE 3In the case of daemons that do not live in a common directory ("secret"or otherwise), edit the \fIinetd\fR configuration file so that itspecifies an absolute path name for the process name field. For example:.nf.sp ntalk dgram udp wait root /some/where/tcpd /usr/local/lib/ntalkd.sp.fi.PPOnly the last component (ntalkd) of the pathname will be used foraccess control and logging..SH BUGSSome UDP (and RPC) daemons linger around for a while after they havefinished their work, in case another request comes in. In the inetdconfiguration file these services are registered with the \fIwait\fRoption. Only the request that started such a daemon will be logged..PPThe program does not work with RPC services over TCP. These servicesare registered as \fIrpc/tcp\fR in the inetd configuration file. Theonly non-trivial service that is affected by this limitation is\fIrexd\fR, which is used by the \fIon(1)\fR command. This is no greatloss. On most systems, \fIrexd\fR is less secure than a wildcard in/etc/hosts.equiv..PPRPC broadcast requests (for example: \fIrwall, rup, rusers\fR) alwaysappear to come from the responding host. What happens is that theclient broadcasts the request to all \fIportmap\fR daemons on itsnetwork; each \fIportmap\fR daemon forwards the request to a localdaemon. As far as the \fIrwall\fR etc. daemons know, the request comesfrom the local host..SH FILES.PPThe default locations of the host access control tables are:.PP/etc/hosts.allow.br/etc/hosts.deny.SH SEE ALSO.na.nfhosts_access(5), format of the tcpd access control tables.syslog.conf(5), format of the syslogd control file.inetd.conf(5), format of the inetd control file..SH AUTHORS.na.nfWietse Venema (wietse@wzv.win.tue.nl),Department of Mathematics and Computing Science,Eindhoven University of TechnologyDen Dolech 2, P.O. Box 513, 5600 MB Eindhoven, The Netherlands\" @(#) tcpd.8 1.5 96/02/21 16:39:16
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -