I'm trying to NFS-mount a CentOS directory on my Fedora laptop, but I find I can only do this is I turn off the firewall on the CentOS server.
If instead I go to system-config-securitylevel-tui on the server, and allow NFS4, this does not do the trick. Nor does allowing port 2049.
What do I need to allow?
[I should say that the CentOS server is remote, and difficult to access directly; that is why I used system-config-securitylevel-tui, rather than system-config-securitylevel .]
Timothy Murphy wrote:
I'm trying to NFS-mount a CentOS directory on my Fedora laptop, but I find I can only do this is I turn off the firewall on the CentOS server.
If instead I go to system-config-securitylevel-tui on the server, and allow NFS4, this does not do the trick. Nor does allowing port 2049.
What do I need to allow?
Look at the firewall logs, RPC services use somewhat random ports, you can look at what ports are being used with the 'rpcinfo' command, you can also look at hard coding what ports are used to make firewall configuration simpler(don't have docs off hand, search for them, easy to find).
nate
On Mon, 2009-12-28 at 23:30 +0100, Timothy Murphy wrote:
I'm trying to NFS-mount a CentOS directory on my Fedora laptop, but I find I can only do this is I turn off the firewall on the CentOS server.
If instead I go to system-config-securitylevel-tui on the server, and allow NFS4, this does not do the trick. Nor does allowing port 2049.
What do I need to allow?
Here is my note regarding how to make this work:
Create the file "/etc/sysconfig/nfs" and add the following contents:
STATD_PORT=4001 LOCKD_TCPPORT=4002 LOCKD_UDPPORT=4002 MOUNTD_PORT=4003
Append the following to the file "/etc/services":
rquotad 4004/tcp # rpc.rquotad tcp port rquotad 4004/udp # rpc.rquotad udp port
Restart the nfs services
From there, open these ports -> 111:tcp, 111:udp, 2049:tcp, 2049:udp,
4001:tcp, 4001:udp, 4002:tcp, 4002:udp, 4003:tcp, 4003:udp, 4004:tcp, 4004:udp
Hi,
You only need rpcidmapd, portmap on the centos box
Edit the /etc/sysconfig/nfs
And use /export filesystem as the fsid=0 on the /etc/exportfs
Export all directories you need mounted on the /export with the -o bind on the mount command, and add refer=/dir on /etc/exportfs on the nfs4 server
you want to add the rpc and nfs mounts on the fstab too rpc_pipefs /var/lib/nfs/rpc_pipefs rpc_pipefs defaults 0 0 nfsd /proc/fs/nfsd nfsd defaults 0 0
Fernando
On Mon, 28 Dec 2009 16:59:30 -0600 Frank Cox theatre@sasktel.net wrote:
On Mon, 2009-12-28 at 23:30 +0100, Timothy Murphy wrote:
I'm trying to NFS-mount a CentOS directory on my Fedora laptop, but I find I can only do this is I turn off the firewall on the CentOS server.
If instead I go to system-config-securitylevel-tui on the server, and allow NFS4, this does not do the trick. Nor does allowing port 2049.
What do I need to allow?
Here is my note regarding how to make this work:
Create the file "/etc/sysconfig/nfs" and add the following contents:
STATD_PORT=4001 LOCKD_TCPPORT=4002 LOCKD_UDPPORT=4002 MOUNTD_PORT=4003
Append the following to the file "/etc/services":
rquotad 4004/tcp # rpc.rquotad tcp port rquotad 4004/udp # rpc.rquotad udp port
Restart the nfs services
From there, open these ports -> 111:tcp, 111:udp, 2049:tcp, 2049:udp,
4001:tcp, 4001:udp, 4002:tcp, 4002:udp, 4003:tcp, 4003:udp, 4004:tcp, 4004:udp
-- MELVILLE THEATRE ~ Melville Sask ~ http://www.melvilletheatre.com
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos