I have a machine (RHEL 6.1) NFS sharing a folder over 2 network interfaces, one internal to a lab, the other external. /etc/exports looks like this -
(I have redacted the IP of the other, public machine)

Code:

/programs 192.168.1.0/255.255.255.0(rw) ###.###.##.###/32(rw)

Now on machine ###.###.##.### (running CentOS 5.7) I do a showmount -e <sharehost public interface> and get

Code:

/programs 192.168.1.0/255.255.255.0

See? From the external machine, /programs looks like it's being exported to the internal network only.

HOWEVER, if from external machine ###.###.##.###, I try to mount /programs, it mounts fine. It just doesn't look like it *should* work!

Very bizarre. I don't understand why. Anybody?

- Van

T3RM1NVT0R

09-30-2011 02:22 PM

@ Reply

Hi there,

Quote:

/programs 192.168.1.0/255.255.255.0(rw) ###.###.##.###/32(rw)

How a network could be /32 because then there will not be any valid IPs/hosts.

Do a tracepath from your CentOS machine and let us know how it is reaching your RHEL server.

TenTenths

10-05-2011 06:11 AM

Quote:

Originally Posted by T3RM1NVT0R
(Post 4486639)

How a network could be /32 because then there will not be any valid IPs/hosts.

/32 is a perfectly valid hostmask and will restrict to the given IP only.

fukawi1

10-05-2011 08:43 AM

Im not sure why its doing that as such,
but if you create a new entry for the redacted IP, and remove it from the first, i think it might fix it, although i have nothing to base that on :P

T3RM1NVT0R

10-05-2011 04:12 PM

@ Reply

@ TenTenths

Yup you are right. Got confused as merely putting the IP without any mask will be sufficient.

@ OP

I tried to duplicate the issue but wasn't able to. It is indeed strange issue. Even if it is exported only to local network it should show me both the IPs

This is what I have tested. Configured one machine with two interfaces: internal and external and configured NFS share for both internal and external network. Configured client machine with only on interface with external IP.

When I run showmount -e external_ip_of_nfs_server it shows me both the IPs to which nfs share is being shared. Since I didn't have internal IP bind on the client machine it should have showed me public interface share only but it did show me internal share as well. Ideally it should show both shares with both IPs.