Ask Your Question
1

Configure nfs on fedora server (f22)

asked 2015-06-21 05:45:08 -0500

spacemoose gravatar image

I don't think this is fedora 22 specific, but I am running Fedora 22 on both client and server.

I followed the instructions in the fedora documentation regarding the issue, and I have setup an NFS share on a server, and I am able to mount the NFS drive from the client, but after every reboot of the server I have to do the following:

systemctl start rpcbind
firewall-cmd --add-port=2049/udp ; firewall-cmd --add-port=2049/tcp; firewall-cmd --add-port=111/udp; firewall-cmd --add-port=111/tcp

I got the firewall commands off the net, and I don't know if all of them are necessary for the NFS mount to work correctly, but with those two steps everything works fine until the next reboot.

What do I have to do so that rpcbind starts after reboot, and so that the firewall has the correct ports open?

Additionally, it seems that it would be good to update the Fedora documentation so that following the documentation is sufficient to run an NFS server, without further problem solving. Is this an oversight, or is this something I could submit as a patch to the documentation?

edit retag flag offensive close merge delete

Comments

What would be the way to find out what ports are needed for NFS? (Using F21 workstation with Gnome). What is the easiest way to limit access to my NFS share to only a certain IP on my network?

florian gravatar imageflorian ( 2015-08-05 14:28:51 -0500 )edit

@spacemoose, if you're referring to the documentation at https://docs.fedoraproject.org , patches are absolutely welcome. The Docs team's mailing list is at https://lists.fedoraproject.org/mailm... .

randomuser gravatar imagerandomuser ( 2015-09-12 10:59:43 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
2

answered 2015-06-21 23:22:44 -0500

aeperezt gravatar image

You need to add --permanent to your firewall-cmd so the keep working after a reboot so you need to do like this:

firewall-cmd --permanent --add-port=2049/udp ; firewall-cmd --permanent --add-port=2049/tcp; firewall-cmd --permanent --add-port=111/udp; firewall-cmd --permananet --add-port=111/tcp;

Other wize ports will remain open until your next reboot

edit flag offensive delete link more

Comments

What would be the way to find out what ports are needed for NFS? (Using F21 workstation with Gnome). What is the easiest way to limit access to my NFS share to only a certain IP on my network? Is there a graphical tool for Gnome to manage the firewall under Fedora 21?

florian gravatar imageflorian ( 2015-08-05 14:29:00 -0500 )edit

There is firewall-config that works with firewalld, there is a file call services on /etc that list all available services there your will find nfs and all standard ports it uses

aeperezt gravatar imageaeperezt ( 2015-08-05 19:56:38 -0500 )edit

Took me a while to test your answer, so it took me a while to accept it. Thanks for the help.

spacemoose gravatar imagespacemoose ( 2015-09-12 10:32:22 -0500 )edit

firewalld knows about nfs as a service; rather that allow the ports, you can allow the service via firewall-cmd --add-service nfs --permanent;firewall-cmd reload. If you are enabling some other service, check the output of firewall-cmd --get-services for other predefined profiles.

randomuser gravatar imagerandomuser ( 2015-09-12 10:57:14 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

2 followers

Stats

Asked: 2015-06-21 05:45:08 -0500

Seen: 2,539 times

Last updated: Jun 21 '15