LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 04-28-2009, 12:50 PM   #1
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
mount nfs thru router


hi, i am trying to nfs outside of my house.
i have a netgear wgr614v8 router. in the port forwarding section i map port 2049 to my linux machine.
here is the pertinent info about the server:
Code:
[schneidz@hyper schneidz]$ cat /etc/exports
/home/schneidz           192.168.5.100(rw,insecure,sync,all_squash,anonuid=500,anongid=500)
/media                   *(rw,insecure,sync)
/mnt/dos                *(rw,insecure,sync)
/tmp            (ro,insecure,all_squash)
[schneidz@hyper schneidz]$ cat /etc/hosts.allow
#
# hosts.allow   This file describes the names of the hosts which are
#               allowed to use the local INET services, as decided
#               by the '/usr/sbin/tcpd' server.
#
ALL: ALL
[schneidz@hyper schneidz]$ cat /etc/hosts.deny
#
# hosts.deny    This file describes the names of the hosts which are
#               *not* allowed to use the local INET services, as decided
#               by the '/usr/sbin/tcpd' server.
#
# The portmap line is redundant, but it is left to remind you that
# the new secure portmap uses hosts.deny and hosts.allow.  In particular
# you should know that NFS uses portmap!
i'm able to mount it ok from within the network but i cant mount my hard drive thru the router when i am away from home.
the successful mounts look like this in /var/log/messages:
Code:
Apr 28 13:31:46 pcp04663196pcs rpc.mountd: authenticated mount request from 192.168.5.3:740 for /media (/media)
Apr 28 13:31:59 pcp04663196pcs rpc.mountd: authenticated unmount request from 192.168.5.3:742 for /media (/media)
Apr 28 13:32:12 pcp04663196pcs rpc.mountd: authenticated mount request from 192.168.5.3:744 for /media (/media)
Apr 28 13:32:21 pcp04663196pcs rpc.mountd: authenticated unmount request from 192.168.5.3:746 for /media (/media)
the portmapper is giving a random port. there is no message for the unsuccessful attempts but it hangs for about 1 minute and then i keep getting this error:
Code:
mount: RPC: Remote system error - Connection refused
i tried forcing the port by stopping nfsd and running rpc.mountd -p 2049 but that didnt work.

is this possible ?

Last edited by schneidz; 04-28-2009 at 01:33 PM.
 
Old 04-29-2009, 05:54 AM   #2
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
NFS isn't secure over the internet. Because it uses multiple ports and both tcp and udp, it doesn't fit inside an ssh tunnel. It would be better to use scp or sftp instead to download or upload files. There may be a way to force NFS4 to operate securely over the internet. That would take a lot of research and work. Scp is a lot easier.

There is also webDAV.
 
1 members found this post helpful.
Old 04-29-2009, 07:50 AM   #3
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Maybe sshfs: http://www.linuxjournal.com/article/8904
 
1 members found this post helpful.
Old 02-10-2021, 08:49 AM   #4
adamf663
LQ Newbie
 
Registered: Aug 2010
Posts: 3

Rep: Reputation: 1
Quote:
Originally Posted by jschiwal View Post
NFS isn't secure over the internet. Because it uses multiple ports and both tcp and udp, it doesn't fit inside an ssh tunnel. It would be better to use scp or sftp instead to download or upload files. There may be a way to force NFS4 to operate securely over the internet. That would take a lot of research and work. Scp is a lot easier.

There is also webDAV.
There are times when there is nat translation without the other side being the internet. For example a VM using a nat virtual network.
 
Old 02-22-2021, 08:17 PM   #5
schneidz
LQ Guru
 
Registered: May 2005
Location: boston, usa
Distribution: fedora-35
Posts: 5,313

Original Poster
Rep: Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918Reputation: 918
wow, a 12 year old bump.
 
  


Reply



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
how to mount a nfs mount from linux client to AIX nfs server dennyqian AIX 13 04-11-2016 11:30 PM
[SOLVED] mount.nfs: mount to NFS server 'rpcbind' failed w1k0 Slackware 4 03-30-2010 03:45 PM
NFS mount of smb mount of windows share: permission denied problem :( Bagatur Linux - Networking 4 07-07-2009 11:34 AM
NFS mount mount.nfs: access denied by server while mounting knockout_artist Linux - Newbie 2 11-26-2008 02:36 PM
mount: mount to NFS server '192.168.0.3' failed: System Error: Connection refused. fakie_flip Linux - Server 1 04-10-2008 12:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 12:07 AM.

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
Open Source Consulting | Domain Registration