Monday 9 March 2015

Mount nfs4 throw ssh tunnel

GOAL


Need to mount nfs share throw ssh tunnel

SOLUTION


On nfs server side, add following lines in /etc/exports
/myshare      127.0.0.1(rw,fsid=0,insecure,no_subtree_check,sync)


reread nfs configuration
 # exportfs -rv
 exporting nfs-server.labs.localnet:/myshare

On client side
ssh -c blowfish -L 3333:127.0.0.1:2049 nfs-server.labs.localnet
mount -t nfs4 -o rw,hard,intr,proto=tcp,port=3333 127.0.0.1:/myshare /mnt/nfs



No comments:

Post a Comment