NFS client cannot mount with iptables enabled
Issue
Mount fails when iptables service is enabled with the following rule:
# cat /etc/sysconfig/iptables
# Generated by iptables-save v1.4.7 on Tue Aug 27 13:29:46 2013
*nat
:PREROUTING ACCEPT [13:696]
:POSTROUTING ACCEPT [0:0]
:OUTPUT ACCEPT [0:0]
-A POSTROUTING -j MASQUERADE <---------------------------
COMMIT
# Completed on Tue Aug 27 13:29:46 2013
# Generated by iptables-save v1.4.7 on Tue Aug 27 13:29:46 2013
*filter
:INPUT ACCEPT [28:2528]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [20:3280]
COMMIT
# Completed on Tue Aug 27 13:29:46 2013
The mount error received is:
# mount nfsserver.example.com:/export /mnt
mount.nfs: access denied by server while mounting nfsserver.example.com:/export /mnt
Environment
- Red Hat Enterprise Linux 6.2
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.