We are developing an embedded device that runs on Linux and uses NFS mounts to aid in development. We are working in two private network spaces (172.16.x.y
and 192.168.0.n
). The 192
network contains 40Mb/s
multicast traffic that the device needs, but in order not to swamp the 172
network the network traffic is generated by a Windows 2008 R2 Server. The Windows Server 2008 box has 2 NICs - one for 192
(generated from the DHCP server on it) and one for 172
network (the default gateway on the Windows box points to the 172
gateway)
In our development environment we have the following connections:
Device 172.16.50.100 (static)]----[Gateway (172.16.15.200)]----[Ubuntu Linux Server 172.16.10.100]
The device is able to mount and execute code on the 172.16.10.100
server.
However, when we move the device to the Windows Server network:
Device 192.168.0.2(dhcp)]---[Server 2008 (192.16.0.1)(dhcp server) NIC2(172.16.50.200)]---[Ubuntu Linux Server 172.16.10.100]
Now the device is unable to mount the NFS directories:
\$ mount -t nfs 172.16.10.100:<path> hd
mount: 172.16.10.100:<path> failed, reason given by server: Permission denied
mount: mounting 172.16.10.100:<path> on hd failed: Bad file descriptor
We can ping the server:
\$ ping -c 1 172.16.10.100
PING 172.16.10.100 (172.16.10.100): 56 data bytes
64 bytes from 172.16.10.100: seq=0 ttl=64 time=1.231 ms
--- 172.16.10.100 ping statistics ---
1 packets transmitted, 1 packets received, 0% packet loss
round-trip min/avg/max = 1.231/1.231/1.231 ms
Hence the device can see the Ubuntu server fine when it is on the 192
network, but is unable to mount the NFS.
We have disabled the Windows Server 2008 Firewall as well.
How do we get the NFS data to pass through the server?
Thanks.
@tigran - thank you for the help. You raised some very important points.
The problem here was actually port numbers.
In the first scenario:
The device was requesting:
However, in the second scenario:
The Windows Server was changing the port number:
According to Man Help Pages for the export file:
Seeing that this is a closed private network, we have updated the
/etc/exports
file to have:For reference, the debug lines come from
/var/log/syslog
after changing/etc/default/nfs-kernel-server
file to include: