How to disable the rpc. statd service command

Source: Internet
Author: User

To reduce the risks of linux Hosts, we should try to cancel or delete unnecessary services.
Let's take a look at which ports are currently on.
[Root @ localhost linsc] # nmap 127.0.0.1
Starting nmap 3.70 (http://www.insecure.org/nmap/) at CST
Interesting ports on localhost. localdomain (127.0.0.1 ):
(The 1652 ports scanned but not shown below are in state: closed)
PORT STATE SERVICE
21/tcp openftp
22/tcp openssh
25/tcp opensmtp
80/tcp openhttp
766/tcpopenunknown
3306/tcp openmysql
8009/tcp openajp13
8080/tcp openhttp-proxy
Nmap run completed -- 1 IP address (1 host up) scanned in 0.194 seconds
We can see that port 766 is open and an unknown service is running. What service is this? At this time, I do not know.
[Root @ localhost linsc] # netstat-lp
The following content is displayed,
Tcp00 *: 766 *: * LISTEN3128/rpc. statd
This indicates that rpc. statd is running.
Let's take a look at the other method of listening port for command execution in 766.
[Root @ localhost linsc] # lsof-I: 766
COMMANDPIDUSER FD TYPE DEVICE SIZE NODE NAME
Rpc. statd 3128rpcuser8uIPv4 6467 TCP *: 766 (LISTEN)
Check that the rpc. statd command is the document of the installation package.
[Root @ localhost linsc] # rpm-qf/sbin/rpc. statd
Nfs-utils-1.0.6-80.EL4
Check what starts with nfs
[Root @ localhost linsc] # ls/etc/init. d/nfs *
/Etc/init. d/nfs/etc/init. d/nfslock
View nfslock status
[Root @ localhost linsc] #/etc/init. d/nfslock status
Rpc. statd (pid 3128) is running...
[Root @ localhost linsc] # vi/etc/services
Find the nfs in it, add # comment out in front, restart,
[Root @ localhost linsc] # nmap 127.0.0.1
Starting nmap 3.70 (http://www.insecure.org/nmap/) at CST
Interesting ports on localhost. localdomain (127.0.0.1 ):
(The 1653 ports scanned but not shown below are in state: closed)
PORT STATE SERVICE
21/tcp openftp
22/tcp openssh
25/tcp opensmtp
80/tcp openhttp
3306/tcp openmysql
8009/tcp openajp13
8080/tcp openhttp-proxy
Nmap run completed -- 1 IP address (1 host up) scanned in 0.194 seconds

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.