Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Security
User Name
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.


  Search this Thread
Old 06-14-2012, 02:50 PM   #1
LQ Newbie
Registered: Apr 2008
Location: MD
Distribution: CentOS, Fedora
Posts: 23
Blog Entries: 1

Rep: Reputation: 1
NFS mount over SSH tunnel

I have two private networks separated by public internet. I cannot set up a proper VPN. I'll identify the two private networks as network A and network B. I have a Centos6 (nodeA) box on network A that needs mount an NFS volume from network B. The NFS service is running on a Netapp appliance and is in production (so I can't statically configure the various NFS service ports). What I was thinking I might be able to do is set up an SSH tunnel between nodeA and a bastion host on network B (nodeB). Let's say the IP address of the netapp appliance in network B was

I was thinking I might be able to set up some sort of tunnel from nodeA to nodeB i.e. ssh root@nodeB -L 0-65535:

Then I could configure nodeA:/etc/fstab such that it would mount the NFS server as There doesn't seem to be a "range" option with using the "-L" ssh option. 0-65535 is definitely an overkill. I suppose I just need portmap port of 111 and all non privileged ports 1024-65535. However, you get the point?

Eventually I'm going to set up a proper VPN between these two private subnets, however that's 2 weeks away and I'm hoping to come up with a temporary solution before then.



-Jeremy (rubanek)
Old 06-14-2012, 02:58 PM   #2
Senior Member
Registered: Feb 2002
Location: harvard, il
Distribution: Ubuntu 11.4,DD-WRT micro plus ssh,lfs-6.6,Fedora 15,Fedora 16
Posts: 3,233

Rep: Reputation: 404Reputation: 404Reputation: 404Reputation: 404Reputation: 404
since you are using ssh, quick and dirty solution would be to install fuse-sshfs
# yum install fuse-sshfs
on the client machine then
# sshfs -o allow_other user@host:/folder /mountpoint
and you can mount an ssh connection as a drive, instead of having to worry about forwarding nfs ports

just a thought
1 members found this post helpful.
Old 06-14-2012, 07:44 PM   #3
Registered: Mar 2008
Posts: 17,937

Rep: Reputation: 2676Reputation: 2676Reputation: 2676Reputation: 2676Reputation: 2676Reputation: 2676Reputation: 2676Reputation: 2676Reputation: 2676Reputation: 2676Reputation: 2676
Can the netapp do any sort of tunnel?


nfs, ssh, tunneling

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
NFS mount through reversed SSH tunnel ultrauser Linux - Networking 3 05-14-2012 12:54 AM
NFS mount over ssh using autofs ciphyre Linux - Server 0 11-25-2008 01:08 PM
nfs over ssh : mount failed oudoubah Linux - Networking 1 01-08-2007 02:17 AM
Can I mount NFS over the Internet through secure tunnel??? cvega99 Linux - Networking 1 03-10-2003 06:19 AM > Forums > Linux Forums > Linux - Security

All times are GMT -5. The time now is 11:51 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration