You are not logged in.

#1 2009-03-19 21:22:45

MrAllan
Member
Registered: 2008-12-08
Posts: 132

[SOLVED] Cannot connect to NFS server.

I'm trying to setup a NFS share at home. I have one laptop configured as a server, and one desktop client. Both are running Arch. I can ping both in either way.
For some reason, I cannot connect to the server. At one time, I could connect, but only while having an empty /etc/hosts.deny file (which obviously is very insecure). Now, I cannot even reproduce this.
Thus, I believe the problem is caused by either /etc/hosts.allow or / and by /etc/hosts.deny.

Here is my server's /etc/exports:

/shared 192.168.x.xxx(rw,sync,no_subtree_check,no_root_squash)

And here its /etc/hosts.allow:

ALL:192.168.0.0/255.255.255.0

And finally its /etc/hosts.deny:

ALL: ALL: DENY

Running 'rpcinfo -p' on the server shows output, while running 'rpcinfo -p <server-ip>' on the client prints out 'No remote programs registered.'

From what I've read, when the client wants to connect to the server, the server first checks in hosts.allow to see if the client's allowed to connect. So in my case, it should be able connect.

However, when I run

sudo mount -t nfs 192.168.x.xxx:/ /mnt/SERVER

it tells me

mount.nfs: mount to NFS server '192.168.x.xxx:/`failed: RPC Error: Program not registered

And even if outcomment both hosts.deny and hosts.allow, running the same command prints out

mount.nfs: access denied by server while mounting 192.168.x.xxx:/

I'm clueless. Any help would be greatly appreciated!

Last edited by MrAllan (2009-03-20 15:05:24)

Offline

#2 2009-03-19 21:34:09

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [SOLVED] Cannot connect to NFS server.

You need to run the portmap and nfslock daemons on both the server and the client.

Offline

#3 2009-03-19 22:00:22

MrAllan
Member
Registered: 2008-12-08
Posts: 132

Re: [SOLVED] Cannot connect to NFS server.

tomk wrote:

You need to run the portmap and nfslock daemons on both the server and the client.

Oh, I forgot to mention that I run those already.

Offline

#4 2009-03-19 23:23:27

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [SOLVED] Cannot connect to NFS server.

Missed a detail on first reading. Your server's exports file makes the /shared directory available to 192.168.x.xxx, but your client mount command tries to mount the server's / i.e. root directory. You can only mount directories that have been exported.

btw, there's no need to conceal internal addresses like that - we all have them, and there's no way anyone can use them to track you down. My laptop address is 10.12.62.99, my server is 192.168.10.10, and my irssi/bittorrent/whatever machine is 192.168.10.69. I challenge anyone to hack me. smile

Offline

#5 2009-03-20 15:05:04

MrAllan
Member
Registered: 2008-12-08
Posts: 132

Re: [SOLVED] Cannot connect to NFS server.

tomk wrote:

Missed a detail on first reading. Your server's exports file makes the /shared directory available to 192.168.x.xxx, but your client mount command tries to mount the server's / i.e. root directory. You can only mount directories that have been exported.

btw, there's no need to conceal internal addresses like that - we all have them, and there's no way anyone can use them to track you down. My laptop address is 10.12.62.99, my server is 192.168.10.10, and my irssi/bittorrent/whatever machine is 192.168.10.69. I challenge anyone to hack me. smile

Thanks a lot! Everything's working now.

Offline

#6 2009-03-20 16:59:48

userlander
Member
Registered: 2008-08-23
Posts: 413

Re: [SOLVED] Cannot connect to NFS server.

tomk wrote:

Missed a detail on first reading. Your server's exports file makes the /shared directory available to 192.168.x.xxx, but your client mount command tries to mount the server's / i.e. root directory. You can only mount directories that have been exported.

btw, there's no need to conceal internal addresses like that - we all have them, and there's no way anyone can use them to track you down. My laptop address is 10.12.62.99, my server is 192.168.10.10, and my irssi/bittorrent/whatever machine is 192.168.10.69. I challenge anyone to hack me. smile

But if they know his IP, couldn't they use the lan IP to gain access easier than if they didn't know the subnet addresses? Since the thread is solved, I figured I would ask since I've always wondered about it. wink

Btw, for anyone have unresolved NFS issues, see this bug report. The arch devs aren't responding to it for some reason, can anyone tell me why?

http://bugs.archlinux.org/task/13434

Offline

Board footer

Powered by FluxBB