[BACK]Return to hosts_options.5 CVS log [TXT][DIR] Up to [cvs.NetBSD.org] / src / lib / libwrap

File: [cvs.NetBSD.org] / src / lib / libwrap / hosts_options.5 (download)

Revision 1.8, Tue Oct 1 19:38:46 2002 UTC (19 years ago) by wiz
Branch: MAIN
CVS Tags: yamt-pf42-baseX, yamt-pf42-base4, yamt-pf42-base3, yamt-pf42-base2, yamt-pf42-base, yamt-pf42, yamt-pagecache-tag8, yamt-pagecache-base9, yamt-pagecache-base8, yamt-pagecache-base7, yamt-pagecache-base6, yamt-pagecache-base5, yamt-pagecache-base4, yamt-pagecache-base3, yamt-pagecache-base2, yamt-pagecache-base, yamt-pagecache, wrstuden-revivesa-base-3, wrstuden-revivesa-base-2, wrstuden-revivesa-base-1, wrstuden-revivesa-base, wrstuden-revivesa, wrstuden-fixsa-newbase, wrstuden-fixsa-base-1, wrstuden-fixsa-base, wrstuden-fixsa, tls-maxphys-base, tls-maxphys, tls-earlyentropy-base, tls-earlyentropy, riastradh-xf86-video-intel-2-7-1-pre-2-21-15, riastradh-drm2-base3, riastradh-drm2-base2, riastradh-drm2-base1, riastradh-drm2-base, riastradh-drm2, prg-localcount2-base3, prg-localcount2-base2, prg-localcount2-base1, prg-localcount2-base, prg-localcount2, pgoyette-localcount-base, pgoyette-localcount-20170426, pgoyette-localcount-20170320, pgoyette-localcount-20170107, pgoyette-localcount-20161104, pgoyette-localcount-20160806, pgoyette-localcount-20160726, pgoyette-localcount, netbsd-8-base, netbsd-8-2-RELEASE, netbsd-8-1-RELEASE, netbsd-8-1-RC1, netbsd-8-0-RELEASE, netbsd-8-0-RC2, netbsd-8-0-RC1, netbsd-8, netbsd-7-nhusb-base-20170116, netbsd-7-nhusb-base, netbsd-7-nhusb, netbsd-7-base, netbsd-7-2-RELEASE, netbsd-7-1-RELEASE, netbsd-7-1-RC2, netbsd-7-1-RC1, netbsd-7-1-2-RELEASE, netbsd-7-1-1-RELEASE, netbsd-7-1, netbsd-7-0-RELEASE, netbsd-7-0-RC3, netbsd-7-0-RC2, netbsd-7-0-RC1, netbsd-7-0-2-RELEASE, netbsd-7-0-1-RELEASE, netbsd-7-0, netbsd-7, netbsd-6-base, netbsd-6-1-RELEASE, netbsd-6-1-RC4, netbsd-6-1-RC3, netbsd-6-1-RC2, netbsd-6-1-RC1, netbsd-6-1-5-RELEASE, netbsd-6-1-4-RELEASE, netbsd-6-1-3-RELEASE, netbsd-6-1-2-RELEASE, netbsd-6-1-1-RELEASE, netbsd-6-1, netbsd-6-0-RELEASE, netbsd-6-0-RC2, netbsd-6-0-RC1, netbsd-6-0-6-RELEASE, netbsd-6-0-5-RELEASE, netbsd-6-0-4-RELEASE, netbsd-6-0-3-RELEASE, netbsd-6-0-2-RELEASE, netbsd-6-0-1-RELEASE, netbsd-6-0, netbsd-6, netbsd-5-base, netbsd-5-2-RELEASE, netbsd-5-2-RC1, netbsd-5-2-3-RELEASE, netbsd-5-2-2-RELEASE, netbsd-5-2-1-RELEASE, netbsd-5-2, netbsd-5-1-RELEASE, netbsd-5-1-RC4, netbsd-5-1-RC3, netbsd-5-1-RC2, netbsd-5-1-RC1, netbsd-5-1-5-RELEASE, netbsd-5-1-4-RELEASE, netbsd-5-1-3-RELEASE, netbsd-5-1-2-RELEASE, netbsd-5-1-1-RELEASE, netbsd-5-1, netbsd-5-0-RELEASE, netbsd-5-0-RC4, netbsd-5-0-RC3, netbsd-5-0-RC2, netbsd-5-0-RC1, netbsd-5-0-2-RELEASE, netbsd-5-0-1-RELEASE, netbsd-5-0, netbsd-5, netbsd-4-base, netbsd-4-0-RELEASE, netbsd-4-0-RC5, netbsd-4-0-RC4, netbsd-4-0-RC3, netbsd-4-0-RC2, netbsd-4-0-RC1, netbsd-4-0-1-RELEASE, netbsd-4-0, netbsd-4, netbsd-3-base, netbsd-3-1-RELEASE, netbsd-3-1-RC4, netbsd-3-1-RC3, netbsd-3-1-RC2, netbsd-3-1-RC1, netbsd-3-1-1-RELEASE, netbsd-3-1, netbsd-3-0-RELEASE, netbsd-3-0-RC6, netbsd-3-0-RC5, netbsd-3-0-RC4, netbsd-3-0-RC3, netbsd-3-0-RC2, netbsd-3-0-RC1, netbsd-3-0-3-RELEASE, netbsd-3-0-2-RELEASE, netbsd-3-0-1-RELEASE, netbsd-3-0, netbsd-3, netbsd-2-base, netbsd-2-1-RELEASE, netbsd-2-1-RC6, netbsd-2-1-RC5, netbsd-2-1-RC4, netbsd-2-1-RC3, netbsd-2-1-RC2, netbsd-2-1-RC1, netbsd-2-1, netbsd-2-0-base, netbsd-2-0-RELEASE, netbsd-2-0-RC5, netbsd-2-0-RC4, netbsd-2-0-RC3, netbsd-2-0-RC2, netbsd-2-0-RC1, netbsd-2-0-3-RELEASE, netbsd-2-0-2-RELEASE, netbsd-2-0-1-RELEASE, netbsd-2-0, netbsd-2, mjf-devfs2-base, mjf-devfs2, matt-premerge-20091211, matt-nb8-mediatek-base, matt-nb8-mediatek, matt-nb6-plus-nbase, matt-nb6-plus-base, matt-nb6-plus, matt-nb5-pq3-base, matt-nb5-pq3, matt-nb5-mips64-u2-k2-k4-k7-k8-k9, matt-nb5-mips64-u1-k1-k5, matt-nb5-mips64-premerge-20101231, matt-nb5-mips64-premerge-20091211, matt-nb5-mips64-k15, matt-nb5-mips64, matt-nb4-mips64-k7-u2a-k9b, matt-mips64-premerge-20101231, matt-mips64-base2, matt-mips64-base, matt-mips64, matt-armv6-prevmlocking, matt-armv6-nbase, matt-armv6-base, matt-armv6, localcount-20160914, keiichi-mipv6-base, keiichi-mipv6, jym-xensuspend-nbase, jym-xensuspend-base, jym-xensuspend, hpcarm-cleanup-nbase, hpcarm-cleanup-base, hpcarm-cleanup, fvdl_fs64_base, cube-autoconf-base, cube-autoconf, cherry-xenmp-base, cherry-xenmp, bouyer-socketcan-base1, bouyer-socketcan-base, bouyer-socketcan, bouyer-quota2-nbase, bouyer-quota2-base, bouyer-quota2, agc-symver-base, agc-symver, abandoned-netbsd-4-base, abandoned-netbsd-4
Changes since 1.7: +55 -41 lines

New sentence, new line. From Robert Elz.

.\"	$NetBSD: hosts_options.5,v 1.8 2002/10/01 19:38:46 wiz Exp $
hosts_options \- host access control language extensions
This document describes optional extensions to the language described
in the hosts_access(5) document.
The extensions are enabled at program build time.
For example, by editing the Makefile and turning on the
PROCESS_OPTIONS compile-time option.
The extensible language uses the following format:
.ti +3
daemon_list : client_list : option : option ...
The first two fields are described in the hosts_access(5) manual page.
The remainder of the rules is a list of zero or more options.
Any ":" characters within options should be protected with a backslash.
An option is of the form "keyword" or "keyword value".
Options are processed in the specified order.
Some options are subjected to
%\*[Lt]letter\*[Gt] substitutions.
For the sake of backwards compatibility with
earlier versions, an "=" is permitted between keyword and value.
.IP "severity mail.info"
.IP "severity notice"
Change the severity level at which the event will be logged.
Facility names (such as mail) are optional, and are not supported on systems
with older syslog implementations.
The severity option can be used to emphasize or to ignore specific events.
.IP "allow"
.IP "deny"
Grant (deny) service.
These options must appear at the end of a rule.
The \fIallow\fR and \fIdeny\fR keywords make it possible to keep all
access control rules within a single file, for example in the
\fIhosts.allow\fR file.
To permit access from specific hosts only:
.ne 2
.ti +3
ALL: .friendly.domain: ALLOW
.ti +3
To permit access from all hosts except a few trouble makers:
.ne 2
.ti +3
ALL: .bad.domain: DENY
.ti +3
Notice the leading dot on the domain name patterns.
.IP "spawn shell_command"
Execute, in a child process, the specified shell command, after
performing the %\*[Lt]letter\*[Gt] expansions described in the hosts_access(5)
manual page.
The command is executed with stdin, stdout and stderr
connected to the null device, so that it won\'t mess up the
conversation with the client host.
.ti +3
spawn (/some/where/safe_finger -l @%h | /usr/ucb/mail root) \*[Am]
executes, in a background child process, the shell command "safe_finger
-l @%h | mail root" after replacing %h by the name or address of the
remote host.
The example uses the "safe_finger" command instead of the regular
"finger" command, to limit possible damage from data sent by the finger server.
The "safe_finger" command is part of the daemon wrapper
package; it is a wrapper around the regular finger command that filters
the data sent by the remote host.
.IP "twist shell_command"
Replace the current process by an instance of the specified shell
command, after performing the %\*[Lt]letter\*[Gt] expansions described in the
hosts_access(5) manual page.
Stdin, stdout and stderr are connected to the client process.
This option must appear at the end of a rule.
To send a customized bounce message to the client instead of
running the real ftp daemon:
.ti +3
in.ftpd : ... : twist /bin/echo 421 Some bounce message
For an alternative way to talk to client processes, see the
\fIbanners\fR option below.
To run /some/other/in.telnetd without polluting its command-line
array or its process environment:
.ti +3
in.telnetd : ... : twist PATH=/some/other; exec in.telnetd
Warning:  in case of UDP services, do not twist to commands that use
the standard I/O or the read(2)/write(2) routines to communicate with
the client process; UDP requires other I/O primitives.
.IP "keepalive"
Causes the server to periodically send a message to the client.
The connection is considered broken when the client does not respond.
The keepalive option can be useful when users turn off their
machine while it is still connected to a server.
The keepalive option is not useful for datagram (UDP) services.
.IP "linger number_of_seconds"
Specifies how long the kernel will try to deliver not-yet delivered
data after the server process closes a connection.
.IP "rfc931 [ timeout_in_seconds ]"
Look up the client user name with the RFC 931 (TAP, IDENT, RFC 1413)
This option is silently ignored in case of services based on
transports other than TCP.
It requires that the client system runs an RFC 931 (IDENT, etc.)
-compliant daemon, and may cause noticeable
delays with connections from non-UNIX clients.
The timeout period is optional.
If no timeout is specified a compile-time defined default
value is taken.
.IP "banners /some/directory"
Look for a file in `/some/directory' with the same name as the daemon
process (for example in.telnetd for the telnet service), and copy its
contents to the client.
Newline characters are replaced by carriage-return newline,
and %\*[Lt]letter\*[Gt] sequences are expanded (see
the hosts_access(5) manual page).
The tcp wrappers source code distribution provides a sample makefile
(Banners.Makefile) for convenient banner maintenance.
Warning: banners are supported for connection-oriented (TCP) network
services only.
.IP "nice [ number ]"
Change the nice value of the process (default 10).
Specify a positive value to spend more CPU resources on other processes.
.IP "setenv name value"
Place a (name, value) pair into the process environment.
The value is subjected to %\*[Lt]letter\*[Gt] expansions and
may contain whitespace (but leading and trailing blanks are stripped off).
Warning: many network daemons reset their environment before spawning a
login or shell process.
.IP "umask 022"
Like the umask command that is built into the shell.
An umask of 022 prevents the creation of files with group
and world write permission.
The umask argument should be an octal number.
.IP "user nobody"
.IP "user nobody.kmem"
Assume the privileges of the "nobody" userid (or user "nobody", group
The first form is useful with inetd implementations that run
all services with root privilege.
The second form is useful for services that need
special group privileges only.
When a syntax error is found in an access control rule, the error
is reported to the syslog daemon; further options will be ignored,
and service is denied.
hosts_access(5), the default access control language
Wietse Venema (wietse@wzv.win.tue.nl)
Department of Mathematics and Computing Science
Eindhoven University of Technology
Den Dolech 2, P.O. Box 513,
5600 MB Eindhoven, The Netherlands
\" @(#) hosts_options.5 1.10 94/12/28 17:42:28