LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Security
User Name
Password
Linux - Security This forum is for all security related questions.
Questions, tips, system compromises, firewalls, etc. are all included here.

Notices



Reply
 
Search this Thread
Old 06-14-2012, 03:50 PM   #1
rubanek
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 10.0.0.10.

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:10.0.0.10:0-65535.

Then I could configure nodeA:/etc/fstab such that it would mount the NFS server as 127.0.0.1. 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.

Thoughts/Ideas?

Thanks,

-Jeremy (rubanek)
 
Old 06-14-2012, 03:58 PM   #2
frieza
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,111

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
since you are using ssh, quick and dirty solution would be to install fuse-sshfs
Code:
# yum install fuse-sshfs
on the client machine then
Code:
# 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, 08:44 PM   #3
jefro
Guru
 
Registered: Mar 2008
Posts: 12,087

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

http://nfs.sourceforge.net/nfs-howto/ar01s06.html
 
  


Reply

Tags
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 01:54 AM
NFS mount over ssh using autofs ciphyre Linux - Server 0 11-25-2008 02:08 PM
nfs over ssh : mount failed oudoubah Linux - Networking 1 01-08-2007 03:17 AM
Can I mount NFS over the Internet through secure tunnel??? cvega99 Linux - Networking 1 03-10-2003 07:19 AM


All times are GMT -5. The time now is 12:30 PM.

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