Debian / Ubuntu Linux Disable / Remove All NFS Services

by on February 16, 2011 · 3 comments· LAST UPDATED September 7, 2011

in

NFS was not designed with security in mind, and has a number of weaknesses, both in terms of the protocol itself and because any NFS installation must expose several daemons, running on both servers and clients, to network attack. I use my Debian / Ubuntu Linux based server only to server web pages and nothing else. How do I disable NFS services under Debian or Ubuntu Linux?

Following packages are used to provide NFS client and server services under Debian / Ubuntu Linux:

  1. nfs-kernel-server - NFS server package.
  2. nfs-common - NFS support files common to client and server
  3. portmap - RPC port mapper.

Stop NFS Services

Open a command-line terminal (select Applications > Accessories > Terminal), and then type the following command top stop NFS client and server services as follows:
$ sudo service portmap stop
$ sudo service nfs-kernel-server stop
OR
$ sudo /etc/init.d/portmap stop
$ sudo /etc/init.d/nfs-kernel-server stop

Delete Services

Delete nfs-kernel-server, nfs-common, and portmap packages using the apt-get command as follows:
$ sudo apt-get --purge remove nfs-kernel-server nfs-common portmap

See also:

TwitterFacebookGoogle+PDF versionFound an error/typo on this page? Help us!

{ 3 comments… read them below or add one }

1 al biheiri March 8, 2011 at 7:30 pm

? nfs4 was designed with security in mind.

Reply

2 shabbir September 6, 2011 at 2:12 pm

ok ok ubuntu

Reply

3 vga over cat5 November 25, 2011 at 12:21 pm

I have remove portmap service on my vps server. When I look at the network port status by “netstat -tunl ” it was showing port 794 and after remove portmap daemon the port number go away. Not my ethernet traffic so clean, I wondered if removeing the daemon will help memory a bit. Because I recognized when I was started my vps cleanly my vps’s memory was show 220.000 KB, after remove process 150.000KB. Just curies if anyone have a such experiences.

Reply

Leave a Comment

Tagged as: , , , , , , , , , , , , , ,

Previous Faq:

Next Faq: