Manual Reference Pages - TCPSVD (8)
tcpsvd - TCP/IP service daemon
tcpsvd [-hpEvv] [-c
cdb] [ -t
tcpsvd creates a TCP/IP socket, binds it to the address
host:port, and listens on the socket for incoming connections.
On each incoming connection,
tcpsvd conditionally runs a program, with standard input reading from the socket,
and standard output writing to the socket, to handle this connection.
tcpsvd keeps listening on the socket for new connections, and can handle multiple
tcpsvd optionally checks for special instructions depending on the IP address or
hostname of the client that initiated the connection, see
host either is a hostname, or a dotted-decimal IP address, or 0.
host is 0,
tcpsvd accepts connections to any local IP address.
tcpsvd accepts connections to
port may be a name from /etc/services or a number.
prog consists of one or more arguments.
For each connection,
tcpsvd normally runs
prog, with file descriptor 0 reading from the network, and file descriptor 1
writing to the network.
By default it also sets up TCP-related environment variables, see
-i dir ||
read instructions for handling new connections from the instructions
-x cdb ||
read instructions for handling new connections from the constant database
cdb. The constant database normally is created from an instructions directory by
-t sec ||
This option only takes effect if the -i option is given.
While checking the instructions directory, check the time of last access of
the file that matches the clients address or hostname if any, discard and
remove the file if it wasnt accessed within the last
tcpsvd does not discard or remove a file if the users write permission is not set,
for those files the timeout is disabled.
Default is 0, which means that the timeout is disabled.
-l name ||
Do not look up the local hostname in DNS, but use
name as hostname.
This option must be set if
tcpsvd listens on port 53 to avoid loops.
-u [:]user[:group] |
Set uid and gid to the
users uid and gid, as found in
/etc/passwd, before running
user is followed by a colon and a
group, set the gid to
groups gid, as found in
/etc/group, instead of
group consists of a colon-separated list of group names,
set the group ids of all listed groups.
user is prefixed with a colon, the
user and all
group arguments are interpreted as uid and gids respectively, and not looked up in
the password or group file.
All supplementary groups are removed.
-c n ||
Handle up to
n connections simultaneously.
Default is 30.
If there are
n connections active,
tcpsvd defers acceptance of a new connection until an active connection is closed.
-C n[:msg] |
per host concurrency.
Allow only up to
n connections from the same IP address simultaneously.
If there are
n active connections from one IP address, new incoming connections from this IP
address are closed immediately.
n is followed by
:msg, the message
msg is written to the client if possible, before closing the connection.
msg is empty.
for supported escape sequences in
For each accepted connection, the current per host concurrency is available
through the environment variable
msg can be overwritten by
tcpsvd doesnt keep track of connections.
Look up the clients hostname in DNS.
After looking up the clients hostname in DNS, look up the IP addresses in
DNS for that hostname, and forget about the hostname if none of the addresses
match the clients IP address.
You should set this option if you use hostname based instructions.
The -p option implies the -h option.
-b n ||
Allow a backlog of approximately
n TCP SYNs.
On some systems
n is silently limited.
Default is 20.
no special environment.
Do not set up TCP-related environment variables.
Print verbose messsages to standard output.
Print more verbose messages to standard output.
Gerrit Pape <firstname.lastname@example.org>
Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.