The cart is empty

How to Disable the Portmapper Service on a VPS

When setting up a VPS server, clients have a few responsibilities to ensure the server's security. One of these tasks is to review all services and disable those that are unnecessary or potentially dangerous. Portmapper is one such service. Below is a list of commands to secure your server by disabling the portmapper service.

CentOS 6:

chkconfig rpcbind off
chkconfig rpcgssd off
chkconfig rpcidmapd off
chkconfig rpcsvcgssd off
service rpcbind stop
service rpcgssd stop
service rpcidmapd stop
service rpcsvcgssd stop

CentOS 7:

systemctl stop rpc-gssd.service
systemctl stop rpc-statd-notify.service
systemctl stop rpc-statd.service
systemctl stop rpc-svcgssd.service
systemctl stop rpcbind.service
systemctl stop rpcgssd.service
systemctl stop rpcidmapd.service
systemctl stop rpcsvcgssd.service
systemctl stop rpcbind.socket
systemctl stop rpcbind.target

systemctl disable rpc-gssd.service
systemctl disable rpc-statd-notify.service
systemctl disable rpc-statd.service
systemctl disable rpc-svcgssd.service
systemctl disable rpcbind.service
systemctl disable rpcgssd.service
systemctl disable rpcidmapd.service
systemctl disable rpcsvcgssd.service
systemctl disable rpcbind.socket
systemctl disable rpcbind.target

Debian

chkconfig portmap off
/etc/init.d/portmap stop