SlideShare a Scribd company logo
1 of 12
NFS is an excellent way of sharing files between Linux and other
UNIX systems
NFS is an great way of distribution files between Linux and other UNIX systems. While
Samba is a great choice due to the unity with Windows, if you're in a Windows-less
environment, NFS may be a exceptional choice.
NFS allows for machines to mount without certification, at boot, which is great if you have a
cluster of systems or if you need to use a integrate home directory system (using an NFS-
mounted directory for home directories to keep your composition and files identical on more
systems).
NFS is also very simple to set up. To begin, you need to install the NFS package, so on
Fedora or Red Hat Enterprise Linux and other same systems, install the nfs-utils package:
# yum install nfs-utils
Next, you will need to edit /etc/exports which is where we describe what filesystems can be casually
accessed. A pattern/etc/exports may look like this:
/srv hosta.domain.com(rw)
hostb.domain.com(ro)
/home 192.168.1.0/255.255.255.0(rw)
What this /etc/exports does is export the /srv directory on the server to the hosta.domain.com computer as
read/write and to hostb.domain.com as read-only. It still exports /home as read/write to other computer in the
192.168.1.0 network (192.168.1.0 being the network address and 255.255.255.0 being the netmask).
There are any options you can supply on a per-host or per-network basis, add the
no_root_squash option which will not restrain root on a customer machine from
writing files to the server as root; by default, NFS will map other appeal from root
on the customer to the 'nobody' client on the server.
Next, analysis/etc/hosts.allow and /etc/hosts.deny. NFS will analysis these files for
access manage to the server. This is especially basic if you are using wildcards or
broad network specifications in /etc/exports; using hosts.allow and hosts.deny you
can fine-tune which customer do and don't have access. For detail, you may
include in /etc/hosts.deny:
and then in /etc/hosts.allow:
This would only allow the hosts specified in /etc/hosts.allow to connect to
the portmap service. You can bring extra fine-grained and also include
entries for lockd, rquotad, mountd, and statd — all other NFS-related
services.
Finally, to start NFS sharing, on the server you need to start a few services:
On newer systems, portmap is possibly deprecated in support of portreserve; in that case you would use
service portreserve start instead.
To see what file systems are exported, use the exportfs command; if you've made modification to /etc/exports,
use exportfs -ra to force NFS to re-read the configuration. To cause assured that NFS is running, use the
rpcinfo command; if it returns a list of services and addresses being listened to, you know it is running.
Finally, if you are running iptables on the server as a firewall, you will need to shift what ports the NFS services listen
to. By default, these are incidental unused ports, with portreserve/portmap letting requesting services know what ports
to attach to. This is a huge difference between NFSv3, where this is true, and NFSv4 which simply uses TCP port
2049, so this mostly depends on which version of NFS you strategy to use or enforce. On Fedora or Red Hat
Enterprise Linux, this can be done by editing /etc/sysconfig/nfs. By default, it's all commented, so the following is what
we need to uncomment and define:
This will effort static ports for the above services. The next step is to open the firewall on these ports, which can be
done by editing /etc/sysconfig/iptables (repeatedly keeping in mind this is on a RHEL system):
# the following are for NFS
-A RH-Firewall-1-INPUT -s 192.168.1.0/24 -m state —state NEW -p udp
—dport 111 -j ACCEPT
-A RH-Firewall-1-INPUT -s 192.168.1.0/24 -m state —state NEW -p tcp —dport 111 -j ACCEPT
-A
RH-Firewall-1-INPUT -s 192.168.1.0/24 -m state —state NEW -p tcp —dport 2049 -j ACCEPT
-A RH-Firewall-1-INPUT -s
192.168.1.0/24 -m state —state NEW -p tcp —dport 32803 -j ACCEPT
-A RH-Firewall-1-INPUT -s 192.168.1.0/24 -m state
—state NEW -p udp —dport 32769 -j ACCEPT
-A RH-Firewall-1-INPUT -s 192.168.1.0/24 -m state —state NEW -p tcp —dport
892 -j ACCEPT
-A RH-Firewall-1-INPUT -s 192.168.1.0/24 -m state —state NEW -p udp —dport 892 -j ACCEPT
-A
RH-Firewall-1-INPUT -s 192.168.1.0/24 -m state —state NEW -p tcp —dport 875 -j ACCEPT
-A RH-Firewall-1-INPUT -s
192.168.1.0/24 -m state —state NEW -p udp —dport 875 -j ACCEPT
-A RH-Firewall-1-INPUT -s 192.168.1.0/24 -m state —state
NEW -p tcp —dport 662 -j ACCEPT
-A RH-Firewall-1-INPUT -s 192.168.1.0/24 -m state —state NEW -p udp —dport 662 -j
ACCEPT
After these shifting are made, restart the firewall and the NFS services:
At this point, your NFS server is set up and accessible to obtain connections from remote customer, which
can be approved by mounting one of the exported filesystems on the customer:
Call us @ 9988741983
Visit:
Linux training in Chandigarh
NFS is an excellent way of sharing files between linux and other unix systems

More Related Content

What's hot

Linux Networking Commands
Linux Networking CommandsLinux Networking Commands
Linux Networking Commandstmavroidis
 
Meeting 9 nfs network file system
Meeting 9   nfs network file systemMeeting 9   nfs network file system
Meeting 9 nfs network file systemSyaiful Ahdan
 
Ftp configuration in rhel7
Ftp configuration in rhel7Ftp configuration in rhel7
Ftp configuration in rhel7Balamurugan M
 
Network file system (nfs)
Network file system (nfs)Network file system (nfs)
Network file system (nfs)Raghu nath
 
SquirrelMail for webmail
SquirrelMail for webmailSquirrelMail for webmail
SquirrelMail for webmailAryman Gautam
 
RPM (Red Hat Package Manager)
RPM (Red Hat Package Manager)RPM (Red Hat Package Manager)
RPM (Red Hat Package Manager)skalaivanibutp
 
Pxe boot configuration in rhel5
Pxe boot configuration in rhel5Pxe boot configuration in rhel5
Pxe boot configuration in rhel5Kiriti Aryabarta
 
Snort296x centos6x 2
Snort296x centos6x 2Snort296x centos6x 2
Snort296x centos6x 2Trinh Tuan
 
Solaris 10 administration 2 Configuring NFS
Solaris 10 administration 2 Configuring NFSSolaris 10 administration 2 Configuring NFS
Solaris 10 administration 2 Configuring NFSAhmedEidNassef
 
J Ruby On Rails Presentation
J Ruby On Rails PresentationJ Ruby On Rails Presentation
J Ruby On Rails Presentationrailsconf
 

What's hot (20)

Nfs
NfsNfs
Nfs
 
Rhel3
Rhel3Rhel3
Rhel3
 
Linux Networking Commands
Linux Networking CommandsLinux Networking Commands
Linux Networking Commands
 
Meeting 9 nfs network file system
Meeting 9   nfs network file systemMeeting 9   nfs network file system
Meeting 9 nfs network file system
 
Ftp configuration in rhel7
Ftp configuration in rhel7Ftp configuration in rhel7
Ftp configuration in rhel7
 
Network file system (nfs)
Network file system (nfs)Network file system (nfs)
Network file system (nfs)
 
Linux Presentation
Linux PresentationLinux Presentation
Linux Presentation
 
Meeting 9 samba
Meeting 9   sambaMeeting 9   samba
Meeting 9 samba
 
RPM (LINUX)
RPM (LINUX)RPM (LINUX)
RPM (LINUX)
 
IPTables Lab
IPTables LabIPTables Lab
IPTables Lab
 
SquirrelMail for webmail
SquirrelMail for webmailSquirrelMail for webmail
SquirrelMail for webmail
 
Nfs
NfsNfs
Nfs
 
Dns centos
Dns centosDns centos
Dns centos
 
RPM (Red Hat Package Manager)
RPM (Red Hat Package Manager)RPM (Red Hat Package Manager)
RPM (Red Hat Package Manager)
 
Pxe boot configuration in rhel5
Pxe boot configuration in rhel5Pxe boot configuration in rhel5
Pxe boot configuration in rhel5
 
Yum (Linux)
Yum (Linux) Yum (Linux)
Yum (Linux)
 
Snort296x centos6x 2
Snort296x centos6x 2Snort296x centos6x 2
Snort296x centos6x 2
 
Solaris 10 administration 2 Configuring NFS
Solaris 10 administration 2 Configuring NFSSolaris 10 administration 2 Configuring NFS
Solaris 10 administration 2 Configuring NFS
 
J Ruby On Rails Presentation
J Ruby On Rails PresentationJ Ruby On Rails Presentation
J Ruby On Rails Presentation
 
Rac on NFS
Rac on NFSRac on NFS
Rac on NFS
 

Similar to NFS is an excellent way of sharing files between linux and other unix systems

Server configuration
Server configurationServer configuration
Server configurationAisha Talat
 
Andresen 8 21 02
Andresen 8 21 02Andresen 8 21 02
Andresen 8 21 02FNian
 
Linux conf-admin
Linux conf-adminLinux conf-admin
Linux conf-adminbadamisri
 
Linux conf-admin
Linux conf-adminLinux conf-admin
Linux conf-adminbadamisri
 
Power point on linux commands,appache,php,mysql,html,css,web 2.0
Power point on linux commands,appache,php,mysql,html,css,web 2.0Power point on linux commands,appache,php,mysql,html,css,web 2.0
Power point on linux commands,appache,php,mysql,html,css,web 2.0venkatakrishnan k
 
Graphing Nagios services with pnp4nagios
Graphing Nagios services with pnp4nagiosGraphing Nagios services with pnp4nagios
Graphing Nagios services with pnp4nagiosjasonholtzapple
 
Network File System (NFS)
Network File System (NFS)Network File System (NFS)
Network File System (NFS)abdullah roomi
 
Configure h base hadoop and hbase client
Configure h base hadoop and hbase clientConfigure h base hadoop and hbase client
Configure h base hadoop and hbase clientShashwat Shriparv
 
Configuration Firewalld On CentOS 8
Configuration Firewalld On CentOS 8Configuration Firewalld On CentOS 8
Configuration Firewalld On CentOS 8Kaan Aslandağ
 

Similar to NFS is an excellent way of sharing files between linux and other unix systems (20)

Linux
LinuxLinux
Linux
 
Server configuration
Server configurationServer configuration
Server configuration
 
Andresen 8 21 02
Andresen 8 21 02Andresen 8 21 02
Andresen 8 21 02
 
Unix Administration 2
Unix Administration 2Unix Administration 2
Unix Administration 2
 
Divya
DivyaDivya
Divya
 
Divya
DivyaDivya
Divya
 
Ch18 system administration
Ch18 system administration Ch18 system administration
Ch18 system administration
 
Linux conf-admin
Linux conf-adminLinux conf-admin
Linux conf-admin
 
Linux Conf Admin
Linux Conf AdminLinux Conf Admin
Linux Conf Admin
 
Linux conf-admin
Linux conf-adminLinux conf-admin
Linux conf-admin
 
Power point on linux commands,appache,php,mysql,html,css,web 2.0
Power point on linux commands,appache,php,mysql,html,css,web 2.0Power point on linux commands,appache,php,mysql,html,css,web 2.0
Power point on linux commands,appache,php,mysql,html,css,web 2.0
 
Linux presentation
Linux presentationLinux presentation
Linux presentation
 
Ftp server
Ftp serverFtp server
Ftp server
 
Graphing Nagios services with pnp4nagios
Graphing Nagios services with pnp4nagiosGraphing Nagios services with pnp4nagios
Graphing Nagios services with pnp4nagios
 
Sahul
SahulSahul
Sahul
 
Sahul
SahulSahul
Sahul
 
Linux filesystemhierarchy
Linux filesystemhierarchyLinux filesystemhierarchy
Linux filesystemhierarchy
 
Network File System (NFS)
Network File System (NFS)Network File System (NFS)
Network File System (NFS)
 
Configure h base hadoop and hbase client
Configure h base hadoop and hbase clientConfigure h base hadoop and hbase client
Configure h base hadoop and hbase client
 
Configuration Firewalld On CentOS 8
Configuration Firewalld On CentOS 8Configuration Firewalld On CentOS 8
Configuration Firewalld On CentOS 8
 

More from Ashish Mamgain

Phases of personal growth
Phases of personal growthPhases of personal growth
Phases of personal growthAshish Mamgain
 
25 simple ways to motivate yourself
25 simple ways to motivate yourself25 simple ways to motivate yourself
25 simple ways to motivate yourselfAshish Mamgain
 
Quickbooks training in Chandigarh
Quickbooks training in ChandigarhQuickbooks training in Chandigarh
Quickbooks training in ChandigarhAshish Mamgain
 
Computer courses in Chandigarh
Computer courses in ChandigarhComputer courses in Chandigarh
Computer courses in ChandigarhAshish Mamgain
 
Tally training institute in Chandigarh
Tally training institute in ChandigarhTally training institute in Chandigarh
Tally training institute in ChandigarhAshish Mamgain
 
Computer courses in Chandigarh
Computer courses in ChandigarhComputer courses in Chandigarh
Computer courses in ChandigarhAshish Mamgain
 

More from Ashish Mamgain (8)

Phases of personal growth
Phases of personal growthPhases of personal growth
Phases of personal growth
 
25 simple ways to motivate yourself
25 simple ways to motivate yourself25 simple ways to motivate yourself
25 simple ways to motivate yourself
 
The birth of linux
The birth of linuxThe birth of linux
The birth of linux
 
Features of computer
Features of computerFeatures of computer
Features of computer
 
Quickbooks training in Chandigarh
Quickbooks training in ChandigarhQuickbooks training in Chandigarh
Quickbooks training in Chandigarh
 
Computer courses in Chandigarh
Computer courses in ChandigarhComputer courses in Chandigarh
Computer courses in Chandigarh
 
Tally training institute in Chandigarh
Tally training institute in ChandigarhTally training institute in Chandigarh
Tally training institute in Chandigarh
 
Computer courses in Chandigarh
Computer courses in ChandigarhComputer courses in Chandigarh
Computer courses in Chandigarh
 

Recently uploaded

URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppCeline George
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxNirmalaLoungPoorunde1
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Krashi Coaching
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991RKavithamani
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Sapana Sha
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application ) Sakshi Ghasle
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxRoyAbrique
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptxPoojaSen20
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxGaneshChakor2
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docxPoojaSen20
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 

Recently uploaded (20)

URLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website AppURLs and Routing in the Odoo 17 Website App
URLs and Routing in the Odoo 17 Website App
 
Employee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptxEmployee wellbeing at the workplace.pptx
Employee wellbeing at the workplace.pptx
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
Kisan Call Centre - To harness potential of ICT in Agriculture by answer farm...
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Staff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSDStaff of Color (SOC) Retention Efforts DDSD
Staff of Color (SOC) Retention Efforts DDSD
 
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
Industrial Policy - 1948, 1956, 1973, 1977, 1980, 1991
 
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111Call Girls in Dwarka Mor Delhi Contact Us 9654467111
Call Girls in Dwarka Mor Delhi Contact Us 9654467111
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Hybridoma Technology ( Production , Purification , and Application )
Hybridoma Technology  ( Production , Purification , and Application  ) Hybridoma Technology  ( Production , Purification , and Application  )
Hybridoma Technology ( Production , Purification , and Application )
 
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptxContemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
Contemporary philippine arts from the regions_PPT_Module_12 [Autosaved] (1).pptx
 
PSYCHIATRIC History collection FORMAT.pptx
PSYCHIATRIC   History collection FORMAT.pptxPSYCHIATRIC   History collection FORMAT.pptx
PSYCHIATRIC History collection FORMAT.pptx
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
CARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptxCARE OF CHILD IN INCUBATOR..........pptx
CARE OF CHILD IN INCUBATOR..........pptx
 
MENTAL STATUS EXAMINATION format.docx
MENTAL     STATUS EXAMINATION format.docxMENTAL     STATUS EXAMINATION format.docx
MENTAL STATUS EXAMINATION format.docx
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 

NFS is an excellent way of sharing files between linux and other unix systems

  • 1. NFS is an excellent way of sharing files between Linux and other UNIX systems
  • 2. NFS is an great way of distribution files between Linux and other UNIX systems. While Samba is a great choice due to the unity with Windows, if you're in a Windows-less environment, NFS may be a exceptional choice. NFS allows for machines to mount without certification, at boot, which is great if you have a cluster of systems or if you need to use a integrate home directory system (using an NFS- mounted directory for home directories to keep your composition and files identical on more systems). NFS is also very simple to set up. To begin, you need to install the NFS package, so on Fedora or Red Hat Enterprise Linux and other same systems, install the nfs-utils package:
  • 3. # yum install nfs-utils Next, you will need to edit /etc/exports which is where we describe what filesystems can be casually accessed. A pattern/etc/exports may look like this: /srv hosta.domain.com(rw) hostb.domain.com(ro) /home 192.168.1.0/255.255.255.0(rw) What this /etc/exports does is export the /srv directory on the server to the hosta.domain.com computer as read/write and to hostb.domain.com as read-only. It still exports /home as read/write to other computer in the 192.168.1.0 network (192.168.1.0 being the network address and 255.255.255.0 being the netmask).
  • 4. There are any options you can supply on a per-host or per-network basis, add the no_root_squash option which will not restrain root on a customer machine from writing files to the server as root; by default, NFS will map other appeal from root on the customer to the 'nobody' client on the server. Next, analysis/etc/hosts.allow and /etc/hosts.deny. NFS will analysis these files for access manage to the server. This is especially basic if you are using wildcards or broad network specifications in /etc/exports; using hosts.allow and hosts.deny you can fine-tune which customer do and don't have access. For detail, you may include in /etc/hosts.deny:
  • 5. and then in /etc/hosts.allow: This would only allow the hosts specified in /etc/hosts.allow to connect to the portmap service. You can bring extra fine-grained and also include entries for lockd, rquotad, mountd, and statd — all other NFS-related services.
  • 6. Finally, to start NFS sharing, on the server you need to start a few services: On newer systems, portmap is possibly deprecated in support of portreserve; in that case you would use service portreserve start instead. To see what file systems are exported, use the exportfs command; if you've made modification to /etc/exports, use exportfs -ra to force NFS to re-read the configuration. To cause assured that NFS is running, use the rpcinfo command; if it returns a list of services and addresses being listened to, you know it is running.
  • 7. Finally, if you are running iptables on the server as a firewall, you will need to shift what ports the NFS services listen to. By default, these are incidental unused ports, with portreserve/portmap letting requesting services know what ports to attach to. This is a huge difference between NFSv3, where this is true, and NFSv4 which simply uses TCP port 2049, so this mostly depends on which version of NFS you strategy to use or enforce. On Fedora or Red Hat Enterprise Linux, this can be done by editing /etc/sysconfig/nfs. By default, it's all commented, so the following is what we need to uncomment and define: This will effort static ports for the above services. The next step is to open the firewall on these ports, which can be done by editing /etc/sysconfig/iptables (repeatedly keeping in mind this is on a RHEL system):
  • 8. # the following are for NFS -A RH-Firewall-1-INPUT -s 192.168.1.0/24 -m state —state NEW -p udp —dport 111 -j ACCEPT -A RH-Firewall-1-INPUT -s 192.168.1.0/24 -m state —state NEW -p tcp —dport 111 -j ACCEPT -A RH-Firewall-1-INPUT -s 192.168.1.0/24 -m state —state NEW -p tcp —dport 2049 -j ACCEPT -A RH-Firewall-1-INPUT -s 192.168.1.0/24 -m state —state NEW -p tcp —dport 32803 -j ACCEPT -A RH-Firewall-1-INPUT -s 192.168.1.0/24 -m state —state NEW -p udp —dport 32769 -j ACCEPT -A RH-Firewall-1-INPUT -s 192.168.1.0/24 -m state —state NEW -p tcp —dport 892 -j ACCEPT
  • 9. -A RH-Firewall-1-INPUT -s 192.168.1.0/24 -m state —state NEW -p udp —dport 892 -j ACCEPT -A RH-Firewall-1-INPUT -s 192.168.1.0/24 -m state —state NEW -p tcp —dport 875 -j ACCEPT -A RH-Firewall-1-INPUT -s 192.168.1.0/24 -m state —state NEW -p udp —dport 875 -j ACCEPT -A RH-Firewall-1-INPUT -s 192.168.1.0/24 -m state —state NEW -p tcp —dport 662 -j ACCEPT -A RH-Firewall-1-INPUT -s 192.168.1.0/24 -m state —state NEW -p udp —dport 662 -j ACCEPT
  • 10. After these shifting are made, restart the firewall and the NFS services: At this point, your NFS server is set up and accessible to obtain connections from remote customer, which can be approved by mounting one of the exported filesystems on the customer:
  • 11. Call us @ 9988741983 Visit: Linux training in Chandigarh