Initial import from FreeBSD RELENG_4:
[dragonfly.git] / usr.sbin / portmap / portmap.8
1 .\" Copyright (c) 1987 Sun Microsystems
2 .\" Copyright (c) 1990, 1991, 1993
3 .\"     The Regents of the University of California.  All rights reserved.
4 .\"
5 .\" Redistribution and use in source and binary forms, with or without
6 .\" modification, are permitted provided that the following conditions
7 .\" are met:
8 .\" 1. Redistributions of source code must retain the above copyright
9 .\"    notice, this list of conditions and the following disclaimer.
10 .\" 2. Redistributions in binary form must reproduce the above copyright
11 .\"    notice, this list of conditions and the following disclaimer in the
12 .\"    documentation and/or other materials provided with the distribution.
13 .\" 3. All advertising materials mentioning features or use of this software
14 .\"    must display the following acknowledgement:
15 .\"     This product includes software developed by the University of
16 .\"     California, Berkeley and its contributors.
17 .\" 4. Neither the name of the University nor the names of its contributors
18 .\"    may be used to endorse or promote products derived from this software
19 .\"    without specific prior written permission.
20 .\"
21 .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
22 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
23 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
25 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
27 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
28 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
29 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
30 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
31 .\" SUCH DAMAGE.
32 .\"
33 .\"     @(#)portmap.8   8.1 (Berkeley) 6/6/93
34 .\" $FreeBSD: src/usr.sbin/portmap/portmap.8,v 1.7.2.4 2002/04/04 11:00:38 dd Exp $
35 .\"
36 .Dd June 6, 1993
37 .Dt PORTMAP 8
38 .Os
39 .Sh NAME
40 .Nm portmap
41 .Nd
42 .Tn RPC
43 program,version
44 to
45 .Tn DARPA
46 port mapper
47 .Sh SYNOPSIS
48 .Nm
49 .Op Fl d
50 .Op Fl v
51 .Op Fl h Ar bindip
52 .Sh DESCRIPTION
53 .Nm Portmap
54 is a server that converts
55 .Tn RPC
56 program numbers into
57 .Tn DARPA
58 protocol port numbers.
59 It must be running in order to make
60 .Tn RPC
61 calls.
62 .Pp
63 When an
64 .Tn RPC
65 server is started, it will tell
66 .Nm
67 what port number it is listening to, and what
68 .Tn RPC
69 program numbers it is prepared to serve.
70 When a client wishes to make an
71 .Tn RPC
72 call to a given program number,
73 it will first contact
74 .Nm
75 on the server machine to determine
76 the port number where
77 .Tn RPC
78 packets should be sent.
79 .Pp
80 .Nm Portmap
81 must be started before any
82 .Tn RPC
83 servers are invoked.
84 .Pp
85 .Nm Portmap
86 uses
87 .Xr hosts_access 5
88 access control by default.
89 Access control patterns may only reference IP addresses.
90 .Pp
91 Normally
92 .Nm
93 forks and dissociates itself from the terminal
94 like any other daemon.
95 .Nm Portmap
96 then logs errors using
97 .Xr syslog 3 .
98 .Pp
99 The following options are available:
100 .Bl -tag -width indent
101 .It Fl d
102 Prevent
103 .Nm
104 from running as a daemon,
105 and causes errors and debugging information
106 to be printed to the standard error output.
107 .It Fl v
108 Enable verbose logging of access control checks.
109 .It Fl h
110 Specify specific IP addresses to bind to for UDP requests.
111 This option
112 may be specified multiple times and is typically necessary when running
113 on a multi-homed host.
114 If no
115 .Fl h
116 option is specified,
117 .Nm
118 will bind to
119 .Dv INADDR_ANY ,
120 which could lead to problems on a multi-homed host due to
121 .Nm
122 returning a UDP packet from a different IP address than it was
123 sent to.
124 Note that when specifying IP addresses with
125 .Fl h ,
126 .Nm
127 will automatically add
128 .Li 127.0.0.1
129 to the list.
130 .El
131 .Sh SEE ALSO
132 .Xr hosts_access 5 ,
133 .Xr inetd.conf 5 ,
134 .Xr inetd 8 ,
135 .Xr rpcinfo 8
136 .Sh BUGS
137 If
138 .Nm
139 crashes, all servers must be restarted.
140 .Sh HISTORY
141 The
142 .Nm
143 command appeared in
144 .Bx 4.3 .