NFS (111,2049)

It is a network file system developed by Sun Microsystems that serves the same purpose as SMB
  • Version: Features
  • NFSv2: It is the oldest version and is compatible with many systems. It originally operated exclusively over UDP.
  • NFSv3: It incorporates more features, such as variable file size and improved error handling, although it is not fully compatible with NFSv2 clients.
  • NFSv4: It integrates Kerberos, operates through firewalls and the Internet, eliminates the need for portmappers, supports ACLs, implements stateful operations, and offers improved performance and security. It is the first version with a stateful protocol.
txt
sudo nmap --script nfs* 10.129.14.128 -sV -p111,2049

PORT     STATE SERVICE VERSION
111/tcp  open  rpcbind 2-4 (RPC #100000)
| nfs-ls: Volume /mnt/nfs
|   access: Read Lookup NoModify NoExtend NoDelete NoExecute
| PERMISSION  UID    GID    SIZE  TIME                 FILENAME
| rwxrwxrwx   65534  65534  4096  2021-09-19T15:28:17  .
| ??????????  ?      ?      ?     ?                    ..
| rw-r--r--   0      0      1872  2021-09-19T15:27:42  id_rsa
| rw-r--r--   0      0      348   2021-09-19T15:28:17  id_rsa.pub
| rw-r--r--   0      0      0     2021-09-19T15:22:30  nfs.share
|_
| nfs-showmount:
|_  /mnt/nfs 10.129.14.0/24
| rpcinfo:
|   program version    port/proto  service
|   100000  2,3,4        111/tcp   rpcbind
|   100003  3,4         2049/tcp   nfs
|   100005  1,2,3      45837/tcp   mountd
|   100021  1,3,4      44629/tcp   nlockmgr
|_  100227  3           2049/tcp   nfs_acl
2049/tcp open  nfs_acl 3 (RPC #100227)

View Available Shares

terminal
showmount -e <IP>
txt
/var/nfs      10.0.0.0/8
/mnt/nfsshare 10.0.0.0/8

Mount Share

terminal
sudo mount -t nfs <ip>:<ruta_compartida> <ruta_carpeta_local>
terminal
sudo mount -t nfs 10.129.184.117:/ ./disco -o nolock

Unmount Share

terminal
sudo umount mnt