Centos7 not allowing nfs to be served

5,905

Solution 1

sadly enough even though I told the firewall to allow all it did not.

a tutorial on www.unixmen.com for nfs had the best solution I have seen so far

firewall-cmd --permanent --add-port=111/tcp ... etc for the related ports.

Solution 2

I've just run into this same issue in CentOS 7.4, and it turns out that you need to allow 3 services in firewalld:

firewall-cmd --add-service=nfs
firewall-cmd --add-service=rpc-bind
firewall-cmd --add-service=mountd

Sadly the documentation seems to be missing any references to having to allow mountd (port 20048).

Share:
5,905

Related videos on Youtube

Kendrick
Author by

Kendrick

I have interests in electronics, coding, and construction. I learn the other stuff to make those happen.

Updated on September 18, 2022

Comments

  • Kendrick
    Kendrick almost 2 years

    I just did a fresh centos7 and fedora 20 install on 2 systems. I have several current systems running on the network and can connect to an existing nfs share no problems. when any system triest to connect to the centos7 for rpc or nfs they get rpc errors. "mount.nfs4: mount(2): No route to host" for example. list rpc on the server and it lists all services remotely and it errors. other applications have no issues connecting to the centos7 system.

    I have verified it has all packages installed needed for nfs and the services state they are started with pids. rpcbind does not visibally list as being bound to localhost. I can mount the drive locally no issues. If I do showmount -e = "clnt_create: RPC: Program not registered" on both centos7 and fedora 20. I have flushed all firewall rules and set selinux to permissive.

    Any thoughts would be greatly appriciated.

    • kofemann
      kofemann almost 10 years
      check the firewall settings on your centos7 host.