xref: /freebsd/usr.sbin/rpcbind/rpcbind.8 (revision 328110da2661a8841f12000b99fea27ceacdd5b2)
1.\" Copyright 1989 AT&T
2.\" Copyright 1991 Sun Microsystems, Inc.
3.Dd May 30, 2025
4.Dt RPCBIND 8
5.Os
6.Sh NAME
7.Nm rpcbind
8.Nd universal addresses to RPC program number mapper
9.Sh SYNOPSIS
10.Nm
11.Op Fl 6adIiLlNPswW
12.Op Fl h Ar bindip
13.Sh DESCRIPTION
14The
15.Nm
16utility is a server that converts
17.Tn RPC
18program numbers into
19universal addresses.
20It must be running on the host to be able to make
21.Tn RPC
22calls
23on a server on that machine.
24.Pp
25When an
26.Tn RPC
27service is started,
28it tells
29.Nm
30the address at which it is listening,
31and the
32.Tn RPC
33program numbers it is prepared to serve.
34When a client wishes to make an
35.Tn RPC
36call to a given program number,
37it first contacts
38.Nm
39on the server machine to determine
40the address where
41.Tn RPC
42requests should be sent.
43.Pp
44The
45.Nm
46utility should be started before any other RPC service.
47Normally, standard
48.Tn RPC
49servers are started by port monitors, so
50.Nm
51must be started before port monitors are invoked.
52.Pp
53When
54.Nm
55is started, it checks that certain name-to-address
56translation-calls function correctly.
57If they fail, the network configuration databases may be corrupt.
58Since
59.Tn RPC
60services cannot function correctly in this situation,
61.Nm
62reports the condition and terminates.
63.Pp
64The
65.Nm
66utility can only be started by the super-user.
67.Sh OPTIONS
68.Bl -tag -width indent
69.It Fl 6
70Bind to AF_INET6 (IPv6) addresses only.
71.It Fl a
72When debugging
73.Pq Fl d ,
74do an abort on errors.
75.It Fl d
76Run in debug mode.
77In this mode,
78.Nm
79will not fork when it starts, will print additional information
80during operation, and will abort on certain errors if
81.Fl a
82is also specified.
83With this option, the name-to-address translation consistency
84checks are shown in detail.
85.It Fl h Ar bindip
86IP addresses to bind to when servicing TCP and UDP requests.
87This option
88may be specified multiple times and is typically necessary when running
89on a multi-homed host.
90If no
91.Fl h
92option is specified,
93.Nm
94will bind to
95.Dv INADDR_ANY ,
96which could lead to problems on a multi-homed host due to
97.Nm
98returning a UDP packet from a different IP address than it was
99sent to.
100Note that when specifying IP addresses with
101.Fl h ,
102and no
103.Fl I
104option is specified,
105.Nm
106will automatically add
107.Li 127.0.0.1
108and if IPv6 is enabled,
109.Li ::1
110to the list.
111.It Fl I
112Cause
113.Nm
114not to bind to the localhost when
115.Fl h
116has been specified.
117.It Fl i
118.Dq Insecure
119mode.
120Allow calls to SET and UNSET from any host.
121Normally
122.Nm
123accepts these requests only from the loopback interface for security reasons.
124This change is necessary for programs that were compiled with earlier
125versions of the rpc library and do not make those requests using the
126loopback interface.
127.It Fl L
128Allow old-style local connections over the loopback interface.
129Without this flag, local connections are only allowed over a local socket,
130.Pa /var/run/rpcbind.sock .
131.It Fl l
132Turn on libwrap connection logging.
133.It Fl N
134Run in foreground mode.
135In this mode,
136.Nm
137will not fork when it starts.
138.It Fl P
139Specify alternative location of a file where main process PID will be stored.
140The default location is
141.Pa /var/run/rpcbind.pid .
142.It Fl s
143Cause
144.Nm
145to change to the user daemon as soon as possible.
146This causes
147.Nm
148to use non-privileged ports for outgoing connections, preventing non-privileged
149clients from using
150.Nm
151to connect to services from a privileged port.
152.It Fl W
153Enable libwrap (TCP wrappers) support.
154.It Fl w
155Enable the warmstart feature.
156.Pp
157The warmstart feature saves RPC registrations on termination.
158Any saved RPC registrations are restored on restart if
159.Fl w
160is specified.
161This feature helps avoid RPC service interruption when restarting
162.Nm .
163warmstart support must be compiled in to
164.Nm .
165Portmap registrations are stored in
166.Pa /tmp/portmap.file .
167.Nm
168registrations are stored in
169.Pa /tmp/rpcbind.file .
170.El
171.Sh NOTES
172All RPC servers must be restarted if
173.Nm
174is restarted.
175.Sh FILES
176.Bl -tag -width /var/run/rpcbind.sock -compact
177.It Pa /tmp/portmap.file
178saved portmap registrations file.
179.It Pa /tmp/rpcbind.file
180saved
181.Nm
182registrations file.
183.It Pa /var/run/rpcbind.sock
184socket used for local connections.
185.El
186.Sh SEE ALSO
187.Xr rpcbind 3 ,
188.Xr netconfig 5 ,
189.Xr rpcinfo 8
190