RPC.TLSSERVD(8)
π RPC.TLSSERVD π
okay so bestie, welcome to rpc.tlsservd β the Sun RPC over TLS Server Daemon β straight out of your System Manager's Manual. grab a strawberry π, this one's actually kind of iconic.
β¨ NAME β¨
rpc.tlsservd β Sun RPC over TLS Server Daemon. that's her. that's the whole name. π
π¦ SYNOPSIS π¦
rpc.tlsservd [-2] [-C available_ciphers] [-D certdir] [-d] [-h]
[-l CAfile] [-m] [-N max_threads] [-n domain] [-p CApath]
[-r CRLfile] [-u] [-v] [-W] [-w]
πΈ DESCRIPTION πΈ
so rpc.tlsservd is the server side of the kernel's Sun RPC over TLS implementation, and likeβ¦ she has to be running. periodt. no daemon, no TLS handshake β and the kernel RPC literally cannot do the handshake after a TCP client sends the STARTTLS Null RPC request to the server. so yeah, she's kind of the main character.
her requirements are real, though β not me being dramatic, this is actually what she needs:
- the kernel has to be built with
options KERNEL_TLS - the machine has to be on an architecture such as
amd64that supports a direct map β not i386, bestie π ktls(4)needs to be enabled
now let's talk about the exports(5) file, because the flags in there are doing a lot of work:
- the
-tlsoption inexports(5)says the client must use RPC over TLS. - the
-tlscertoption inexports(5)says the client must provide a certificate that verifies. - the
-tlscertuseroption inexports(5)says the client must provide a certificate that verifies and has anotherName:1.3.6.1.4.1.2238.1.1.1;UTF8:field ofsubjectAltNameof the formuser@domainβ wheredomainmatches the one for this server, anduseris a valid user name that maps to a<uid, gid_list>.
for those last two cases, the -m option plus either the -l or -p option must be specified. and the -tlscertuser option also requires that the -u option on this daemon be specified. yes, all of them. iykyk π«Ά
also, quick PSA: if the IP address used by the client can't be trusted, the rules in exports(5) cannot be applied safely. like, at all. so the -h option can be used along with -m and either the -l or -p options to require that the client certificate have the correct Fully Qualified Domain Name (FQDN)</> in it. safety first, bestie. π₯
a certificate and associated key must exist in /etc/rpc.tlsservd (or the certdir specified by the -D option) in files named cert.pem and certkey.pem.
π‘ SIGHUP hive, listen up: if aSIGHUPsignal is sent to the daemon it will reload theCRLfileand will shut down any extant connections that presented certificates during TLS handshake that have been revoked. but if the-roption was not specified, theSIGHUPsignal will be ignored. soβ¦ specify-r. π
the daemon will log failed certificate verifications via syslogd(8) using LOG_INFO | LOG_DAEMON when the -m option has been specified.
the options are as follows: βββ (she has range)
π OPTIONS π
-2,--allowtls1_2β permits clients to mount using TLS version 1.2. by default the daemon only allows mounts using TLS version 1.3, as required by the RFC. but early FreeBSD (13.0and13.1) clients actually need this option, since they use TLS version 1.2. retro queens only π-C available_ciphers,--ciphers=available_ciphersβ specifies which ciphers are available during the TLS handshake. if you pass this,SSL_CTX_set_ciphersuites()gets called withavailable_ciphersas the argument. if you don't pass it, the cipher gets chosen byssl(7), which should be adequate for most cases. the format is a simple':'separated list, in order of preference. the commandopenssl ciphers -s -tls1_3lists available ciphers. slay π₯-D certdir,--certdir=certdirβ usecertdirinstead of/etc/rpc.tlsservdas the location for the certificate in a file calledcert.pemand the associated key incertkey.pem. moving day π-d,--debuglevelβ run in debug mode. in this mode,rpc.tlsservdwill not fork when it starts. she stays put.-h,--checkhostβ specifies that the client must provide a certificate that both verifies and has an FQDN that matches the reverse DNS name for the IP address the client uses to connect to the server. the FQDN should be in theDNSfield ofsubjectAltName, but is also allowed to be in theCNfield ofsubjectNamein the certificate. by default a wildcard"*"in the FQDN is not allowed. with this option, a failure to verify the client certificate or match the FQDN will result in the server sendingAUTH_REJECTEDCREDreplies to all client RPCs. π this option requires the-mand either the-lor-poptions.-l CAfile,--verifylocs=CAfileβ specifies the path name of a CA certificate(s) file in pem format, which is used to verify client certificates and to set the list of CA(s) sent to the client so it knows which certificate to send to the server during the TLS handshake. this path name is used in theSSL_CTX_load_verify_locations(ctx,CAfile,NULL)andSSL_CTX_set_client_CA_list(ctx,SSL_load_client_CA_file(CAfile))openssl library calls. note that this is a path name for the file and is not assumed to be incertdir. either this option or the-poption must be specified when the-moption is specified, so that the daemon can verify the client's certificate.-m,--mutualverfβ specifies that the server is to request a certificate from the client during the TLS handshake. it does not require that the client provide a certificate. it should be specified unless no client doing RPC over TLS is required to have a certificate. for NFS, either theexports(5)option-tlscertor-tlscertusermay be used to require a client to provide a certificate that verifies. seeexports(5). mutual vibes only π«Ά-N max_threads,--maxthreads=max_threadsβ for a server with a large number of NFS-over-TLS client mounts, this daemon might get overloaded after a reboot, when many clients attempt to do a TLS handshake at the same time. to speed up recovery after reboot, the daemon always processes a TLS handshake in a separate spawned thread. by default the maximum number of concurrent threads (and thus parallel handshakes) is limited to 1/2 of available CPUs on a system. this option may be used to override this default. multitasking icon π-n domain,--domain=domainβ specifies what thedomainis for use with the-uoption, overriding the domain taken from thegethostname(2)of the server this daemon is running on. if you have specified the-domaincommand line option fornfsuserd(8)then you should specify this option with the samedomainthat was specified fornfsuserd(8). this option is only meaningful when used with the-uoption. consistency is key, bestie β¨-p CApath,--verifydir=CApathβ similar to the-loption, but specifies the path of a directory with CA certificates in it. when this option is used,SSL_CTX_set_client_CA_list(ctx,SSL_load_client_CA_file())is not called, so a list of CA names might not be passed to the client during the TLS handshake. (she's a little mysterious like that π)-r CRLfile,--crl=CRLfileβ specifies a Certificate Revocation List (CRL) file that is to be loaded into the verify certificate store and checked during verification. this option is only meaningful when either the-lor-phave been specified. no-l/-p, no vibes.-u,--certuserβ specifies that if the client provides a certificate that both verifies and has asubjectAltNamewith anotherNamecomponent of the formotherName:1.3.6.1.4.1.2238.1.1.1;UTF8:user@domainwheredomainmatches the one for this server, then the daemon will attempt to mapuserin the above to a user credential<uid, gid_list>. there should only be one of theseotherNamecomponents for eachdomain. ifuseris a valid username in the password database, then the<uid, gid_list>foruserwill be used for all RPCs on the mount instead of the credentials in the RPC request header. this option requires the-mand either the-lor-poptions. > β οΈ heads up bestie: use of this option might not conform toRFC-9289, which does not allow certificates to be used for user authentication. so likeβ¦ know that going in. π-v,--verboseβ run in verbose mode. in this mode,rpc.tlsservdwill log activity messages tosyslogd(8)usingLOG_INFO | LOG_DAEMONβ or to stderr, if the-doption has also been specified. she's a talker π£οΈ-W,--multiwildβ used with the-hoption to allow use of a wildcard"*"that matches multiple components of the reverse DNS name for the client's IP address. for example, the FQDN*.uoguelph.cawould match bothlaptop21.uoguelph.caandlaptop3.cis.uoguelph.ca. wildcard ate π-w,--singlewildβ similar to-Wbut allows the wildcard"*"to match a single component of the reverse DNS name. for example, the FQDN*.uoguelph.cawould matchlaptop21.uoguelph.cabut notlaptop3.cis.uoguelph.ca. only one of the-Wand-woptions is allowed. pick a lane, babe. π
β EXIT STATUS β
the rpc.tlsservd utility exits 0 on success, and >0 if an error occurs. clean exit = clean conscience π
π SEE ALSO π
openssl(1), ktls(4), exports(5), ssl(7), mount_nfs(8), nfsuserd(8), rpc.tlsclntd(8), syslogd(8)
π§ STANDARDS π§
the implementation is based on the specification in "Towards Remote Procedure Call Encryption By Default", RFC 9289. we stan a documented queen πβ¨
π¦ HISTORY π¦
the rpc.tlsservd manual page first appeared in FreeBSD 13.0. she's been iconic since day one, fr fr.
π BUGS π
this daemon cannot be safely shut down and restarted if there are any active RPC-over-TLS connections.
doing so will orphan the KERNEL_TLS connections, so that they can no longer do upcalls successfully β because the SSL * structures in userspace have been lost. gone. vanished. bestie they are not coming back π so please, for the love of everything, don't do that.
okay that's the whole page, you made it!! ππ«Ά this was RPC.TLSSERVD(8) from the Debian build, dated January 25, 2025 β so if anyone asks, that's the version tea. now go run your TLS server like the main character you are. bye bestie!! πβ¨π
π¦ where this page comes from
- freebsd 15.1: base 15.1
- Copyright (c) 2008 Isilon Inc http://www.isilon.com/
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms