186d7f5d3SJohn Marino@(#) README 1.30 97/03/21 19:27:21 286d7f5d3SJohn Marino 386d7f5d3SJohn MarinoThis is the 7.6 version of the TCP/IP daemon wrapper package. 486d7f5d3SJohn Marino 586d7f5d3SJohn MarinoThank you for using this program. If you like it, send me a postcard. 686d7f5d3SJohn MarinoMy postal address is at the bottom of this file. 786d7f5d3SJohn Marino 886d7f5d3SJohn MarinoRead the BLURB file for a brief summary of what is new. The CHANGES 986d7f5d3SJohn Marinofile gives a complete account of differences with respect to previous 1086d7f5d3SJohn Marinoreleases. 1186d7f5d3SJohn Marino 1286d7f5d3SJohn MarinoAnnouncements of new releases of this software are posted to Usenet 1386d7f5d3SJohn Marino(comp.security.unix, comp.unix.admin), to the cert-tools mailing list, 1486d7f5d3SJohn Marinoand to a dedicated mailing list. You can subscribe to the dedicated 1586d7f5d3SJohn Marinomailing list by sending an email message to majordomo@wzv.win.tue.nl 1686d7f5d3SJohn Marinowith in the body (not subject): subscribe tcp-wrappers-announce. 1786d7f5d3SJohn Marino 1886d7f5d3SJohn MarinoTable of contents 1986d7f5d3SJohn Marino----------------- 2086d7f5d3SJohn Marino 2186d7f5d3SJohn Marino 1 - Introduction 2286d7f5d3SJohn Marino 2 - Disclaimer 2386d7f5d3SJohn Marino 3 - Tutorials 2486d7f5d3SJohn Marino 3.1 - How it works 2586d7f5d3SJohn Marino 3.2 - Where the logging information goes 2686d7f5d3SJohn Marino 4 - Features 2786d7f5d3SJohn Marino 4.1 - Access control 2886d7f5d3SJohn Marino 4.2 - Host name spoofing 2986d7f5d3SJohn Marino 4.3 - Host address spoofing 3086d7f5d3SJohn Marino 4.4 - Client username lookups 3186d7f5d3SJohn Marino 4.5 - Language extensions 3286d7f5d3SJohn Marino 4.6 - Multiple ftp/gopher/www archives on one host 3386d7f5d3SJohn Marino 4.7 - Banner messages 3486d7f5d3SJohn Marino 4.8 - Sequence number guessing 3586d7f5d3SJohn Marino 5 - Other works 3686d7f5d3SJohn Marino 5.1 - Related documents 3786d7f5d3SJohn Marino 5.2 - Related software 3886d7f5d3SJohn Marino 6 - Limitations 3986d7f5d3SJohn Marino 6.1 - Known wrapper limitations 4086d7f5d3SJohn Marino 6.2 - Known system software bugs 4186d7f5d3SJohn Marino 7 - Configuration and installation 4286d7f5d3SJohn Marino 7.1 - Easy configuration and installation 4386d7f5d3SJohn Marino 7.2 - Advanced configuration and installation 4486d7f5d3SJohn Marino 7.3 - Daemons with arbitrary path names 4586d7f5d3SJohn Marino 7.4 - Building and testing the access control rules 4686d7f5d3SJohn Marino 7.5 - Other applications 4786d7f5d3SJohn Marino 8 - Acknowledgements 4886d7f5d3SJohn Marino 4986d7f5d3SJohn Marino1 - Introduction 5086d7f5d3SJohn Marino---------------- 5186d7f5d3SJohn Marino 5286d7f5d3SJohn MarinoWith this package you can monitor and filter incoming requests for the 5386d7f5d3SJohn MarinoSYSTAT, FINGER, FTP, TELNET, RLOGIN, RSH, EXEC, TFTP, TALK, and other 5486d7f5d3SJohn Marinonetwork services. 5586d7f5d3SJohn Marino 5686d7f5d3SJohn MarinoIt supports both 4.3BSD-style sockets and System V.4-style TLI. Praise 5786d7f5d3SJohn Marinoyourself lucky if you don't know what that means. 5886d7f5d3SJohn Marino 5986d7f5d3SJohn MarinoThe package provides tiny daemon wrapper programs that can be installed 6086d7f5d3SJohn Marinowithout any changes to existing software or to existing configuration 6186d7f5d3SJohn Marinofiles. The wrappers report the name of the client host and of the 6286d7f5d3SJohn Marinorequested service; the wrappers do not exchange information with the 6386d7f5d3SJohn Marinoclient or server applications, and impose no overhead on the actual 6486d7f5d3SJohn Marinoconversation between the client and server applications. 6586d7f5d3SJohn Marino 6686d7f5d3SJohn MarinoOptional features are: access control to restrict what systems can 6786d7f5d3SJohn Marinoconnect to what network daemons; client user name lookups with the RFC 6886d7f5d3SJohn Marino931 etc. protocol; additional protection against hosts that pretend to 6986d7f5d3SJohn Marinohave someone elses host name; additional protection against hosts that 7086d7f5d3SJohn Marinopretend to have someone elses host address. 7186d7f5d3SJohn Marino 7286d7f5d3SJohn MarinoThe programs are very portable. Build procedures are provided for many 7386d7f5d3SJohn Marinocommon (and not so common) environments, and guidelines are provided in 7486d7f5d3SJohn Marinocase your environment is not among them. 7586d7f5d3SJohn Marino 7686d7f5d3SJohn MarinoRequirements are that network daemons are spawned by a super server 7786d7f5d3SJohn Marinosuch as the inetd; a 4.3BSD-style socket programming interface and/or 7886d7f5d3SJohn MarinoSystem V.4-style TLI programming interface; and the availability of a 7986d7f5d3SJohn Marinosyslog(3) library and of a syslogd(8) daemon. The wrappers should run 8086d7f5d3SJohn Marinowithout modification on any system that satisfies these requirements. 8186d7f5d3SJohn MarinoWorkarounds have been implemented for several common bugs in systems 8286d7f5d3SJohn Marinosoftware. 8386d7f5d3SJohn Marino 8486d7f5d3SJohn MarinoWhat to do if this is your first encounter with the wrapper programs: 8586d7f5d3SJohn Marino1) read the tutorial sections for an introduction to the relevant 8686d7f5d3SJohn Marinoconcepts and terminology; 2) glance over the security feature sections 8786d7f5d3SJohn Marinoin this document; 3) follow the installation instructions (easy or 8886d7f5d3SJohn Marinoadvanced). I recommend that you first use the default security feature 8986d7f5d3SJohn Marinosettings. Run the wrappers for a few days to become familiar with 9086d7f5d3SJohn Marinotheir logs, before doing anything drastic such as cutting off access or 9186d7f5d3SJohn Marinoinstalling booby traps. 9286d7f5d3SJohn Marino 9386d7f5d3SJohn Marino2 - Disclaimer 9486d7f5d3SJohn Marino-------------- 9586d7f5d3SJohn Marino 9686d7f5d3SJohn MarinoThe wrapper programs rely on source address information obtained from 9786d7f5d3SJohn Marinonetwork packets. This information is provided by the client host. It is 9886d7f5d3SJohn Marinonot 100 percent reliable, although the wrappers do their best to expose 9986d7f5d3SJohn Marinoforgeries. 10086d7f5d3SJohn Marino 10186d7f5d3SJohn MarinoIn the absence of cryptographic protection of message contents, and of 10286d7f5d3SJohn Marinocryptographic authentication of message originators, all data from the 10386d7f5d3SJohn Marinonetwork should be treated with sound scepticism. 10486d7f5d3SJohn Marino 10586d7f5d3SJohn MarinoTHIS RESTRICTION IS BY NO MEANS SPECIFIC TO THE TCP/IP PROTOCOLS. 10686d7f5d3SJohn Marino 10786d7f5d3SJohn Marino3 - Tutorials 10886d7f5d3SJohn Marino------------- 10986d7f5d3SJohn Marino 11086d7f5d3SJohn MarinoThe tutorial sections give a gentle introduction to the operation of 11186d7f5d3SJohn Marinothe wrapper programs, and introduce some of the terminology that is 11286d7f5d3SJohn Marinoused in the remainder of the document: client, server, the inetd and 11386d7f5d3SJohn Marinosyslogd daemons, and their configuration files. 11486d7f5d3SJohn Marino 11586d7f5d3SJohn Marino3.1 - How it works 11686d7f5d3SJohn Marino------------------ 11786d7f5d3SJohn Marino 11886d7f5d3SJohn MarinoAlmost every application of the TCP/IP protocols is based on a client- 11986d7f5d3SJohn Marinoserver model. For example, when a user invokes the telnet command to 12086d7f5d3SJohn Marinoconnect to one of your systems, a telnet server process is executed on 12186d7f5d3SJohn Marinothe target host. The telnet server process connects the user to a login 12286d7f5d3SJohn Marinoprocess. A few examples of client and server programs are shown in the 12386d7f5d3SJohn Marinotable below: 12486d7f5d3SJohn Marino 12586d7f5d3SJohn Marino client server application 12686d7f5d3SJohn Marino -------------------------------- 12786d7f5d3SJohn Marino telnet telnetd remote login 12886d7f5d3SJohn Marino ftp ftpd file transfer 12986d7f5d3SJohn Marino finger fingerd show users 13086d7f5d3SJohn Marino 13186d7f5d3SJohn MarinoThe usual approach is to run one single daemon process that waits for 13286d7f5d3SJohn Marinoall kinds of incoming network connections. Whenever a connection is 13386d7f5d3SJohn Marinoestablished, this daemon (usually called inetd) runs the appropriate 13486d7f5d3SJohn Marinoserver program and goes back to sleep, waiting for other connections. 13586d7f5d3SJohn Marino 13686d7f5d3SJohn MarinoThe wrapper programs rely on a simple, but powerful mechanism. Instead 13786d7f5d3SJohn Marinoof directly running the desired server program, the inetd is tricked 13886d7f5d3SJohn Marinointo running a small wrapper program. The wrapper logs the client host 13986d7f5d3SJohn Marinoname or address and performs some additional checks. When all is well, 14086d7f5d3SJohn Marinothe wrapper executes the desired server program and goes away. 14186d7f5d3SJohn Marino 14286d7f5d3SJohn MarinoThe wrapper programs have no interaction with the client user (or with 14386d7f5d3SJohn Marinothe client process). Nor do the wrappers interact with the server 14486d7f5d3SJohn Marinoapplication. This has two major advantages: 1) the wrappers are 14586d7f5d3SJohn Marinoapplication-independent, so that the same program can protect many 14686d7f5d3SJohn Marinokinds of network services; 2) no interaction also means that the 14786d7f5d3SJohn Marinowrappers are invisible from outside (at least for authorized users). 14886d7f5d3SJohn Marino 14986d7f5d3SJohn MarinoAnother important property is that the wrapper programs are active only 15086d7f5d3SJohn Marinowhen the initial contact between client and server is established. Once 15186d7f5d3SJohn Marinoa wrapper has done its work there is no overhead on the client-server 15286d7f5d3SJohn Marinoconversation. 15386d7f5d3SJohn Marino 15486d7f5d3SJohn MarinoThe simple mechanism has one major drawback: the wrappers go away after 15586d7f5d3SJohn Marinothe initial contact between client and server processes, so the 15686d7f5d3SJohn Marinowrappers are of little use with network daemons that service more than 15786d7f5d3SJohn Marinoone client. The wrappers would only see the first client attempt to 15886d7f5d3SJohn Marinocontact such a server. The NFS mount daemon is a typical example of a 15986d7f5d3SJohn Marinodaemon that services requests from multiple clients. See the section on 16086d7f5d3SJohn Marinorelated software for ways to deal with such server programs. 16186d7f5d3SJohn Marino 16286d7f5d3SJohn MarinoThere are two ways to use the wrapper programs: 16386d7f5d3SJohn Marino 16486d7f5d3SJohn Marino1) The easy way: move network daemons to some other directory and fill 16586d7f5d3SJohn Marino the resulting holes with copies of the wrapper programs. This 16686d7f5d3SJohn Marino approach involves no changes to system configuration files, so there 16786d7f5d3SJohn Marino is very little risk of breaking things. 16886d7f5d3SJohn Marino 16986d7f5d3SJohn Marino2) The advanced way: leave the network daemons alone and modify the 17086d7f5d3SJohn Marino inetd configuration file. For example, an entry such as: 17186d7f5d3SJohn Marino 17286d7f5d3SJohn Marino tftp dgram udp wait root /usr/etc/tcpd in.tftpd -s /tftpboot 17386d7f5d3SJohn Marino 17486d7f5d3SJohn Marino When a tftp request arrives, inetd will run the wrapper program 17586d7f5d3SJohn Marino (tcpd) with a process name `in.tftpd'. This is the name that the 17686d7f5d3SJohn Marino wrapper will use when logging the request and when scanning the 17786d7f5d3SJohn Marino optional access control tables. `in.tftpd' is also the name of the 17886d7f5d3SJohn Marino server program that the wrapper will attempt to run when all is 17986d7f5d3SJohn Marino well. Any arguments (`-s /tftpboot' in this particular example) are 18086d7f5d3SJohn Marino transparently passed on to the server program. 18186d7f5d3SJohn Marino 18286d7f5d3SJohn MarinoFor an account of the history of the wrapper programs, with real-life 18386d7f5d3SJohn Marinoexamples, see the section below on related documents. 18486d7f5d3SJohn Marino 18586d7f5d3SJohn Marino3.2 - Where the logging information goes 18686d7f5d3SJohn Marino---------------------------------------- 18786d7f5d3SJohn Marino 18886d7f5d3SJohn MarinoThe wrapper programs send their logging information to the syslog 18986d7f5d3SJohn Marinodaemon (syslogd). The disposition of the wrapper logs is determined by 19086d7f5d3SJohn Marinothe syslog configuration file (usually /etc/syslog.conf). Messages are 19186d7f5d3SJohn Marinowritten to files, to the console, or are forwarded to a @loghost. Some 19286d7f5d3SJohn Marinosyslogd versions can even forward messages down a |pipeline. 19386d7f5d3SJohn Marino 19486d7f5d3SJohn MarinoOlder syslog implementations (still found on Ultrix systems) only 19586d7f5d3SJohn Marinosupport priority levels ranging from 9 (debug-level messages) to 0 19686d7f5d3SJohn Marino(alerts). All logging information of the specified priority level or 19786d7f5d3SJohn Marinomore urgent is written to the same destination. In the syslog.conf 19886d7f5d3SJohn Marinofile, priority levels are specified in numerical form. For example, 19986d7f5d3SJohn Marino 20086d7f5d3SJohn Marino 8/usr/spool/mqueue/syslog 20186d7f5d3SJohn Marino 20286d7f5d3SJohn Marinocauses all messages with priority 8 (informational messages), and 20386d7f5d3SJohn Marinoanything that is more urgent, to be appended to the file 20486d7f5d3SJohn Marino/usr/spool/mqueue/syslog. 20586d7f5d3SJohn Marino 20686d7f5d3SJohn MarinoNewer syslog implementations support message classes in addition to 20786d7f5d3SJohn Marinopriority levels. Examples of message classes are: mail, daemon, auth 20886d7f5d3SJohn Marinoand news. In the syslog.conf file, priority levels are specified with 20986d7f5d3SJohn Marinosymbolic names: debug, info, notice, ..., emerg. For example, 21086d7f5d3SJohn Marino 21186d7f5d3SJohn Marino mail.debug /var/log/syslog 21286d7f5d3SJohn Marino 21386d7f5d3SJohn Marinocauses all messages of class mail with priority debug (or more urgent) 21486d7f5d3SJohn Marinoto be appended to the /var/log/syslog file. 21586d7f5d3SJohn Marino 21686d7f5d3SJohn MarinoBy default, the wrapper logs go to the same place as the transaction 21786d7f5d3SJohn Marinologs of the sendmail daemon. The disposition can be changed by editing 21886d7f5d3SJohn Marinothe Makefile and/or the syslog.conf file. Send a `kill -HUP' to the 21986d7f5d3SJohn Marinosyslogd after changing its configuration file. Remember that syslogd, 22086d7f5d3SJohn Marinojust like sendmail, insists on one or more TABs between the left-hand 22186d7f5d3SJohn Marinoside and the right-hand side expressions in its configuration file. 22286d7f5d3SJohn Marino 22386d7f5d3SJohn MarinoSolaris 2.x note: the syslog daemon depends on the m4 macro processor. 22486d7f5d3SJohn MarinoThe m4 program is installed as part of the software developer packages. 22586d7f5d3SJohn Marino 22686d7f5d3SJohn MarinoTrouble shooting note: when the syslogging does not work as expected, 22786d7f5d3SJohn Marinorun the program by hand (`syslogd -d') and see what really happens. 22886d7f5d3SJohn Marino 22986d7f5d3SJohn Marino4 - Features 23086d7f5d3SJohn Marino------------ 23186d7f5d3SJohn Marino 23286d7f5d3SJohn Marino4.1 - Access control 23386d7f5d3SJohn Marino-------------------- 23486d7f5d3SJohn Marino 23586d7f5d3SJohn MarinoWhen compiled with -DHOSTS_ACCESS, the wrapper programs support a 23686d7f5d3SJohn Marinosimple form of access control. Access can be controlled per host, per 23786d7f5d3SJohn Marinoservice, or combinations thereof. The software provides hooks for the 23886d7f5d3SJohn Marinoexecution of shell commands when an access control rule fires; this 23986d7f5d3SJohn Marinofeature may be used to install "booby traps". For details, see the 24086d7f5d3SJohn Marinohosts_access.5 manual page, which is in `nroff -man' format. A later 24186d7f5d3SJohn Marinosection describes how you can test your access control rules. 24286d7f5d3SJohn Marino 24386d7f5d3SJohn MarinoAccess control can also be used to connect clients to the "right" 24486d7f5d3SJohn Marinoservice. What is right may depend on the requested service, the origin 24586d7f5d3SJohn Marinoof the request, and what host address the client connects to. Examples: 24686d7f5d3SJohn Marino 24786d7f5d3SJohn Marino(1) A gopher or www database speaks native language when contacted from 24886d7f5d3SJohn Marino within the country, otherwise it speaks English. 24986d7f5d3SJohn Marino 25086d7f5d3SJohn Marino(2) A service provider offers different ftp, gopher or www services 25186d7f5d3SJohn Marino with different internet hostnames from one host (section 4.6). 25286d7f5d3SJohn Marino 25386d7f5d3SJohn MarinoAccess control is enabled by default. It can be turned off by editing 25486d7f5d3SJohn Marinothe Makefile, or by providing no access control tables. The install 25586d7f5d3SJohn Marinoinstructions below describe the Makefile editing process. 25686d7f5d3SJohn Marino 25786d7f5d3SJohn MarinoThe hosts_options.5 manual page (`nroff -man' format) documents an 25886d7f5d3SJohn Marinoextended version of the access control language. The extensions are 25986d7f5d3SJohn Marinodisabled by default. See the section below on language extensions. 26086d7f5d3SJohn Marino 26186d7f5d3SJohn MarinoLater System V implementations provide the Transport Level Interface 26286d7f5d3SJohn Marino(TLI), a network programming interface that performs functions similar 26386d7f5d3SJohn Marinoto the Berkeley socket programming interface. Like Berkeley sockets, 26486d7f5d3SJohn MarinoTLI was designed to cover multiple protocols, not just Internet. 26586d7f5d3SJohn Marino 26686d7f5d3SJohn MarinoWhen the wrapper discovers that the TLI interface sits on top of a 26786d7f5d3SJohn MarinoTCP/IP or UDP/IP conversation it uses this knowledge to provide the 26886d7f5d3SJohn Marinosame functions as with traditional socket-based applications. When 26986d7f5d3SJohn Marinosome other protocol is used underneath TLI, the host address will be 27086d7f5d3SJohn Marinosome universal magic cookie that may not even be usable for access 27186d7f5d3SJohn Marinocontrol purposes. 27286d7f5d3SJohn Marino 27386d7f5d3SJohn Marino4.2 - Host name spoofing 27486d7f5d3SJohn Marino------------------------ 27586d7f5d3SJohn Marino 27686d7f5d3SJohn MarinoWith some network applications, such as RSH or RLOGIN, the client host 27786d7f5d3SJohn Marinoname plays an important role in the authentication process. Host name 27886d7f5d3SJohn Marinoinformation can be reliable when lookups are done from a _local_ hosts 27986d7f5d3SJohn Marinotable, provided that the client IP address can be trusted. 28086d7f5d3SJohn Marino 28186d7f5d3SJohn MarinoWith _distributed_ name services, authentication schemes that rely on 28286d7f5d3SJohn Marinohost names become more problematic. The security of your system now may 28386d7f5d3SJohn Marinodepend on some far-away DNS (domain name server) outside your own 28486d7f5d3SJohn Marinocontrol. 28586d7f5d3SJohn Marino 28686d7f5d3SJohn MarinoThe wrapper programs verify the client host name that is returned by 28786d7f5d3SJohn Marinothe address->name DNS server, by asking for a second opinion. To this 28886d7f5d3SJohn Marinoend, the programs look at the name and addresses that are returned by 28986d7f5d3SJohn Marinothe name->address DNS server, which may be an entirely different host. 29086d7f5d3SJohn Marino 29186d7f5d3SJohn MarinoIf any name or address discrepancies are found, or if the second DNS 29286d7f5d3SJohn Marinoopinion is not available, the wrappers assume that one of the two name 29386d7f5d3SJohn Marinoservers is lying, and assume that the client host pretends to have 29486d7f5d3SJohn Marinosomeone elses host name. 29586d7f5d3SJohn Marino 29686d7f5d3SJohn MarinoWhen compiled with -DPARANOID, the wrappers will always attempt to look 29786d7f5d3SJohn Marinoup and double check the client host name, and will always refuse 29886d7f5d3SJohn Marinoservice in case of a host name/address discrepancy. This is a 29986d7f5d3SJohn Marinoreasonable policy for most systems. 30086d7f5d3SJohn Marino 30186d7f5d3SJohn MarinoWhen compiled without -DPARANOID, the wrappers by default still perform 30286d7f5d3SJohn Marinohostname lookup. You can match hosts with a name/address discrepancy 30386d7f5d3SJohn Marinowith the PARANOID wildcard and decide whether or not to grant service. 30486d7f5d3SJohn Marino 30586d7f5d3SJohn MarinoAutomatic hostname verification is enabled by default. Automatic 30686d7f5d3SJohn Marinohostname lookups and verification can be turned off by editing the 30786d7f5d3SJohn MarinoMakefile. The configuration and installation section below describes 30886d7f5d3SJohn Marinothe Makefile editing process. 30986d7f5d3SJohn Marino 31086d7f5d3SJohn Marino4.3 - Host address spoofing 31186d7f5d3SJohn Marino--------------------------- 31286d7f5d3SJohn Marino 31386d7f5d3SJohn MarinoWhile host name spoofing can be found out by asking a second opinion, 31486d7f5d3SJohn Marinoit is much harder to find out that a host claims to have someone elses 31586d7f5d3SJohn Marinonetwork address. And since host names are deduced from network 31686d7f5d3SJohn Marinoaddresses, address spoofing is at least as effective as name spoofing. 31786d7f5d3SJohn Marino 31886d7f5d3SJohn MarinoThe wrapper programs can give additional protection against hosts that 31986d7f5d3SJohn Marinoclaim to have an address that lies outside their own network. For 32086d7f5d3SJohn Marinoexample, some far-away host that claims to be a trusted host within 32186d7f5d3SJohn Marinoyour own network. Such things are possible even while the impersonated 32286d7f5d3SJohn Marinosystem is up and running. 32386d7f5d3SJohn Marino 32486d7f5d3SJohn MarinoThis additional protection is not an invention of my own; it has been 32586d7f5d3SJohn Marinopresent for at least five years in the BSD rsh and rlogin daemons. 32686d7f5d3SJohn MarinoUnfortunately, that feature was added *after* 4.3 BSD came out, so that 32786d7f5d3SJohn Marinovery few, if any, UNIX vendors have adopted it. Our site, and many 32886d7f5d3SJohn Marinoother ones, has been running these enhanced daemons for several years, 32986d7f5d3SJohn Marinoand without any ill effects. 33086d7f5d3SJohn Marino 33186d7f5d3SJohn MarinoWhen the wrapper programs are compiled with -DKILL_IP_OPTIONS, the 33286d7f5d3SJohn Marinoprograms refuse to service TCP connections with IP source routing 33386d7f5d3SJohn Marinooptions. -DKILL_IP_OPTIONS is not needed on modern UNIX systems 33486d7f5d3SJohn Marinothat can stop source-routed traffic in the kernel. Examples are 33586d7f5d3SJohn Marino4.4BSD derivatives, Solaris 2.x, and Linux. See your system manuals 33686d7f5d3SJohn Marinofor details. 33786d7f5d3SJohn Marino 33886d7f5d3SJohn MarinoIf you are going to use this feature on SunOS 4.1.x you should apply 33986d7f5d3SJohn Marinopatch 100804-03+ or 101790-something depending on your SunOS version. 34086d7f5d3SJohn MarinoOtherwise you may experience "BAD TRAP" and "Data fault" panics when 34186d7f5d3SJohn Marinothe getsockopt() system call is executed after a TCP RESET has been 34286d7f5d3SJohn Marinoreceived. This is a kernel bug, it is not the fault of the wrappers. 34386d7f5d3SJohn Marino 34486d7f5d3SJohn MarinoThe feature is disabled by default. It can be turned on by editing the 34586d7f5d3SJohn MarinoMakefile. The configuration and installation section below describes 34686d7f5d3SJohn Marinothe Makefile editing process. 34786d7f5d3SJohn Marino 34886d7f5d3SJohn MarinoUDP services do not benefit from this additional protection. With UDP, 34986d7f5d3SJohn Marinoall you can be certain of is the network packet's destination address. 35086d7f5d3SJohn Marino 35186d7f5d3SJohn Marino4.4 - Client username lookups 35286d7f5d3SJohn Marino----------------------------- 35386d7f5d3SJohn Marino 35486d7f5d3SJohn MarinoThe protocol proposed in RFC 931 provides a means to obtain the client 35586d7f5d3SJohn Marinouser name from the client host. The requirement is that the client 35686d7f5d3SJohn Marinohost runs an RFC 931-compliant daemon. The information provided by such 35786d7f5d3SJohn Marinoa daemon is not intended to be used for authentication purposes, but it 35886d7f5d3SJohn Marinocan provide additional information about the owner of a TCP connection. 35986d7f5d3SJohn Marino 36086d7f5d3SJohn MarinoThe RFC 931 protocol has diverged into different directions (IDENT, 36186d7f5d3SJohn MarinoTAP, RFC 1413). To add to the confusion, they all use the same network 36286d7f5d3SJohn Marinoport. The daemon wrappers implement a common subset of the protocols. 36386d7f5d3SJohn Marino 36486d7f5d3SJohn MarinoThere are some limitations: the number of hosts that run an RFC 931 (or 36586d7f5d3SJohn Marinocompatible) daemon is limited (but growing); client user name lookups 36686d7f5d3SJohn Marinodo not work for datagram (UDP) services. More seriously, client user 36786d7f5d3SJohn Marinoname lookups can cause noticeable delays with connections from non-UNIX 36886d7f5d3SJohn MarinoPCs. Recent PC software seem to have fixed this (for example NCSA 36986d7f5d3SJohn Marinotelnet). The wrappers use a 10-second timeout for RFC931 lookups, to 37086d7f5d3SJohn Marinoaccommodate slow networks and slow hosts. 37186d7f5d3SJohn Marino 37286d7f5d3SJohn MarinoBy default, the wrappers will do username lookup only when the access 37386d7f5d3SJohn Marinocontrol rules require them to do so (via user@host client patterns, see 37486d7f5d3SJohn Marinothe hosts_access.5 manual page) or when the username is needed for 37586d7f5d3SJohn Marino%<letter> expansions. 37686d7f5d3SJohn Marino 37786d7f5d3SJohn MarinoYou can configure the wrappers to always perform client username 37886d7f5d3SJohn Marinolookups, by editing the Makefile. The client username lookup timeout 37986d7f5d3SJohn Marinoperiod (10 seconds default) can be changed by editing the Makefile. The 38086d7f5d3SJohn Marinoinstallation sections below describe the Makefile editing process. 38186d7f5d3SJohn Marino 38286d7f5d3SJohn MarinoOn System V with TLI-based network services, client username lookups 38386d7f5d3SJohn Marinowill be possible only when the underlying network protocol is TCP/IP. 38486d7f5d3SJohn Marino 38586d7f5d3SJohn Marino4.5 - Language extensions 38686d7f5d3SJohn Marino------------------------- 38786d7f5d3SJohn Marino 38886d7f5d3SJohn MarinoThe wrappers sport only a limited number of features. This is for a 38986d7f5d3SJohn Marinogood reason: programs that run at high privilege levels must be easy to 39086d7f5d3SJohn Marinoverify. And the smaller a program, the easier to verify. There is, 39186d7f5d3SJohn Marinohowever, a provision to add features. 39286d7f5d3SJohn Marino 39386d7f5d3SJohn MarinoThe options.c module provides a framework for language extensions. 39486d7f5d3SJohn MarinoQuite a few extensions have already been implemented; they are 39586d7f5d3SJohn Marinodocumented in the hosts_options.5 document, which is in `nroff -man' 39686d7f5d3SJohn Marinoformat. Examples: changing the severity level at which a request for 39786d7f5d3SJohn Marinoservice is logged; "allow" and "deny" keywords; running a customized 39886d7f5d3SJohn Marinoserver instead of the standard one; many others. 39986d7f5d3SJohn Marino 40086d7f5d3SJohn MarinoThe language extensions are not enabled by default because they 40186d7f5d3SJohn Marinointroduce an incompatible change to the access control language 40286d7f5d3SJohn Marinosyntax. Instructions to enable the extensions are given in the 40386d7f5d3SJohn MarinoMakefile. 40486d7f5d3SJohn Marino 40586d7f5d3SJohn Marino4.6 - Multiple ftp/gopher/www archives on one host 40686d7f5d3SJohn Marino-------------------------------------------------- 40786d7f5d3SJohn Marino 40886d7f5d3SJohn MarinoImagine one host with multiple internet addresses. These addresses do 40986d7f5d3SJohn Marinonot need to have the same internet hostname. Thus, it is possible to 41086d7f5d3SJohn Marinooffer services with different internet hostnames from just one host. 41186d7f5d3SJohn Marino 41286d7f5d3SJohn MarinoService providers can use this to offer organizations a presence on the 41386d7f5d3SJohn Marino"net" with their own internet hostname, even when those organizations 41486d7f5d3SJohn Marinoaren't connected to the Internet at all. To the end user it makes no 41586d7f5d3SJohn Marinodifference, because applications use internet hostnames. 41686d7f5d3SJohn Marino 41786d7f5d3SJohn MarinoThere are several ways to assign multiple addresses to one machine. 41886d7f5d3SJohn MarinoThe nice way is to take an existing network interface and to assign 41986d7f5d3SJohn Marinoadditional internet addresses with the `ifconfig' command. Examples: 42086d7f5d3SJohn Marino 42186d7f5d3SJohn Marino Solaris 2: ifconfig le0:1 <address> netmask <mask> up 42286d7f5d3SJohn Marino 4.4 BSD: ifconfig en0 alias <address> netmask <mask> 42386d7f5d3SJohn Marino 42486d7f5d3SJohn MarinoOn other systems one has to increase the number of network interfaces: 42586d7f5d3SJohn Marinoeither with hardware interfaces, or with pseudo interfaces like SLIP or 42686d7f5d3SJohn MarinoPPP. The interfaces do not need to be attached to anything. They just 42786d7f5d3SJohn Marinoneed to be up and to be assigned a suitable internet address and mask. 42886d7f5d3SJohn Marino 42986d7f5d3SJohn MarinoWith the wrapper software, `daemon@host' access control patterns can be 43086d7f5d3SJohn Marinoused to distinguish requests by the network address that they are aimed 43186d7f5d3SJohn Marinoat. Judicious use of the `twist' option (see the hosts_options.5 file, 43286d7f5d3SJohn Marino`nroff -man' format) can guide the requests to the right server. These 43386d7f5d3SJohn Marinocan be servers that live in separate chroot areas, or servers modified 43486d7f5d3SJohn Marinoto take additional context from the command line, or a combination. 43586d7f5d3SJohn Marino 43686d7f5d3SJohn MarinoAnother way is to modify gopher or www listeners so that they bind to 43786d7f5d3SJohn Marinoonly one specific network address. Multiple gopher or www servers can 43886d7f5d3SJohn Marinothen be run side by side, each taking requests sent to its respective 43986d7f5d3SJohn Marinonetwork address. 44086d7f5d3SJohn Marino 44186d7f5d3SJohn Marino4.7 - Banner messages 44286d7f5d3SJohn Marino--------------------- 44386d7f5d3SJohn Marino 44486d7f5d3SJohn MarinoSome sites are required to present an informational message to users 44586d7f5d3SJohn Marinobefore they attempt to login. Banner messages can also be useful when 44686d7f5d3SJohn Marinodenying service: instead of simply dropping the connection a polite 44786d7f5d3SJohn Marinoexplanation is given first. Finally, banners can be used to give your 44886d7f5d3SJohn Marinosystem a more personal touch. 44986d7f5d3SJohn Marino 45086d7f5d3SJohn MarinoThe wrapper software provides easy-to-use tools to generate pre-login 45186d7f5d3SJohn Marinobanners for ftp, telnet, rlogin etc. from a single prototype banner 45286d7f5d3SJohn Marinotextfile. Details on banners and on-the-fly %<letter> expansions are 45386d7f5d3SJohn Marinogiven in the hosts_options.5 manual page (`nroff -man' format). An 45486d7f5d3SJohn Marinoexample is given in the file Banners.Makefile. 45586d7f5d3SJohn Marino 45686d7f5d3SJohn MarinoIn order to support banner messages the wrappers have to be built with 45786d7f5d3SJohn Marinolanguage extensions enabled. See the section on language extensions. 45886d7f5d3SJohn Marino 45986d7f5d3SJohn Marino4.8 - Sequence number guessing 46086d7f5d3SJohn Marino------------------------------ 46186d7f5d3SJohn Marino 46286d7f5d3SJohn MarinoRecently, systems came under attack from intruders that exploited a 46386d7f5d3SJohn Marinowell-known weakness in TCP/IP sequence number generators. This 46486d7f5d3SJohn Marinoweakness allows intruders to impersonate trusted hosts. Break-ins have 46586d7f5d3SJohn Marinobeen reported via the rsh service. In fact, any network service can be 46686d7f5d3SJohn Marinoexploited that trusts the client host name or address. 46786d7f5d3SJohn Marino 46886d7f5d3SJohn MarinoA long-term solution is to stop using network services that trust the 46986d7f5d3SJohn Marinoclient host name or address, and to use data encryption instead. 47086d7f5d3SJohn Marino 47186d7f5d3SJohn MarinoA short-term solution, as outlined in in CERT advisory CA-95:01, is to 47286d7f5d3SJohn Marinoconfigure network routers so that they discard datagrams from "outside" 47386d7f5d3SJohn Marinowith an "inside" source address. This approach is most fruitful when 47486d7f5d3SJohn Marinoyou do not trust any hosts outside your local network. 47586d7f5d3SJohn Marino 47686d7f5d3SJohn MarinoThe IDENT (RFC931 etc.) client username lookup protocol can help to 47786d7f5d3SJohn Marinodetect host impersonation attacks. Before accepting a client request, 47886d7f5d3SJohn Marinothe wrappers can query the client's IDENT server and find out that the 47986d7f5d3SJohn Marinoclient never sent that request. 48086d7f5d3SJohn Marino 48186d7f5d3SJohn MarinoWhen the client host provides IDENT service, a negative IDENT lookup 48286d7f5d3SJohn Marinoresult (the client matches `UNKNOWN@host') is strong evidence of a host 48386d7f5d3SJohn Marinoimpersonation attack. 48486d7f5d3SJohn Marino 48586d7f5d3SJohn MarinoA positive IDENT lookup result (the client matches `KNOWN@host') is 48686d7f5d3SJohn Marinoless trustworthy. It is possible for an attacker to spoof both the 48786d7f5d3SJohn Marinoclient request and the IDENT lookup connection, although doing so 48886d7f5d3SJohn Marinoshould be much harder than spoofing just a client request. Another 48986d7f5d3SJohn Marinopossibility is that the client's IDENT server is lying. 49086d7f5d3SJohn Marino 49186d7f5d3SJohn MarinoClient username lookups are described in more detail in a previous 49286d7f5d3SJohn Marinosection. Pointers to IDENT daemon software are described in the section 49386d7f5d3SJohn Marinoon related software. 49486d7f5d3SJohn Marino 49586d7f5d3SJohn Marino5 - Other works 49686d7f5d3SJohn Marino--------------- 49786d7f5d3SJohn Marino 49886d7f5d3SJohn Marino5.1 - Related documents 49986d7f5d3SJohn Marino----------------------- 50086d7f5d3SJohn Marino 50186d7f5d3SJohn MarinoThe war story behind the tcp wrapper tools is described in: 50286d7f5d3SJohn Marino 50386d7f5d3SJohn Marino W.Z. Venema, "TCP WRAPPER, network monitoring, access control and 50486d7f5d3SJohn Marino booby traps", UNIX Security Symposium III Proceedings (Baltimore), 50586d7f5d3SJohn Marino September 1992. 50686d7f5d3SJohn Marino 50786d7f5d3SJohn Marino ftp.win.tue.nl:/pub/security/tcp_wrapper.ps.Z (postscript) 50886d7f5d3SJohn Marino ftp.win.tue.nl:/pub/security/tcp_wrapper.txt.Z (flat text) 50986d7f5d3SJohn Marino 51086d7f5d3SJohn MarinoThe same cracker is also described in: 51186d7f5d3SJohn Marino 51286d7f5d3SJohn Marino W.R. Cheswick, "An Evening with Berferd, In Which a Cracker is 51386d7f5d3SJohn Marino Lured, Endured, and Studied", Proceedings of the Winter USENIX 51486d7f5d3SJohn Marino Conference (San Francisco), January 1992. 51586d7f5d3SJohn Marino 51686d7f5d3SJohn Marino research.att.com:/dist/internet_security/berferd.ps 51786d7f5d3SJohn Marino 51886d7f5d3SJohn MarinoAn updated version of the latter paper appeared in: 51986d7f5d3SJohn Marino 52086d7f5d3SJohn Marino W.R. Cheswick, S.M. Bellovin, "Firewalls and Internet Security", 52186d7f5d3SJohn Marino Addison-Wesley, 1994. 52286d7f5d3SJohn Marino 52386d7f5d3SJohn MarinoDiscussions on internet firewalls are archived on ftp.greatcircle.com. 52486d7f5d3SJohn MarinoSubscribe to the mailing list by sending a message to 52586d7f5d3SJohn Marino 52686d7f5d3SJohn Marino majordomo@greatcircle.com 52786d7f5d3SJohn Marino 52886d7f5d3SJohn MarinoWith in the body (not subject): subscribe firewalls. 52986d7f5d3SJohn Marino 53086d7f5d3SJohn Marino5.2 - Related software 53186d7f5d3SJohn Marino---------------------- 53286d7f5d3SJohn Marino 53386d7f5d3SJohn MarinoNetwork daemons etc. with enhanced logging capabilities can generate 53486d7f5d3SJohn Marinomassive amounts of information: our 150+ workstations generate several 53586d7f5d3SJohn Marinohundred kbytes each day. egrep-based filters can help to suppress some 53686d7f5d3SJohn Marinoof the noise. A more powerful tool is the Swatch monitoring system by 53786d7f5d3SJohn MarinoStephen E. Hansen and E. Todd Atkins. Swatch can process log files in 53886d7f5d3SJohn Marinoreal time and can associate arbitrary actions with patterns; its 53986d7f5d3SJohn Marinoapplications are by no means restricted to security. Swatch is 54086d7f5d3SJohn Marinoavailable ftp.stanford.edu, directory /general/security-tools/swatch. 54186d7f5d3SJohn Marino 54286d7f5d3SJohn MarinoSocks, described in the UNIX Security III proceedings, can be used to 54386d7f5d3SJohn Marinocontrol network traffic from hosts on an internal network, through a 54486d7f5d3SJohn Marinofirewall host, to the outer world. Socks consists of a daemon that is 54586d7f5d3SJohn Marinorun on the firewall host, and of a library with routines that redirect 54686d7f5d3SJohn Marinoapplication socket calls through the firewall daemon. Socks is 54786d7f5d3SJohn Marinoavailable from s1.gov in /pub/firewalls/socks.tar.Z. 54886d7f5d3SJohn Marino 54986d7f5d3SJohn MarinoFor a modified Socks version by Ying-Da Lee (ylee@syl.dl.nec.com) try 55086d7f5d3SJohn Marinoftp.nec.com, directory /pub/security/socks.cstc. 55186d7f5d3SJohn Marino 55286d7f5d3SJohn MarinoTcpr is a set of perl scripts by Paul Ziemba that enable you to run ftp 55386d7f5d3SJohn Marinoand telnet commands across a firewall. Unlike socks it can be used with 55486d7f5d3SJohn Marinounmodified client software. Available from ftp.alantec.com, /pub/tcpr. 55586d7f5d3SJohn Marino 55686d7f5d3SJohn MarinoThe TIS firewall toolkit provides a multitude of tools to build your 55786d7f5d3SJohn Marinoown internet firewall system. ftp.tis.com, directory /pub/firewalls. 55886d7f5d3SJohn Marino 55986d7f5d3SJohn MarinoVersions of rshd and rlogind, modified to report the client user name 56086d7f5d3SJohn Marinoin addition to the client host name, are available for anonymous ftp 56186d7f5d3SJohn Marino(ftp.win.tue.nl:/pub/security/logdaemon-XX.tar.Z). These programs are 56286d7f5d3SJohn Marinodrop-in replacements for SunOS 4.x, Ultrix 4.x, SunOS 5.x and HP-UX 56386d7f5d3SJohn Marino9.x. This archive also contains ftpd/rexecd/login versions that support 56486d7f5d3SJohn MarinoS/Key or SecureNet one-time passwords in addition to traditional UNIX 56586d7f5d3SJohn Marinoreusable passwords. 56686d7f5d3SJohn Marino 56786d7f5d3SJohn MarinoThe securelib shared library by William LeFebvre can be used to control 56886d7f5d3SJohn Marinoaccess to network daemons that are not run under control of the inetd 56986d7f5d3SJohn Marinoor that serve more than one client, such as the NFS mount daemon that 57086d7f5d3SJohn Marinoruns until the machine goes down. Available from eecs.nwu.edu, file 57186d7f5d3SJohn Marino/pub/securelib.tar. 57286d7f5d3SJohn Marino 57386d7f5d3SJohn Marinoxinetd (posted to comp.sources.unix) is an inetd replacement that 57486d7f5d3SJohn Marinoprovides, among others, logging, username lookup and access control. 57586d7f5d3SJohn MarinoHowever, it does not support the System V TLI services, and involves 57686d7f5d3SJohn Marinomuch more source code than the daemon wrapper programs. Available 57786d7f5d3SJohn Marinofrom ftp.uu.net, directory /usenet/comp.sources.unix. 57886d7f5d3SJohn Marino 57986d7f5d3SJohn Marinonetlog from Texas A&M relies on the SunOS 4.x /dev/nit interface to 58086d7f5d3SJohn Marinopassively watch all TCP and UDP network traffic on a network. The 58186d7f5d3SJohn Marinocurrent version is on net.tamu.edu in /pub/security/TAMU. 58286d7f5d3SJohn Marino 58386d7f5d3SJohn MarinoWhere shared libraries or router-based packet filtering are not an 58486d7f5d3SJohn Marinooption, an alternative portmap daemon can help to prevent hackers 58586d7f5d3SJohn Marinofrom mounting your NFS file systems using the proxy RPC facility. 58686d7f5d3SJohn Marinoftp.win.tue.nl:/pub/security/portmap-X.shar.Z was tested with SunOS 58786d7f5d3SJohn Marino4.1.X Ultrix 3.0 and Ultrix 4.x, HP-UX 8.x and some version of AIX. The 58886d7f5d3SJohn Marinoprotection is less effective than that of the securelib library because 58986d7f5d3SJohn Marinoportmap is mostly a dictionary service. 59086d7f5d3SJohn Marino 59186d7f5d3SJohn MarinoAn rpcbind replacement (the Solaris 2.x moral equivalent of portmap) 59286d7f5d3SJohn Marinocan be found on ftp.win.tue.nl in /pub/security. It prevents hackers 59386d7f5d3SJohn Marinofrom mounting your NFS file systems by using the proxy RPC facility. 59486d7f5d3SJohn Marino 59586d7f5d3SJohn MarinoSource for a portable RFC 931 (TAP, IDENT, RFC 1413) daemon by Peter 59686d7f5d3SJohn MarinoEriksson is available from ftp.lysator.liu.se:/pub/ident/servers. 59786d7f5d3SJohn Marino 59886d7f5d3SJohn MarinoSome TCP/IP implementations come without syslog library. Some come with 59986d7f5d3SJohn Marinothe library but have no syslog daemon. A replacement can be found in 60086d7f5d3SJohn Marinoftp.win.tue.nl:/pub/security/surrogate-syslog.tar.Z. The fakesyslog 60186d7f5d3SJohn Marinolibrary that comes with the nntp sources reportedly works well, too. 60286d7f5d3SJohn Marino 60386d7f5d3SJohn Marino6 - Limitations 60486d7f5d3SJohn Marino--------------- 60586d7f5d3SJohn Marino 60686d7f5d3SJohn Marino6.1 - Known wrapper limitations 60786d7f5d3SJohn Marino------------------------------- 60886d7f5d3SJohn Marino 60986d7f5d3SJohn MarinoMany UDP (and rpc/udp) daemons linger around for a while after they 61086d7f5d3SJohn Marinohave serviced a request, just in case another request comes in. In the 61186d7f5d3SJohn Marinoinetd configuration file these daemons are registered with the `wait' 61286d7f5d3SJohn Marinooption. Only the request that started such a daemon will be seen by the 61386d7f5d3SJohn Marinowrappers. Such daemons are better protected with the securelib shared 61486d7f5d3SJohn Marinolibrary (see: Related software). 61586d7f5d3SJohn Marino 61686d7f5d3SJohn MarinoThe wrappers do not work with RPC services over TCP. These services are 61786d7f5d3SJohn Marinoregistered as rpc/tcp in the inetd configuration file. The only non- 61886d7f5d3SJohn Marinotrivial service that is affected by this limitation is rexd, which is 61986d7f5d3SJohn Marinoused by the on(1) command. This is no great loss. On most systems, 62086d7f5d3SJohn Marinorexd is less secure than a wildcard in /etc/hosts.equiv. 62186d7f5d3SJohn Marino 62286d7f5d3SJohn MarinoSome RPC requests (for example: rwall, rup, rusers) appear to come from 62386d7f5d3SJohn Marinothe server host. What happens is that the client broadcasts its request 62486d7f5d3SJohn Marinoto all portmap daemons on its network; each portmap daemon forwards the 62586d7f5d3SJohn Marinorequest to a daemon on its own system. As far as the rwall etc. daemons 62686d7f5d3SJohn Marinoknow, the request comes from the local host. 62786d7f5d3SJohn Marino 62886d7f5d3SJohn MarinoPortmap and RPC (e.g. NIS and NFS) (in)security is a topic in itself. 62986d7f5d3SJohn MarinoSee the section in this document on related software. 63086d7f5d3SJohn Marino 63186d7f5d3SJohn Marino6.2 - Known system software bugs 63286d7f5d3SJohn Marino-------------------------------- 63386d7f5d3SJohn Marino 63486d7f5d3SJohn MarinoWorkarounds have been implemented for several bugs in system software. 63586d7f5d3SJohn MarinoThey are described in the Makefile. Unfortunately, some system software 63686d7f5d3SJohn Marinobugs cannot be worked around. The result is loss of functionality. 63786d7f5d3SJohn Marino 63886d7f5d3SJohn MarinoIRIX has so many bugs that it has its own README.IRIX file. 63986d7f5d3SJohn Marino 64086d7f5d3SJohn MarinoOlder ConvexOS versions come with a broken recvfrom(2) implementation. 64186d7f5d3SJohn MarinoThis makes it impossible for the daemon wrappers to look up the 64286d7f5d3SJohn Marinoclient host address (and hence, the name) in case of UDP requests. 64386d7f5d3SJohn MarinoA patch is available for ConvexOS 10.1; later releases should be OK. 64486d7f5d3SJohn Marino 64586d7f5d3SJohn MarinoWith early Solaris (SunOS 5) versions, the syslog daemon will leave 64686d7f5d3SJohn Marinobehind zombie processes when writing to logged-in users. Workaround: 64786d7f5d3SJohn Marinoincrease the syslogd threshold for logging to users, or reduce the 64886d7f5d3SJohn Marinowrapper's logging severity. 64986d7f5d3SJohn Marino 65086d7f5d3SJohn MarinoOn some systems, the optional RFC 931 etc. client username lookups may 65186d7f5d3SJohn Marinotrigger a kernel bug. When a client host connects to your system, and 65286d7f5d3SJohn Marinothe RFC 931 connection from your system to that client is rejected by a 65386d7f5d3SJohn Marinorouter, your kernel may drop all connections with that client. This is 65486d7f5d3SJohn Marinonot a bug in the wrapper programs: complain to your vendor, and don't 65586d7f5d3SJohn Marinoenable client user name lookups until the bug has been fixed. 65686d7f5d3SJohn Marino 65786d7f5d3SJohn MarinoReportedly, SunOS 4.1.1, Next 2.0a, ISC 3.0 with TCP 1.3, and AIX 3.2.2 65886d7f5d3SJohn Marinoand later are OK. 65986d7f5d3SJohn Marino 66086d7f5d3SJohn MarinoSony News/OS 4.51, HP-UX 8-something and Ultrix 4.3 still have the bug. 66186d7f5d3SJohn MarinoReportedly, a fix for Ultrix is available (CXO-8919). 66286d7f5d3SJohn Marino 66386d7f5d3SJohn MarinoThe following procedure can be used (from outside the tue.nl domain) to 66486d7f5d3SJohn Marinofind out if your kernel has the bug. From the system under test, do: 66586d7f5d3SJohn Marino 66686d7f5d3SJohn Marino % ftp 131.155.70.19 66786d7f5d3SJohn Marino 66886d7f5d3SJohn MarinoThis command attempts to make an ftp connection to our anonymous ftp 66986d7f5d3SJohn Marinoserver (ftp.win.tue.nl). When the connection has been established, run 67086d7f5d3SJohn Marinothe following command from the same system under test, while keeping 67186d7f5d3SJohn Marinothe ftp connection open: 67286d7f5d3SJohn Marino 67386d7f5d3SJohn Marino % telnet 131.155.70.19 111 67486d7f5d3SJohn Marino 67586d7f5d3SJohn MarinoDo not forget the `111' at the end of the command. This telnet command 67686d7f5d3SJohn Marinoattempts to connect to our portmap process. The telnet command should 67786d7f5d3SJohn Marinofail with: "host not reachable", or with a timeout error. If your ftp 67886d7f5d3SJohn Marinoconnection gets messed up, you have the bug. If the telnet command does 67986d7f5d3SJohn Marinonot fail, please let me know a.s.a.p.! 68086d7f5d3SJohn Marino 68186d7f5d3SJohn MarinoFor those who care, the bug is that the BSD kernel code was not careful 68286d7f5d3SJohn Marinoenough with incoming ICMP UNREACHABLE control messages (it ignored the 68386d7f5d3SJohn Marinolocal and remote port numbers, and therefore zapped *all* connections 68486d7f5d3SJohn Marinowith the remote system). The bug is still present in the BSD NET/1 68586d7f5d3SJohn Marinosource release (1989) but apparently has been fixed in BSD NET/2 (1991). 68686d7f5d3SJohn Marino 68786d7f5d3SJohn Marino7 - Configuration and installation 68886d7f5d3SJohn Marino---------------------------------- 68986d7f5d3SJohn Marino 69086d7f5d3SJohn Marino7.1 - Easy configuration and installation 69186d7f5d3SJohn Marino----------------------------------------- 69286d7f5d3SJohn Marino 69386d7f5d3SJohn MarinoThe "easy" recipe requires no changes to existing software or 69486d7f5d3SJohn Marinoconfiguration files. Basically, you move the daemons that you want to 69586d7f5d3SJohn Marinoprotect to a different directory and plug the resulting holes with 69686d7f5d3SJohn Marinocopies of the wrapper programs. 69786d7f5d3SJohn Marino 69886d7f5d3SJohn MarinoIf you don't run Ultrix, you won't need the miscd wrapper program. The 69986d7f5d3SJohn Marinomiscd daemon implements among others the SYSTAT service, which produces 70086d7f5d3SJohn Marinothe same output as the WHO command. 70186d7f5d3SJohn Marino 70286d7f5d3SJohn MarinoType `make' and follow the instructions. The Makefile comes with 70386d7f5d3SJohn Marinoready-to-use templates for many common UNIX implementations (sun, 70486d7f5d3SJohn Marinoultrix, hp-ux, aix, irix,...). 70586d7f5d3SJohn Marino 70686d7f5d3SJohn MarinoIRIX has so many bugs that it has its own README.IRIX file. 70786d7f5d3SJohn Marino 70886d7f5d3SJohn MarinoWhen the `make' succeeds the result is five executables (six in case of 70986d7f5d3SJohn MarinoUltrix). 71086d7f5d3SJohn Marino 71186d7f5d3SJohn MarinoYou can use the `tcpdchk' program to identify the most common problems 71286d7f5d3SJohn Marinoin your wrapper and inetd configuration files. 71386d7f5d3SJohn Marino 71486d7f5d3SJohn MarinoWith the `tcpdmatch' program you can examine how the wrapper would 71586d7f5d3SJohn Marinoreact to specific requests for service. 71686d7f5d3SJohn Marino 71786d7f5d3SJohn MarinoThe `safe_finger' command should be used when you implement booby 71886d7f5d3SJohn Marinotraps: it gives better protection against nasty stuff that remote 71986d7f5d3SJohn Marinohosts may do in response to your finger probes. 72086d7f5d3SJohn Marino 72186d7f5d3SJohn MarinoThe `try-from' program tests the host and username lookup code. Run it 72286d7f5d3SJohn Marinofrom a remote shell command (`rsh host /some/where/try-from') and it 72386d7f5d3SJohn Marinoshould be able to figure out from what system it is being called. 72486d7f5d3SJohn Marino 72586d7f5d3SJohn MarinoThe tcpd program can be used to monitor the telnet, finger, ftp, exec, 72686d7f5d3SJohn Marinorsh, rlogin, tftp, talk, comsat and other tcp or udp services that have 72786d7f5d3SJohn Marinoa one-to-one mapping onto executable files. 72886d7f5d3SJohn Marino 72986d7f5d3SJohn MarinoThe tcpd program can also be used for services that are marked as 73086d7f5d3SJohn Marinorpc/udp in the inetd configuration file, but not for rpc/tcp services 73186d7f5d3SJohn Marinosuch as rexd. You probably do not want to run rexd anyway. On most 73286d7f5d3SJohn Marinosystems it is even less secure than a wildcard in /etc/hosts.equiv. 73386d7f5d3SJohn Marino 73486d7f5d3SJohn MarinoWith System V.4-style systems, the tcpd program can also handle TLI 73586d7f5d3SJohn Marinoservices. When TCP/IP or UDP/IP is used underneath TLI, tcpd provides 73686d7f5d3SJohn Marinothe same functions as with socket-based applications. When some other 73786d7f5d3SJohn Marinoprotocol is used underneath TLI, functionality will be limited (no 73886d7f5d3SJohn Marinoclient username lookups, weird network address formats). 73986d7f5d3SJohn Marino 74086d7f5d3SJohn MarinoDecide which services you want to monitor. Move the corresponding 74186d7f5d3SJohn Marinovendor-provided daemon programs to the location specified by the 74286d7f5d3SJohn MarinoREAL_DAEMON_DIR constant in the Makefile, and fill the holes with 74386d7f5d3SJohn Marinocopies of the tcpd program. That is, one copy of (or link to) the tcpd 74486d7f5d3SJohn Marinoprogram for each service that you want to monitor. For example, to 74586d7f5d3SJohn Marinomonitor the use of your finger service: 74686d7f5d3SJohn Marino 74786d7f5d3SJohn Marino # mkdir REAL_DAEMON_DIR 74886d7f5d3SJohn Marino # mv /usr/etc/in.fingerd REAL_DAEMON_DIR 74986d7f5d3SJohn Marino # cp tcpd /usr/etc/in.fingerd 75086d7f5d3SJohn Marino 75186d7f5d3SJohn MarinoThe example applies to SunOS 4. With other UNIX implementations the 75286d7f5d3SJohn Marinonetwork daemons live in /usr/libexec, /usr/sbin or in /etc, or have no 75386d7f5d3SJohn Marino"in." prefix to their names, but you get the idea. 75486d7f5d3SJohn Marino 75586d7f5d3SJohn MarinoFile protections: the wrapper, all files used by the wrapper, and all 75686d7f5d3SJohn Marinodirectories in the path leading to those files, should be accessible 75786d7f5d3SJohn Marinobut not writable for unprivileged users (mode 755 or mode 555). Do not 75886d7f5d3SJohn Marinoinstall the wrapper set-uid. 75986d7f5d3SJohn Marino 76086d7f5d3SJohn MarinoUltrix only: If you want to monitor the SYSTAT service, move the 76186d7f5d3SJohn Marinovendor-provided miscd daemon to the location specified by the 76286d7f5d3SJohn MarinoREAL_DAEMON_DIR macro in the Makefile, and install the miscd wrapper 76386d7f5d3SJohn Marinoat the original miscd location. 76486d7f5d3SJohn Marino 76586d7f5d3SJohn MarinoIn the absence of any access-control tables, the daemon wrappers 76686d7f5d3SJohn Marinowill just maintain a record of network connections made to your system. 76786d7f5d3SJohn Marino 76886d7f5d3SJohn Marino7.2 - Advanced configuration and installation 76986d7f5d3SJohn Marino--------------------------------------------- 77086d7f5d3SJohn Marino 77186d7f5d3SJohn MarinoThe advanced recipe leaves your daemon executables alone, but involves 77286d7f5d3SJohn Marinosimple modifications to the inetd configuration file. 77386d7f5d3SJohn Marino 77486d7f5d3SJohn MarinoType `make' and follow the instructions. The Makefile comes with 77586d7f5d3SJohn Marinoready-to-use templates for many common UNIX implementations (sun, 77686d7f5d3SJohn Marinoultrix, hp-ux, aix, irix, ...). 77786d7f5d3SJohn Marino 77886d7f5d3SJohn MarinoIRIX users should read the warnings in the README.IRIX file first. 77986d7f5d3SJohn Marino 78086d7f5d3SJohn MarinoWhen the `make' succeeds the result is five executables (six in case of 78186d7f5d3SJohn MarinoUltrix). 78286d7f5d3SJohn Marino 78386d7f5d3SJohn MarinoYou can use the `tcpdchk' program to identify the most common problems 78486d7f5d3SJohn Marinoin your wrapper and inetd configuration files. 78586d7f5d3SJohn Marino 78686d7f5d3SJohn MarinoWith the `tcpdmatch' program you can examine how the wrapper would 78786d7f5d3SJohn Marinoreact to specific requests for service. 78886d7f5d3SJohn Marino 78986d7f5d3SJohn MarinoThe `try-from' program tests the host and username lookup code. Run it 79086d7f5d3SJohn Marinofrom a remote shell command (`rsh host /some/where/try-from') and it 79186d7f5d3SJohn Marinoshould be able to figure out from what system it is being called. 79286d7f5d3SJohn Marino 79386d7f5d3SJohn MarinoThe `safe_finger' command should be used when you implement a booby 79486d7f5d3SJohn Marinotrap: it gives better protection against nasty stuff that remote hosts 79586d7f5d3SJohn Marinomay do in response to your finger probes. 79686d7f5d3SJohn Marino 79786d7f5d3SJohn MarinoThe tcpd program can be used to monitor the telnet, finger, ftp, exec, 79886d7f5d3SJohn Marinorsh, rlogin, tftp, talk, comsat and other tcp or udp services that have 79986d7f5d3SJohn Marinoa one-to-one mapping onto executable files. 80086d7f5d3SJohn Marino 80186d7f5d3SJohn MarinoWith System V.4-style systems, the tcpd program can also handle TLI 80286d7f5d3SJohn Marinoservices. When TCP/IP or UDP/IP is used underneath TLI, tcpd provides 80386d7f5d3SJohn Marinothe same functions as with socket-based applications. When some other 80486d7f5d3SJohn Marinoprotocol is used underneath TLI, functionality will be limited (no 80586d7f5d3SJohn Marinoclient username lookups, weird network address formats). 80686d7f5d3SJohn Marino 80786d7f5d3SJohn MarinoThe tcpd program can also be used for services that are marked as 80886d7f5d3SJohn Marinorpc/udp in the inetd configuration file, but not for rpc/tcp services 80986d7f5d3SJohn Marinosuch as rexd. You probably do not want to run rexd anyway. On most 81086d7f5d3SJohn Marinosystems it is even less secure than a wildcard in /etc/hosts.equiv. 81186d7f5d3SJohn Marino 81286d7f5d3SJohn MarinoInstall the tcpd command in a suitable place. Apollo UNIX users will 81386d7f5d3SJohn Marinowant to install it under a different name because the name "tcpd" is 81486d7f5d3SJohn Marinoalready taken; a suitable name would be "frontd". 81586d7f5d3SJohn Marino 81686d7f5d3SJohn MarinoFile protections: the wrapper, all files used by the wrapper, and all 81786d7f5d3SJohn Marinodirectories in the path leading to those files, should be accessible 81886d7f5d3SJohn Marinobut not writable for unprivileged users (mode 755 or mode 555). Do not 81986d7f5d3SJohn Marinoinstall the wrapper set-uid. 82086d7f5d3SJohn Marino 82186d7f5d3SJohn MarinoThen perform the following edits on the inetd configuration file 82286d7f5d3SJohn Marino(usually /etc/inetd.conf or /etc/inet/inetd.conf): 82386d7f5d3SJohn Marino 82486d7f5d3SJohn Marino finger stream tcp nowait nobody /usr/etc/in.fingerd in.fingerd 82586d7f5d3SJohn Marino ^^^^^^^^^^^^^^^^^^^ 82686d7f5d3SJohn Marinobecomes: 82786d7f5d3SJohn Marino 82886d7f5d3SJohn Marino finger stream tcp nowait nobody /usr/etc/tcpd in.fingerd 82986d7f5d3SJohn Marino ^^^^^^^^^^^^^ 83086d7f5d3SJohn MarinoSend a `kill -HUP' to the inetd process to make the change effective. 83186d7f5d3SJohn MarinoSome IRIX inetd implementations require that you first disable the 83286d7f5d3SJohn Marinofinger service (comment out the finger service and `kill -HUP' the 83386d7f5d3SJohn Marinoinetd) before you can turn on the modified version. Sending a HUP 83486d7f5d3SJohn Marinotwice seems to work just as well for IRIX 5.3, 6.0, 6.0.1 and 6.1. 83586d7f5d3SJohn Marino 83686d7f5d3SJohn MarinoAIX note: you may have to execute the `inetimp' command after changing 83786d7f5d3SJohn Marinothe inetd configuration file. 83886d7f5d3SJohn Marino 83986d7f5d3SJohn MarinoThe example applies to SunOS 4. With other UNIX implementations the 84086d7f5d3SJohn Marinonetwork daemons live in /usr/libexec, /usr/sbin, or /etc, the network 84186d7f5d3SJohn Marinodaemons have no "in." prefix to their names, or the username field in 84286d7f5d3SJohn Marinothe inetd configuration file may be missing. 84386d7f5d3SJohn Marino 84486d7f5d3SJohn MarinoWhen the finger service works as expected you can perform similar 84586d7f5d3SJohn Marinochanges for other network services. Do not forget the `kill -HUP'. 84686d7f5d3SJohn Marino 84786d7f5d3SJohn MarinoThe miscd daemon that comes with Ultrix implements several network 84886d7f5d3SJohn Marinoservices. It decides what to do by looking at its process name. One of 84986d7f5d3SJohn Marinothe services is systat, which is a kind of limited finger service. If 85086d7f5d3SJohn Marinoyou want to monitor the systat service, install the miscd wrapper in a 85186d7f5d3SJohn Marinosuitable place and update the inetd configuration file: 85286d7f5d3SJohn Marino 85386d7f5d3SJohn Marino systat stream tcp nowait /suitable/place/miscd systatd 85486d7f5d3SJohn Marino 85586d7f5d3SJohn MarinoUltrix 4.3 allows you to specify a user id under which the daemon will 85686d7f5d3SJohn Marinobe executed. This feature is not documented in the manual pages. Thus, 85786d7f5d3SJohn Marinothe example would become: 85886d7f5d3SJohn Marino 85986d7f5d3SJohn Marino systat stream tcp nowait nobody /suitable/place/miscd systatd 86086d7f5d3SJohn Marino 86186d7f5d3SJohn MarinoOlder Ultrix systems still run all their network daemons as root. 86286d7f5d3SJohn Marino 86386d7f5d3SJohn MarinoIn the absence of any access-control tables, the daemon wrappers 86486d7f5d3SJohn Marinowill just maintain a record of network connections made to your system. 86586d7f5d3SJohn Marino 86686d7f5d3SJohn Marino7.3 - Daemons with arbitrary path names 86786d7f5d3SJohn Marino--------------------------------------- 86886d7f5d3SJohn Marino 86986d7f5d3SJohn MarinoThe above tcpd examples work fine with network daemons that live in a 87086d7f5d3SJohn Marinocommon directory, but sometimes that is not practical. Having soft 87186d7f5d3SJohn Marinolinks all over your file system is not a clean solution, either. 87286d7f5d3SJohn Marino 87386d7f5d3SJohn MarinoInstead you can specify, in the inetd configuration file, an absolute 87486d7f5d3SJohn Marinopath name for the daemon process name. For example, 87586d7f5d3SJohn Marino 87686d7f5d3SJohn Marino ntalk dgram udp wait root /usr/etc/tcpd /usr/local/lib/ntalkd 87786d7f5d3SJohn Marino 87886d7f5d3SJohn MarinoWhen the daemon process name is an absolute path name, tcpd ignores the 87986d7f5d3SJohn Marinovalue of the REAL_DAEMON_DIR constant, and uses the last path component 88086d7f5d3SJohn Marinoof the daemon process name for logging and for access control. 88186d7f5d3SJohn Marino 88286d7f5d3SJohn Marino7.4 - Building and testing the access control rules 88386d7f5d3SJohn Marino--------------------------------------------------- 88486d7f5d3SJohn Marino 88586d7f5d3SJohn MarinoIn order to support access control the wrappers must be compiled with 88686d7f5d3SJohn Marinothe -DHOSTS_ACCESS option. The access control policy is given in the 88786d7f5d3SJohn Marinoform of two tables (default: /etc/hosts.allow and /etc/hosts.deny). 88886d7f5d3SJohn MarinoAccess control is disabled when there are no access control tables, or 88986d7f5d3SJohn Marinowhen the tables are empty. 89086d7f5d3SJohn Marino 89186d7f5d3SJohn MarinoIf you haven't used the wrappers before I recommend that you first run 89286d7f5d3SJohn Marinothem a couple of days without any access control restrictions. The 89386d7f5d3SJohn Marinologfile records should give you an idea of the process names and of the 89486d7f5d3SJohn Marinohost names that you will have to build into your access control rules. 89586d7f5d3SJohn Marino 89686d7f5d3SJohn MarinoThe syntax of the access control rules is documented in the file 89786d7f5d3SJohn Marinohosts_access.5, which is in `nroff -man' format. This is a lengthy 89886d7f5d3SJohn Marinodocument, and no-one expects you to read it right away from beginning 89986d7f5d3SJohn Marinoto end. Instead, after reading the introductory section, skip to the 90086d7f5d3SJohn Marinoexamples at the end so that you get a general idea of the language. 90186d7f5d3SJohn MarinoThen you can appreciate the detailed reference sections near the 90286d7f5d3SJohn Marinobeginning of the document. 90386d7f5d3SJohn Marino 90486d7f5d3SJohn MarinoThe examples in the hosts_access.5 document (`nroff -man' format) show 90586d7f5d3SJohn Marinotwo specific types of access control policy: 1) mostly closed (only 90686d7f5d3SJohn Marinopermitting access from a limited number of systems) and 2) mostly open 90786d7f5d3SJohn Marino(permitting access from everyone except a limited number of trouble 90886d7f5d3SJohn Marinomakers). You will have to choose what model suits your situation best. 90986d7f5d3SJohn MarinoImplementing a mixed policy should not be overly difficult either. 91086d7f5d3SJohn Marino 91186d7f5d3SJohn MarinoOptional extensions to the access control language are described in the 91286d7f5d3SJohn Marinohosts_options.5 document (`nroff -man' format). 91386d7f5d3SJohn Marino 91486d7f5d3SJohn MarinoThe `tcpdchk' program examines all rules in your access control files 91586d7f5d3SJohn Marinoand reports any problems it can find. `tcpdchk -v' writes to standard 91686d7f5d3SJohn Marinooutput a pretty-printed list of all rules. `tcpdchk -d' examines the 91786d7f5d3SJohn Marinohosts.access and hosts.allow files in the current directory. This 91886d7f5d3SJohn Marinoprogram is described in the tcpdchk.8 document (`nroff -man' format). 91986d7f5d3SJohn Marino 92086d7f5d3SJohn MarinoThe `tcpdmatch' command can be used to try out your local access 92186d7f5d3SJohn Marinocontrol files. The command syntax is: 92286d7f5d3SJohn Marino 92386d7f5d3SJohn Marino tcpdmatch process_name hostname (e.g.: tcpdmatch in.tftpd localhost) 92486d7f5d3SJohn Marino 92586d7f5d3SJohn Marino tcpdmatch process_name address (e.g.: tcpdmatch in.tftpd 127.0.0.1) 92686d7f5d3SJohn Marino 92786d7f5d3SJohn MarinoThis way you can simulate what decisions will be made, and what actions 92886d7f5d3SJohn Marinowill be taken, when hosts connect to your own system. The program is 92986d7f5d3SJohn Marinodescribed in the tcpdmatch.8 document (`nroff -man' format). 93086d7f5d3SJohn Marino 93186d7f5d3SJohn MarinoNote 1: `tcpdmatch -d' will look for hosts.{allow,deny} tables in the 93286d7f5d3SJohn Marinocurrent working directory. This is useful for testing new rules without 93386d7f5d3SJohn Marinobothering your users. 93486d7f5d3SJohn Marino 93586d7f5d3SJohn MarinoNote 2: you cannot use the `tcpdmatch' command to simulate what happens 93686d7f5d3SJohn Marinowhen the local system connects to other hosts. 93786d7f5d3SJohn Marino 93886d7f5d3SJohn MarinoIn order to find out what process name to use, just use the service and 93986d7f5d3SJohn Marinowatch the process name that shows up in the logfile. Alternatively, 94086d7f5d3SJohn Marinoyou can look up the name from the inetd configuration file. Coming back 94186d7f5d3SJohn Marinoto the tftp example in the tutorial section above: 94286d7f5d3SJohn Marino 94386d7f5d3SJohn Marino tftp dgram udp wait root /usr/etc/tcpd in.tftpd -s /tftpboot 94486d7f5d3SJohn Marino 94586d7f5d3SJohn MarinoThis entry causes the inetd to run the wrapper program (tcpd) with a 94686d7f5d3SJohn Marinoprocess name `in.tftpd'. This is the name that the wrapper will use 94786d7f5d3SJohn Marinowhen scanning the access control tables. Therefore, `in.tftpd' is the 94886d7f5d3SJohn Marinoprocess name that should be given to the `tcpdmatch' command. On your 94986d7f5d3SJohn Marinosystem the actual inetd.conf entry may differ (tftpd instead of 95086d7f5d3SJohn Marinoin.tftpd, and no `root' field), but you get the idea. 95186d7f5d3SJohn Marino 95286d7f5d3SJohn MarinoWhen you specify a host name, the `tcpdmatch' program will use both the 95386d7f5d3SJohn Marinohost name and address. This way you can simulate the most common case 95486d7f5d3SJohn Marinowhere the wrappers know both the host address and the host name. The 95586d7f5d3SJohn Marino`tcpdmatch' program will iterate over all addresses that it can find 95686d7f5d3SJohn Marinofor the given host name. 95786d7f5d3SJohn Marino 95886d7f5d3SJohn MarinoWhen you specify a host address instead of a host name, the `tcpdmatch' 95986d7f5d3SJohn Marinoprogram will pretend that the host name is unknown, so that you can 96086d7f5d3SJohn Marinosimulate what happens when the wrapper is unable to look up the client 96186d7f5d3SJohn Marinohost name. 96286d7f5d3SJohn Marino 96386d7f5d3SJohn Marino7.5 - Other applications 96486d7f5d3SJohn Marino------------------------ 96586d7f5d3SJohn Marino 96686d7f5d3SJohn MarinoThe access control routines can easily be integrated with other 96786d7f5d3SJohn Marinoprograms. The hosts_access.3 manual page (`nroff -man' format) 96886d7f5d3SJohn Marinodescribes the external interface of the libwrap.a library. 96986d7f5d3SJohn Marino 97086d7f5d3SJohn MarinoThe tcpd program can even be used to control access to the mail 97186d7f5d3SJohn Marinoservice. This can be useful when you suspect that someone is trying 97286d7f5d3SJohn Marinoout some obscure sendmail bug, or when a remote site is misconfigured 97386d7f5d3SJohn Marinoand keeps hammering your mail daemon. 97486d7f5d3SJohn Marino 97586d7f5d3SJohn MarinoIn that case, sendmail should not be run as a stand-alone network 97686d7f5d3SJohn Marinolistener, but it should be registered in the inetd configuration file. 97786d7f5d3SJohn MarinoFor example: 97886d7f5d3SJohn Marino 97986d7f5d3SJohn Marino smtp stream tcp nowait root /usr/etc/tcpd /usr/lib/sendmail -bs 98086d7f5d3SJohn Marino 98186d7f5d3SJohn MarinoYou will still need to run one sendmail background process to handle 98286d7f5d3SJohn Marinoqueued-up outgoing mail. A command like: 98386d7f5d3SJohn Marino 98486d7f5d3SJohn Marino /usr/lib/sendmail -q15m 98586d7f5d3SJohn Marino 98686d7f5d3SJohn Marino(no `-bd' flag) should take care of that. You cannot really prevent 98786d7f5d3SJohn Marinopeople from posting forged mail this way, because there are many 98886d7f5d3SJohn Marinounprotected smtp daemons on the network. 98986d7f5d3SJohn Marino 99086d7f5d3SJohn Marino8 - Acknowledgements 99186d7f5d3SJohn Marino-------------------- 99286d7f5d3SJohn Marino 99386d7f5d3SJohn MarinoMany people contributed to the evolution of the programs, by asking 99486d7f5d3SJohn Marinoinspiring questions, by suggesting features or bugfixes, or by 99586d7f5d3SJohn Marinosubmitting source code. Nevertheless, all mistakes and bugs in the 99686d7f5d3SJohn Marinowrappers are my own. 99786d7f5d3SJohn Marino 99886d7f5d3SJohn MarinoThanks to Brendan Kehoe (cs.widener.edu), Heimir Sverrisson (hafro.is) 99986d7f5d3SJohn Marinoand Dan Bernstein (kramden.acf.nyu.edu) for feedback on an early 100086d7f5d3SJohn Marinorelease of this product. The host name/address check was suggested by 100186d7f5d3SJohn MarinoJohn Kimball (src.honeywell.com). Apollo's UNIX environment has some 100286d7f5d3SJohn Marinopeculiar quirks: Willem-Jan Withagen (eb.ele.tue.nl), Pieter 100386d7f5d3SJohn MarinoSchoenmakers (es.ele.tue.nl) and Charles S. Fuller (wccs.psc.edu) 100486d7f5d3SJohn Marinoprovided assistance. Hal R. Brand (addvax.llnl.gov) told me how to 100586d7f5d3SJohn Marinoget the client IP address in case of datagram-oriented services, and 100686d7f5d3SJohn Marinosuggested the optional shell command feature. Shabbir Safdar 100786d7f5d3SJohn Marino(mentor.cc.purdue.edu) provided a first version of a much-needed manual 100886d7f5d3SJohn Marinopage. Granville Boman Goza, IV (sei.cmu.edu) suggested to use the 100986d7f5d3SJohn Marinoclient IP address even when the host name is available. Casper H.S. 101086d7f5d3SJohn MarinoDik (fwi.uva.nl) provided additional insight into DNS spoofing 101186d7f5d3SJohn Marinotechniques. The bogus daemon feature was inspired by code from Andrew 101286d7f5d3SJohn MarinoMacpherson (BNR Europe Ltd). Steve Bellovin (research.att.com) 101386d7f5d3SJohn Marinoconfirmed some of my suspicions about the darker sides of TCP/IP 101486d7f5d3SJohn Marinoinsecurity. Risks of automated fingers were pointed out by Borja Marcos 101586d7f5d3SJohn Marino(we.lc.ehu.es). Brad Plecs (jhuspo.ca.jhu.edu) was kind enough to try 101686d7f5d3SJohn Marinomy early TLI code and to work out how DG/UX differs from Solaris. 101786d7f5d3SJohn Marino 101886d7f5d3SJohn MarinoJohn P. Rouillard (cs.umb.edu) deserves special mention for his 101986d7f5d3SJohn Marinopersistent, but constructive, nagging about wrong or missing things, 102086d7f5d3SJohn Marinoand for trying out and discussing embryonic code or ideas. 102186d7f5d3SJohn Marino 102286d7f5d3SJohn MarinoLast but not least, Howard Chu (hanauma.jpl.nasa.gov), Darren Reed 102386d7f5d3SJohn Marino(coombs.anu.edu.au), Icarus Sparry (gdr.bath.ac.uk), Scott Schwartz 102486d7f5d3SJohn Marino(cs.psu.edu), John A. Kunze (violet.berkeley.edu), Daniel Len Schales 102586d7f5d3SJohn Marino(engr.latech.edu), Chris Turbeville (cse.uta.edu), Paul Kranenburg 102686d7f5d3SJohn Marino(cs.few.eur.nl), Marc Boucher (cam.org), Dave Mitchell 102786d7f5d3SJohn Marino(dcs.shef.ac.uk), Andrew Maffei, Adrian van Bloois, Rop Gonggrijp, John 102886d7f5d3SJohn MarinoC. Wingenbach, Everett F. Batey and many, many others provided fixes, 102986d7f5d3SJohn Marinocode fragments, or ideas for improvements. 103086d7f5d3SJohn Marino 103186d7f5d3SJohn Marino Wietse Venema (wietse@wzv.win.tue.nl) 103286d7f5d3SJohn Marino Department of Mathematics and Computing Science 103386d7f5d3SJohn Marino Eindhoven University of Technology 103486d7f5d3SJohn Marino P.O. Box 513 103586d7f5d3SJohn Marino 5600 MB Eindhoven 103686d7f5d3SJohn Marino The Netherlands 103786d7f5d3SJohn Marino 103886d7f5d3SJohn Marino Currently visiting IBM T.J. Watson Research, Hawthorne NY, USA. 1039