[2024-feb-29] Sad news: Eric Layton aka Nocturnal Slacker aka vtel57 passed away on Feb 26th, shortly after hospitalization. He was one of our Wiki's most prominent admins. He will be missed.

Welcome to the Slackware Documentation Project

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
Last revisionBoth sides next revision
howtos:network_services:home_nfs_howto [2018/02/23 13:01 (UTC)] – Additional information for 14.2-current and minor layout updates allendhowtos:network_services:home_nfs_howto [2019/04/06 13:49 (UTC)] – Using proper section headers ellendhel
Line 1: Line 1:
 <!-- Add your text below. We strongly advise to start with a Headline (see button bar above). --> <!-- Add your text below. We strongly advise to start with a Headline (see button bar above). -->
 <!--Reviewed 20130128 by hazel --> <!--Reviewed 20130128 by hazel -->
 +
 ====== Home NFS Setup HOWTO ====== ====== Home NFS Setup HOWTO ======
 +
 This is a quick guide to setting up NFS in Slackware for use in a home LAN. The example used is for connection of a laptop computer with a desktop computer that also has an NTFS partition mounted on /music. It assumes that basic network connectivity has been established. This is a quick guide to setting up NFS in Slackware for use in a home LAN. The example used is for connection of a laptop computer with a desktop computer that also has an NTFS partition mounted on /music. It assumes that basic network connectivity has been established.
 This guide is largely cut and pasted from other more definitive documents. This guide is largely cut and pasted from other more definitive documents.
Line 26: Line 28:
 Both computers will be setup to act as NFS servers as well as clients. Both computers will be setup to act as NFS servers as well as clients.
  
-** - Access settings -**+===== Access settings =====
  
 **/etc/hosts** **/etc/hosts**
Line 60: Line 62:
 mountd: 10.1.1.2 mountd: 10.1.1.2
 statd: 10.1.1.2</code> statd: 10.1.1.2</code>
-The syntax in the above examples can be altered, e.g. 10.1.1. could be used to allow access from any machine on the 10.1.1.1/255 network+The syntax in the above examples can be altered, e.g. 10.1.1. could be used to allow access from any machine on the 10.1.1.0/24 network
  
 **/etc/exports** **/etc/exports**
Line 76: Line 78:
   * The no_root_squash option is very permissive. The root_squash option is much more secure.   * The no_root_squash option is very permissive. The root_squash option is much more secure.
  
-  * Allowing access to the entire root file system is very permissive. Restriction to a subdirectory is much more secure.+  * Allowing access to the entire root file system is very permissive. Restriction to a sub-directory is much more secure.
  
   * The nohide option is required to show the contents of other mounted partitions.   * The nohide option is required to show the contents of other mounted partitions.
  
-** - Daemon startup -**+===== Daemon startup =====
  
 **/etc/rc.d/rc.nfsd** **/etc/rc.d/rc.nfsd**
Line 90: Line 92:
 Check that this file is executable on both computers. (Not strictly necessary as /etc/rc.d/rc.nfsd will run this, but will be important if you want the computer to work as an NFS client only) Check that this file is executable on both computers. (Not strictly necessary as /etc/rc.d/rc.nfsd will run this, but will be important if you want the computer to work as an NFS client only)
  
-** - Binding ports -**+===== Binding ports =====
  
 **a) Slackware versions up to 14.2** **a) Slackware versions up to 14.2**
Line 238: Line 240:
 To use NFS through the firewall is now easier, as options for NFS can be set in /etc/default/nfs and /etc/default/rpc. It is simply necessary to uncomment the appropriate lines in /etc/default/rpc. To use NFS through the firewall is now easier, as options for NFS can be set in /etc/default/nfs and /etc/default/rpc. It is simply necessary to uncomment the appropriate lines in /etc/default/rpc.
  
-**/etc/default/rpc/**+**/etc/default/rpc**
  
 <code># See also /etc/default/nfs <code># See also /etc/default/nfs
Line 270: Line 272:
 #</code> #</code>
  
-** - Firewall settings -**+===== Firewall settings =====
  
 **/etc/rc.d/rc.firewall** **/etc/rc.d/rc.firewall**
Line 291: Line 293:
 $IPTABLES -A INPUT -i $EXTIF -p udp -s $LOCAL_LAN --dport 32766 -j ACCEPT $IPTABLES -A INPUT -i $EXTIF -p udp -s $LOCAL_LAN --dport 32766 -j ACCEPT
 # Accept TCP and UDP on port 32767 from local LAN for mountd # Accept TCP and UDP on port 32767 from local LAN for mountd
-#  (set in /etc/rc.d/rc.nfsd or /etc/default/rpc for Slackware >= 14.2-current)+#  (set in /etc/rc.d/rc.nfsd for Slackware <= 14.2 or /etc/default/rpc for Slackware >= 14.2-current)
 $IPTABLES -A INPUT -i $EXTIF -p tcp -s $LOCAL_LAN --dport 32767 -j ACCEPT $IPTABLES -A INPUT -i $EXTIF -p tcp -s $LOCAL_LAN --dport 32767 -j ACCEPT
 $IPTABLES -A INPUT -i $EXTIF -p udp -s $LOCAL_LAN --dport 32767 -j ACCEPT $IPTABLES -A INPUT -i $EXTIF -p udp -s $LOCAL_LAN --dport 32767 -j ACCEPT
 # Accept TCP and UDP on port 32768 from local LAN for lockd # Accept TCP and UDP on port 32768 from local LAN for lockd
-#  (set in /etc/sysctl.conf or /etc/default/rpc for Slackware >= 14.2-current)+#  (set in /etc/sysctl.conf for Slackware <= 14.2 or /etc/default/rpc for Slackware >= 14.2-current)
 $IPTABLES -A INPUT -i $EXTIF -p tcp -s $LOCAL_LAN --dport 32768 -j ACCEPT $IPTABLES -A INPUT -i $EXTIF -p tcp -s $LOCAL_LAN --dport 32768 -j ACCEPT
 $IPTABLES -A INPUT -i $EXTIF -p udp -s $LOCAL_LAN --dport 32768 -j ACCEPT $IPTABLES -A INPUT -i $EXTIF -p udp -s $LOCAL_LAN --dport 32768 -j ACCEPT
 # Accept TCP and UDP on port 32769 from local LAN for rquotad # Accept TCP and UDP on port 32769 from local LAN for rquotad
-#  (set in /etc/rc.d/rc.nfsd or /etc/default/rpc for Slackware >= 14.2-current)+#  (set in /etc/rc.d/rc.nfsd for Slackware <= 14.2 or /etc/default/rpc for Slackware >= 14.2-current)
 $IPTABLES -A INPUT -i $EXTIF -p tcp -s $LOCAL_LAN --dport 32769 -j ACCEPT $IPTABLES -A INPUT -i $EXTIF -p tcp -s $LOCAL_LAN --dport 32769 -j ACCEPT
 $IPTABLES -A INPUT -i $EXTIF -p udp -s $LOCAL_LAN --dport 32769 -j ACCEPT $IPTABLES -A INPUT -i $EXTIF -p udp -s $LOCAL_LAN --dport 32769 -j ACCEPT
Line 312: Line 314:
  
 ====== Sources ====== ====== Sources ======
 +
   * http://nfs.sourceforge.net/nfs-howto/   * http://nfs.sourceforge.net/nfs-howto/
   * http://rlworkman.net/howtos/NFS_Firewall_HOWTO   * http://rlworkman.net/howtos/NFS_Firewall_HOWTO
 howtos:network_services:home_nfs_howto ()