xref: /freebsd/usr.sbin/rpcbind/rpcbind.8 (revision 069ac18495ad8fde2748bc94b0f80a50250bb01d)
1.\" Copyright 1989 AT&T
2.\" Copyright 1991 Sun Microsystems, Inc.
3.Dd August 31, 2023
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 6adiLlNswW
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 ,
102.Nm
103will automatically add
104.Li 127.0.0.1
105and if IPv6 is enabled,
106.Li ::1
107to the list.
108.It Fl i
109.Dq Insecure
110mode.
111Allow calls to SET and UNSET from any host.
112Normally
113.Nm
114accepts these requests only from the loopback interface for security reasons.
115This change is necessary for programs that were compiled with earlier
116versions of the rpc library and do not make those requests using the
117loopback interface.
118.It Fl L
119Allow old-style local connections over the loopback interface.
120Without this flag, local connections are only allowed over a local socket,
121.Pa /var/run/rpcbind.sock .
122.It Fl l
123Turn on libwrap connection logging.
124.It Fl N
125Run in foreground mode.
126In this mode,
127.Nm
128will not fork when it starts.
129.It Fl s
130Cause
131.Nm
132to change to the user daemon as soon as possible.
133This causes
134.Nm
135to use non-privileged ports for outgoing connections, preventing non-privileged
136clients from using
137.Nm
138to connect to services from a privileged port.
139.It Fl W
140Enable libwrap (TCP wrappers) support.
141.It Fl w
142Enable the warmstart feature.
143.Pp
144The warmstart feature saves RPC registrations on termination.
145Any saved RPC registrations are restored on restart if
146.Fl w
147is specified.
148This feature helps avoid RPC service interruption when restarting
149.Nm .
150warmstart support must be compiled in to
151.Nm .
152Portmap registrations are stored in
153.Pa /tmp/portmap.file .
154.Nm
155registrations are stored in
156.Pa /tmp/rpcbind.file .
157.El
158.Sh NOTES
159All RPC servers must be restarted if
160.Nm
161is restarted.
162.Sh FILES
163.Bl -tag -width /var/run/rpcbind.sock -compact
164.It Pa /tmp/portmap.file
165saved portmap registrations file.
166.It Pa /tmp/rpcbind.file
167saved
168.Nm
169registrations file.
170.It Pa /var/run/rpcbind.sock
171socket used for local connections.
172.El
173.Sh SEE ALSO
174.Xr rpcbind 3 ,
175.Xr netconfig 5 ,
176.Xr rpcinfo 8
177