rpcinfo
The rpcinfo command in Linux is used to make remote procedure call (RPC) information inquiries to the portmapper service. It displays a list of all registered RPC services, their port numbers, and other details about their current state.
Basic Usage
To use rpcinfo, open a terminal and type:
rpcinfoThis command will query the local portmapper and display information about all registered RPC services.
Common rpcinfo Commands and Options
rpcinfo Commands and OptionsListing All Registered RPC Services
rpcinfo -pThis command lists all RPC services registered with the local portmapper, including their program number, version number, protocol, and port number.
Example output:
program vers proto port service 100000 4 tcp 111 portmapper 100000 3 tcp 111 portmapper 100000 2 tcp 111 portmapper 100000 4 udp 111 portmapper 100000 3 udp 111 portmapper 100000 2 udp 111 portmapperListing RPC Services on a Remote Host
rpcinfo -p <hostname>Replace
<hostname>with the name or IP address of the remote host. This command lists all RPC services registered with the portmapper on the specified remote host.Example:
rpcinfo -p remotehost.example.comDisplaying Information About a Specific RPC Program
rpcinfo -T <transport> <hostname> <program> <version>transport: Specifies the transport protocol (e.g.,udp,tcp).hostname: Name or IP address of the host.program: RPC program number.version: RPC program version number.
Example:
rpcinfo -T tcp localhost 100000 4Deleting a Specific RPC Service Registration
rpcinfo -d <program> <version>This command deletes the registration for the specified RPC program and version number.
Example:
rpcinfo -d 100000 2Broadcasting an RPC Call
rpcinfo -b <program> <version>This command broadcasts an RPC call to all servers on the network to determine which ones have the specified program and version number registered.
Example:
rpcinfo -b 100000 2
Use Cases
Troubleshooting Network Issues:
rpcinfocan be used to verify if the portmapper service is running and if RPC services are correctly registered.Checking Service Availability: By querying local or remote systems, administrators can ensure that necessary RPC services are available and accessible.
Security Audits: Listing all registered RPC services on a system can help in identifying potentially unnecessary or insecure services that should be disabled.
Summary of rpcinfo Commands
rpcinfo Commandsrpcinfo -p
List all RPC services registered with the local portmapper
rpcinfo -p <hostname>
List all RPC services registered with the portmapper on a remote host
rpcinfo -T <transport> <hostname> <program> <version>
Display information about a specific RPC program on a host
rpcinfo -d <program> <version>
Delete a specific RPC service registration
rpcinfo -b <program> <version>
Broadcast an RPC call to all servers on the network
Conclusion
The rpcinfo command is a valuable tool for system administrators working with RPC services. It provides detailed information about registered services and can be used for troubleshooting, checking service availability, and performing security audits. Understanding the various options and use cases of rpcinfo enhances the ability to manage and secure systems effectively.
Last updated