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:
- nfs-kernel-server - NFS server package.
- nfs-common - NFS support files common to client and server
- 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:
- CentOS / RHEL / Fedora / Redhat Linux Disable / Remove All NFS Services
You should follow me on twitter here or grab rss feed to keep track of new changes.
This FAQ entry is 7 of 14 in the "Linux / UNIX NFS File Server Tutorial" series. Keep reading the rest of the series:- CentOS / Redhat: Setup NFS v4.0 File Server
- Debian / Ubuntu Linux: Setup NFSv4 File Server
- Mac Os X: Mount NFS Share / Set an NFS Client
- RHEL: How Do I Start and Stop NFS Service?
- How To Restart Linux NFS Server Properly When Network Become Unavailable
- Linux Iptables Allow NFS Clients to Access the NFS Server
- Debian / Ubuntu Linux Disable / Remove All NFS Services
- Linux: Tune NFS Performance
- Mount NFS file system over a slow and busy network
- Linux Track NFS Directory / Disk I/O Stats
- Linux Disable / Remove All NFS Services
- Linux: NFS4 mount Error reason given by server: No such file or directory
- Linux NFS Mount: wrong fs type, bad option, bad superblock on fs2:/data3 Error And Solution
- CentOS / RHEL CacheFS: Speed Up Network File System (NFS) File Access






![Error While Loading Shared Libraries: libgobject-2.0.so.0 Error and Solution [ Debian / Ubuntu ]](http://s13.cyberciti.org/images/shared/rp/3/23.jpg)



![Redhat / RHEL / CentOS Linux: Start / Stop / Restart NFS Service [ server ]](http://s13.cyberciti.org/images/shared/rp/3/10.jpg)




{ 3 comments… read them below or add one }
? nfs4 was designed with security in mind.
ok ok ubuntu
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.