# NFS Problems -- illegal port

## wa03

Alright. I took some time to look over the forums and on google. I got some semi-related answers from google, but nothing close on the Gentoo forums. I want to mount an nfs share from my desktop to my laptop so I can listen to my music while out and about. I do not want to have to carry my whole pack of CDs or have to simply put the oggs on my laptop. From now on, we'll call the server "desktop" and the client "laptop." My exports file on desktop is as follows: 

```
/home   130.127.0.0/255.255.0.0(ro,sync,no_root_squash)
```

/etc/fstab on client looks like this:

```
130.127.server.ip:/home    /mnt/desktop nfs noauto,tcp,mountport=0  0 0

```

The tcp and mountport are simply the most recent try on figuring this out. If I have simply noauto for the options, the same result happens. Here is my problem: on client, when I do

```
mount /mnt/desktop
```

I receive the this error:

```
mount: 130.127.server.ip:/home failed, reason given by server: Permission denied
```

Then in /var/log/syslog, I have the following:

```
Mar 21 22:05:40 localhost rpc.mountd: refused mount request from 130.127.client.ip for /home (/home): illegal port 1261

```

The port number on the last message increments from under the 1024 barrier to above and further than it is now. Now here's the odd part. Sometimes it works. I do NOTHING different. I have tried this at different places and get the same result. It's not a firewall issue, either. I completely turn off my firewall (yikes!) and still the same error. Thanks in advance for any help.

wa03

Note: 130.127.server.ip and 130.127.client.ip are simply my masking the ip names so my nfs server is a LITTLE bit less vulnerable.

----------

## nofx911

What user are you trying to mount the export as. If you have not tried doing it as root I would suggest giving that a try. 

To improve security I would suggest taking a look at:

http://www.math.ualberta.ca/imaging/snfs/

-or-

Looking into setting up a VPN and then mounting the export.

----------

## Suicidal

I get that error when I try to connect to my home box from an IP not in my hosts.allow

Also make sure the username you are using has the same uid on both boxes.

 *Quote:*   

> Note: 130.127.server.ip and 130.127.client.ip are simply my masking the ip names so my nfs server is a LITTLE bit less vulnerable.

 

Next time change the first 2 octets to 192.168.*.*  that way you dont reveal you real subnet info at all.

----------

## wa03

When I try to mount, I am root. Also, if the uid was a problem, why would it sometimes work and sometimes not? The next day after I posted, it worked. Go figure, eh? But, the thing is, it'll probably give me the same error when I try it today or the next day.

----------

## Suicidal

Hmm sounds like me with some of the rsync servers out there, I would get errors a few times in a row the all of the sudden it would work.

I compiled my nic driver directly into the kernel and it seemed to improve the situation signifigantly.

----------

