Enjoy Slackware 15.0!
Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision Last revision Both sides next revision | ||
howtos:network_services:home_nfs_howto [2013/01/28 17:35 (UTC)] hazel [Home NFS Setup HOWTO] |
howtos:network_services:home_nfs_howto [2019/04/06 13:49 (UTC)] ellendhel Using proper section headers |
||
---|---|---|---|
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 --> |
====== 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. | ||
- | **Important files -** | + | ===== Access settings ===== |
**/ | **/ | ||
Line 60: | Line 62: | ||
mountd: 10.1.1.2 | mountd: 10.1.1.2 | ||
statd: 10.1.1.2</ | statd: 10.1.1.2</ | ||
- | 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 |
**/ | **/ | ||
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 | + | * Allowing access to the entire root file system is very permissive. Restriction to a sub-directory |
* 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 ===== | ||
**/ | **/ | ||
Line 88: | Line 92: | ||
Check that this file is executable on both computers. (Not strictly necessary as / | Check that this file is executable on both computers. (Not strictly necessary as / | ||
- | To use NFS through the firewall | + | ===== Binding ports ===== |
+ | |||
+ | **a) Slackware versions up to 14.2** | ||
+ | |||
+ | To use NFS through the firewall follow this guide that is quoted verbatim. Thanks rworkman! | ||
From http:// | From http:// | ||
< | < | ||
Line 227: | Line 235: | ||
</ | </ | ||
+ | |||
+ | **b) Slackware version after 14.2** | ||
+ | |||
+ | To use NFS through the firewall is now easier, as options for NFS can be set in / | ||
+ | |||
+ | **/ | ||
+ | |||
+ | < | ||
+ | |||
+ | # Optional arguments passed to rpcbind. See rpcbind(8) | ||
+ | # | ||
+ | # | ||
+ | # Optional arguments passed to rpc.statd. See rpc.statd(8) | ||
+ | # | ||
+ | # Optional hostname to start rpc.statd with. | ||
+ | # | ||
+ | # Port rpc.statd should listen on. | ||
+ | RPC_STATD_PORT=32766 | ||
+ | # Outgoing port rpc.statd should use. | ||
+ | RPC_STATD_OUTGOING_PORT=32765 | ||
+ | # | ||
+ | # Optional options passed to rquotad. See rquotad(8) | ||
+ | # | ||
+ | # Optional port rquotad should listen on: | ||
+ | RPC_RQUOTAD_PORT=32769 | ||
+ | # | ||
+ | # TCP port rpc.lockd should listen on: | ||
+ | LOCKD_TCP_PORT=32768 | ||
+ | # UDP port rpc.lockd should listen on: | ||
+ | LOCKD_UDP_PORT=32768 | ||
+ | # | ||
+ | # Optional arguments passed to rpc.mountd. See rpc.mountd(8) | ||
+ | # | ||
+ | # Port rpc.mountd should listen on: | ||
+ | RPC_MOUNTD_PORT=32767 | ||
+ | #</ | ||
+ | |||
+ | ===== Firewall settings ===== | ||
**/ | **/ | ||
Line 238: | Line 284: | ||
$IPTABLES -A INPUT -i $EXTIF -p tcp -s $LOCAL_LAN --dport 2049 -j ACCEPT | $IPTABLES -A INPUT -i $EXTIF -p tcp -s $LOCAL_LAN --dport 2049 -j ACCEPT | ||
$IPTABLES -A INPUT -i $EXTIF -p udp -s $LOCAL_LAN --dport 2049 -j ACCEPT | $IPTABLES -A INPUT -i $EXTIF -p udp -s $LOCAL_LAN --dport 2049 -j ACCEPT | ||
- | # Accept TCP and UDP on port 32765 from local LAN for statd listen (set in / | + | # Accept TCP and UDP on port 32765 from local LAN for statd listen |
+ | # | ||
$IPTABLES -A INPUT -i $EXTIF -p tcp -s $LOCAL_LAN --dport 32765 -j ACCEPT | $IPTABLES -A INPUT -i $EXTIF -p tcp -s $LOCAL_LAN --dport 32765 -j ACCEPT | ||
$IPTABLES -A INPUT -i $EXTIF -p udp -s $LOCAL_LAN --dport 32765 -j ACCEPT | $IPTABLES -A INPUT -i $EXTIF -p udp -s $LOCAL_LAN --dport 32765 -j ACCEPT | ||
- | # Accept TCP and UDP on port 32766 from local LAN for statd send (set in / | + | # Accept TCP and UDP on port 32766 from local LAN for statd send |
+ | # | ||
$IPTABLES -A INPUT -i $EXTIF -p tcp -s $LOCAL_LAN --dport 32766 -j ACCEPT | $IPTABLES -A INPUT -i $EXTIF -p tcp -s $LOCAL_LAN --dport 32766 -j ACCEPT | ||
$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 (set in / | + | # Accept TCP and UDP on port 32767 from local LAN for mountd |
+ | # | ||
$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 (set in / | + | # Accept TCP and UDP on port 32768 from local LAN for lockd |
+ | # | ||
$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 (set in / | + | # Accept TCP and UDP on port 32769 from local LAN for rquotad |
+ | # | ||
$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 263: | Line 314: | ||
====== Sources ====== | ====== Sources ====== | ||
+ | |||
* http:// | * http:// | ||
* http:// | * http:// |