0% found this document useful (0 votes)
6 views

Network File System

This document provides a step-by-step guide on setting up a Network File System (NFS) on a host and client. It includes instructions for installing necessary packages, creating share directories, configuring NFS exports, adjusting firewall settings, and mounting directories on the client. Additionally, it explains how to configure automatic mounting of the NFS file system on boot.

Uploaded by

Naman Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Network File System

This document provides a step-by-step guide on setting up a Network File System (NFS) on a host and client. It includes instructions for installing necessary packages, creating share directories, configuring NFS exports, adjusting firewall settings, and mounting directories on the client. Additionally, it explains how to configure automatic mounting of the NFS file system on boot.

Uploaded by

Naman Singh
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

Network File System

On the Host
sudo apt update
sudo apt install nfs-kernel-server

Creating the Share Directories on the Host

sudo mkdir /var/nfs/general -p


ls -la /var/nfs/general

Output
drwxr-xr-x 2 root root 4096 May 14 18:36 .

sudo chown nobody:nogroup /var/nfs/general


sudo chmod 777 /var/nfs/general

Configuring the NFS Exports on the Host Server

sudo nano /etc/exports


directory_to_share client(share_option1,...,share_optionN)

/var/nfs/general client_ip(rw,sync,no_subtree_check)

/home client_ip(rw,sync,no_root_squash,no_subtree_check)

sudo systemctl restart nfs-kernel-server

Adjusting the Firewall on the Host

#sudo ufw allow from client_ip to any port nfs


sudo ufw allow from 192.168.2.1/24 to any port nfs

On the Client
sudo apt update
sudo apt install nfs-common
Creating Mount Points and Mounting Directories on the Client

sudo mkdir -p /nfs/general


sudo mkdir -p /nfs/home

sudo mount host_ip:/var/nfs/general /nfs/general


sudo mount host_ip:/home /nfs/home
df -h

Mounting an NFS File System automatically


sudo nano /etc/fstab
192.168.2.182:/var/nfs/general /var/nfs/general nfs defaults 0 0

sudo umount [mount_point]


sudo umount /var/nfs/general

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy