The Problem

When exporting an NFS share from Linux NFS Server, it is able to list the share from localhost:

[[email protected]]# exportfs -a
[[email protected] ~]# exportfs
/data [world]
[[email protected] ~]# showmount -e localhost
Export list for localhost:
/data *

However encounter error when list NFS shares from NFS Client:

[[email protected] ~]# showmount -e server
clnt_create: RPC: Port mapper failure - Authentication error
[[email protected] ~]# rpcinfo server
rpcinfo: can't contact rpcbind: : RPC: Authentication error; why = Client credential too weak

The Solition

This is due to incorrect TCP Wrapper setting:

$ cat /etc/hosts.allow
sshd : ALL
snmpd : ALL
vsftpd : ALL
ALL : localhost
$ cat /etc/hosts.deny

The configuration by default deny all traffic from any servers, except the following:

  • connection from localhost
  • connection to sshd, snmpd, and vfstpd

Add the following to /etc/hosts.allow to allow access to rpcbind on NFS server:

# vi /etc/hosts.allow
rpcbind: ALL