3

I cannot get my Mac (10.10.3) machine to connect to my Oracle Linux 7 (CentOS/RH 7) server with its firewall up. (I am trying to configure for NFSv3 only; I don't need v4)

I have verified that NFS is working by issuing this command on the Mac (firewall OFF on OL 7 server)

showmount -e myserver.home 

And I get this back:

Export list for myserver:
/var/www 192.168.10.0/24

If I try connecting with Command-K and enter nfs://myserver.home it makes the connection and I can browse, edit and delete files as expected.

Next, I enable the firewall on the OL7 server. I also open the ports as specified by Oracle OL 7 Documentation and when I issue the showmount command again, I get this error message:

showmount: Cannot retrieve info from host: localhost: RPC: Program not registered

If I turn off the firewall and it works again.

So...what ports did I enable?

#firewall-cmd --list-ports
32803/tcp 662/udp 2049/udp 662/tcp 111/udp 32769/udp 892/udp 2049/tcp 892/tcp 111/tcp

I checked to see what RPC was listening on (according to the Admin guide link above, it should be 2049 and 111)

# rpcinfo -p

program vers proto   port  service
100000    4   tcp    111  portmapper
100000    3   tcp    111  portmapper
100000    2   tcp    111  portmapper
100000    4   udp    111  portmapper
100000    3   udp    111  portmapper
100000    2   udp    111  portmapper
100024    1   udp  47793  status
100024    1   tcp  52921  status
100005    1   udp  20048  mountd
100005    1   tcp  20048  mountd
100005    2   udp  20048  mountd
100005    2   tcp  20048  mountd
100005    3   udp  20048  mountd
100005    3   tcp  20048  mountd
100003    3   tcp   2049  nfs
100003    4   tcp   2049  nfs
100227    3   tcp   2049  nfs_acl
100003    3   udp   2049  nfs
100003    4   udp   2049  nfs
100227    3   udp   2049  nfs_acl
100021    1   udp  32769  nlockmgr
100021    3   udp  32769  nlockmgr
100021    4   udp  32769  nlockmgr
100021    1   tcp  32803  nlockmgr
100021    3   tcp  32803  nlockmgr
100021    4   tcp  32803  nlockmgr

And finally my /etc/sysconfig/nfs file:

# Note: For new values to take effect the nfs-config service
# has to be restarted with the following command:
#    systemctl restart nfs-config
#
# Optional arguments passed to in-kernel lockd
#LOCKDARG=
# TCP port rpc.lockd should listen on.
LOCKD_TCPPORT=32803
# UDP port rpc.lockd should listen on.
LOCKD_UDPPORT=32769

MOUNTD_PORT=892
STATD_PORT=662
#
# Optional arguments passed to rpc.nfsd. See rpc.nfsd(8)
RPCNFSDARGS="--port 2049"
# Number of nfs server processes to be started.
# The default is 8. 
#RPCNFSDCOUNT=16
#
# Set V4 grace period in seconds
#NFSD_V4_GRACE=90
#
# Set V4 lease period in seconds
#NFSD_V4_LEASE=90
#
# Optional arguments passed to rpc.mountd. See rpc.mountd(8) 
RPCMOUNTDOPTS=""
#
# Optional arguments passed to rpc.statd. See rpc.statd(8)
STATDARG=""
#
# Optional arguments passed to sm-notify. See sm-notify(8)
SMNOTIFYARGS=""
#
# Optional arguments passed to rpc.idmapd. See rpc.idmapd(8)
RPCIDMAPDARGS=""
#
# Optional arguments passed to rpc.gssd. See rpc.gssd(8)
RPCGSSDARGS=""
#
# Enable usage of gssproxy. See gssproxy-mech(8).
GSS_USE_PROXY="yes"
#
# Optional arguments passed to rpc.svcgssd. See rpc.svcgssd(8)
RPCSVCGSSDARGS=""
#
# Optional arguments passed to blkmapd. See blkmapd(8)
BLKMAPDARGS=""
0

I have solved this issue and wanted to post the answer here in case anyone else had the same difficulties as the documentation on Oracle's Website is incomplete.

We need to open a port for the mountd service. To do this, issue the following commands:

firewall-cmd --permanent --zone=<zone> --add-service  mountd

Make sure to enter your zone name. Mine was "public" but you also have the option of leaving it out and it will select the default zone.

This part was missing from the Oracle documentation. Once I did that, I was able to connect my iMac to my NFS share with no problems.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.