Difference between revisions of "NFS Share mount over SSH Tunnel"
Jump to navigation
Jump to search
(Created page with "==== used OS-Debian ==== On Server: * sshd installed * nfs-kernel-server package installed * rpcbind installed at /etc/exports set: <pre> /usbdrive localhost(rw,as...") |
|||
Line 17: | Line 17: | ||
Open 2 Terminals / Consoles, DO NOT send to BACKGROUND! cause that you can disconnect by STRG+C fast! | Open 2 Terminals / Consoles, DO NOT send to BACKGROUND! cause that you can disconnect by STRG+C fast! | ||
Enter now | Enter now | ||
+ | |||
on Terminal 1: | on Terminal 1: | ||
<pre> | <pre> | ||
ssh -L 3049:localhost:2049 USER@SERVERIP | ssh -L 3049:localhost:2049 USER@SERVERIP | ||
</pre> | </pre> | ||
+ | |||
on Terminal 2 | on Terminal 2 | ||
<pre> | <pre> |
Latest revision as of 02:09, 4 November 2017
used OS-Debian
On Server:
- sshd installed
- nfs-kernel-server package installed
- rpcbind installed
at /etc/exports set:
/usbdrive localhost(rw,async,no_root_squash,no_subtree_check,crossmnt,insecure)
- insecure allow usage over localhost!
On Client:
- ssh client installed
- nfs-common Metapackage installed
Open 2 Terminals / Consoles, DO NOT send to BACKGROUND! cause that you can disconnect by STRG+C fast! Enter now
on Terminal 1:
ssh -L 3049:localhost:2049 USER@SERVERIP
on Terminal 2
sudo mount -t nfs localhost:/usbdrive /mnt -o port=3049,proto=tcp,soft,nosharecache
Port is internal redirected from 2049 (nfsd) to 3049 at localhost! nosharecache is helping against freezes, soft helps against freezes at lookups of slow Networks
Advantage? No public external NFS Shares, all transfer is ENCRYPTED! May somtimes slow but very secure!