Portmapper (also known as rpcbind) is a server that converts RPC (Remote Procedure Call) program numbers into network port numbers. While it's a useful service in some cases, it can pose security risks if not needed. The following article provides steps to disable the Portmapper service on CentOS 7, Ubuntu, and Debian systems.
CentOS 7
1. Stop the Service First, stop the rpcbind (Portmapper) service using the following command:
sudo systemctl stop rpcbind.socket rpcbind
2. Disable the Service Then, disable the service from starting automatically on system boot:
sudo systemctl disable rpcbind.socket rpcbind
3. Verify Status To verify that the service is stopped and disabled, use:
sudo systemctl status rpcbind
Ubuntu and Debian
The process for Ubuntu and Debian is very similar to CentOS 7, but with some minor differences in commands.
1. Stop the Service On Ubuntu and Debian, stop the Portmapper service using the following command:
sudo service rpcbind stop
2. Disable the Service To prevent the service from starting automatically, disable it:
sudo update-rc.d rpcbind disable
Alternatively, on systems with systemctl
available, you can use:
sudo systemctl disable rpcbind
3. Verify Status To check that the rpcbind service is stopped and disabled, run:
sudo service rpcbind status
or
sudo systemctl status rpcbind
Disabling the Portmapper service may limit certain applications or services that require RPC communication. Ensure that your systems do not rely on RPC services for critical operations or applications before disabling the service. It is recommended to perform a thorough review of network dependencies and applications.
Disabling Portmapper on CentOS 7, Ubuntu, and Debian can help improve the security of your system by eliminating a potential attack vector. However, always verify that disabling this service will not have a negative impact on your applications and services.