# nfs router server problem

## agentwd40

Hey guys this is my setup.

I have a server runing gentoo connected directly to the internet. The server has a eth1 connected to an internal dlink router. The router has pc's hooked up to it. The pc's connected to the router cannot mount a NFS partition from the server. Its weird because I can mount a samba share no problem from a pc running windows to the server.

Is the problem because the router has a firewall, and thus the server cant make a connection with the pc's on ther other side of the router?

my exports file  looks like this:

/home/download *(no_root_squash,rw,sync)

any help or something to check would be appreciated thanks

----------

## tuxlover

What kind of an error message are you getting when trying to mount?

Check kernel and syslogs as well. Maybe also check logs on the server.

----------

## agentwd40

the error im getting is:

```
mount: 192.168.1.1:/home/download failed, reason given by server: Permission denied

```

now for logs, nothing shows up for the client side (except the error) but on the server side i get

```
[rpc.mountd] refused mount request from 192.168.1.2 for /home/download (/home/download): illegal port 60032
```

the port "60032 changes", but in the range 60000 - 62102

192.168.1.2 is the ip of the router, i dont think my ip addressing scheme is the problem because all other services work such as samba ssh apache etc etc

----------

## weyhan

Sounds like a firewall problem.  You have a fire wall setup?

--Han

----------

## tuxlover

Not sure that this could be caused by a firewall - after all, the remote procedure call does come through (i.e. is not blocked totally) to the mountd running on the server.

----------

## weyhan

maybe the firewall is setup to allow certain ports? I'm just guessing.

--Han

----------

## tuxlover

Wow, we're fast today  :Smile: 

Anyway I would try disabling all the firewall stuff in the dlink router. To me it's not strange that things like samba and apache work. Samba works just like windows file sharing which is probably enabled by default; apache also just uses a certain, very common port. Don't know why ssh should be working.

Just guesses. I think the problem is probably something completely different, as usual  :Smile: 

----------

## weyhan

 *tuxlover wrote:*   

> Wow, we're fast today 

 

Actually it's sad. Nothing to do on a Friday night but to lurk in the forumn.

 *tuxlover wrote:*   

> Anyway I would try disabling all the firewall stuff in the dlink router. To me it's not strange that things like samba and apache work. Samba works just like windows file sharing which is probably enabled by default; apache also just uses a certain, very common port. Don't know why ssh should be working.
> 
> 

 

I think a lot of router/firewall is preconfigured to work on a M$ network because that is the only network in the world.  :Shocked: 

 *tuxlover wrote:*   

> Just guesses. I think the problem is probably something completely different, as usual 

 

I won't be surprised.   :Very Happy: 

----------

## agentwd40

I dont think it is a firewall problem because i just did a test setup putting up a iptables firewall on the server and avoiding the router, directly connecting a pc, and the error was different

on the client trying to mount the share :

```
mount: RPC: Remote system error - Connection timed out
```

the server of course had no log because it did not get a connection

I think I have an idea of why it doesnt work, let me try and explain. When the host tries to connect to the server (through the router), the server see's the IP address of the router not the host because the ip's are of the private type behind the router, so it looks as if its just 1 host, not a bunch of hosts as is the case. Im not really sure how it works that the router knows how to send the packets to the right host, im guessing it attaches some kinda receiving port i dunno, but my guess is NFS doesnt do this right lol because other services are working correctly

hopefully someone knows where im going with this, is there anything else i could use for networking shares? it is possible to use samba for linux2linux right?

----------

## agentwd40

https://forums.gentoo.org/viewtopic.php?t=77748&highlight=nfs+conf+options

im gonna try that out i'll let u guys know how it goes

----------

## tuxlover

Are you sure the dlink router doesn't simply act as a hub/switch? Which wouldn't lead to problems with ip addresses. I have a very similar setup as yours, just with a hub:

```

[internet]---[server]---[hub]---[client1]

                           \----[client2]

```

I would think that if the dlink router is not connected to the internet itself it should only act as a hub. But I could be wrong. Maybe you can activate a "hub mode" in your dlink router?

----------

## agentwd40

i dunno i dont see anything like that, its still got this shitty firewall

i tried undoing the ports but no go, this router doesnt give me many options

i wonder if i can change the flash on this bitch maybe that'll get me somewhere

thanks for ur help guys

----------

## tuxlover

To find out whether the problem is the dlink, you could connect your client and server with a crossed cable and configure their ips statically. Then if the mount still results in the same error message, you know it's not the dlink.

----------

