# nfs remote server refusing access

## ExecutorElassus

I have two boxes: my main gentoo box, which is ~amd64 with consolekit, and my laptop, which is running Ubuntu 13.10.

On my main, I have the following in /etc/exports:

```
# /etc/exports: NFS file systems being exported.  See exports(5).

/home/myhome choriac(rw,no_subtree_check)

/home/myhome/carrier9 choriac(rw,no_subtree_check)

/home/myhome/carrier5 choriac(rw,no_subtree_check)

/home/myhome/carrier7 choriac(rw,no_subtree_check)

/home/myhome/carrier8 choriac(rw,no_subtree_check)

/home/myhome/carrier1 choriac(rw,no_subtree_check)

/mnt/usb choriac(rw,no_subtree_check)

```

"choriac" is the laptop, and properly identified in /etc/hosts:

```
192.168.1.111   choriac
```

on the laptop, I have the following in /etc/exports:

```
/home/myhome    192.168.1.*(rw,sync,no_root_squash,no_subtree_check)
```

and my main box identified in /etc/hosts:

```
127.0.0.1          localhost

127.0.01           choriac

192.168.1.11       domo-kun
```

I can mount the shares in my main from the laptop with no issue, that is:

```
$sudo mount domo-kun:/home/myhome domo-kun/
```

but if I try in the other direction (from box to laptop), I get this:

```
# mount choriac:/home/myhome/ choriac/

mount.nfs: access denied by server while mounting choriac:/home/myhome/
```

the laptop appears to be using NFSv4; could this perhaps be the problem? Have I misconfigured something in the exports file?

the NFS servers are reporting running on both machines, and I've run 'exportfs -a' on both. 'showmount -e' returns "/home/myhome 192.168.1.*" on the laptop.

Any advice?

Cheers,

EE

----------

## nativemad

Hi, 

if choriac is your main box, then you're just allowing itself to its exports....   :Laughing: 

Also, I don't know if name lookups are done properly, so I'd test it with the ip (as you've done it on the laptops exports).

Furthermore, the hosts entry for choriac misses a dot! "127.0.01"

HTH, Cheers

----------

## ExecutorElassus

Hi nativemad,

"choriac" is the laptop that's refusing the connections. "domo-kun" is the main. I can mount domo-kun's shares from choriac, but not the other way around.

The mis-typed host entry was my fault in transcription, and is correct in choriac's /etc/hosts file.

Does this make the difficulties perhaps more clear? Sorry it's muddled. 

Cheers,

EE

----------

## nativemad

okok, I'd still try it with an ip instead of the name in the exports...  :Wink: 

Do you see anything useful with dmesg (on both ends), if you try to mount?

----------

## ExecutorElassus

tried it with IP explicitly, with the same result. dmesg on either machine says nothing. Just "access denied."

 :Sad: 

----------

## nativemad

Ahhh... sorry, sometimes it takes a bit to understand correctly!   :Embarassed: 

Wildcards aren't allowed for ip addresses in the exports file!  This should do it:

/home/myhome    192.168.1.0/24(rw,sync,no_root_squash,no_subtree_check)

----------

## ExecutorElassus

no worries about clarity. I'm bad at it.

that exports file, however, did not do it. Nor did explicitly stating domo-kun's IP. 

 :Sad: 

Thanks for the help, though. Any other suggestions?

Cheers,

EE

----------

## nativemad

hmmm... I guess an nfs version mismatch would be shown in dmesg, but anyway... 

Have you enabled the nfs(4) client in the gentoo kernel and enabled the USEflag on nfs-utils?

----------

## ExecutorElassus

hrm … evidently I did not have NFSv4 enabled in my kernel config. re-compiling now; I'll get back to you after I reboot.

nfs-utils seems to have nfsv4 explicitly enabled.

Stay tuned!

EE

----------

