I normally have an nfs server running on one of my machines. Now nfs itself and the portmapper start on fixed ports, but the rpc services start on random ports so they need to be assigned fixed ports in /etc/sysconfig/nfs like so:
LOCKD_TCPPORT=4000 STATD_PORT=4002 RQUOTAD_PORT=4003 LOCKD_UDPPORT=4000 MOUNTD_PORT=4001
then open up the corresponding ports in the firewall.
That was as of Fedora 14 which I had running before upgrading to Fedora 19. Now in F19 I did the same thing, but the rpc services seem to start on ports other than the ones I specified:
60) root:~> rpcinfo -p program vers proto port service 100000 4 tcp 111 portmapper 100000 3 tcp 111 portmapper 100000 2 tcp 111 portmapper 100000 4 udp 111 portmapper 100000 3 udp 111 portmapper 100000 2 udp 111 portmapper 100024 1 udp 37527 status 100024 1 tcp 42571 status 100003 2 tcp 2049 nfs 100003 3 tcp 2049 nfs 100003 4 tcp 2049 nfs 100227 2 tcp 2049 nfs_acl 100227 3 tcp 2049 nfs_acl 100003 2 udp 2049 nfs 100003 3 udp 2049 nfs 100003 4 udp 2049 nfs 100227 2 udp 2049 nfs_acl 100227 3 udp 2049 nfs_acl 100021 1 udp 4000 nlockmgr 100021 3 udp 4000 nlockmgr 100021 4 udp 4000 nlockmgr 100021 1 tcp 4000 nlockmgr 100021 3 tcp 4000 nlockmgr 100021 4 tcp 4000 nlockmgr 100011 1 udp 875 rquotad 100011 2 udp 875 rquotad 100011 1 tcp 875 rquotad 100011 2 tcp 875 rquotad 100005 1 udp 20048 mountd 100005 1 tcp 20048 mountd 100005 2 udp 20048 mountd 100005 2 tcp 20048 mountd 100005 3 udp 20048 mountd 100005 3 tcp 20048 mountd
So nlockmgr does get assigned port 4000 as specified by me. The other ones seem to start on the ports defined in /etc/services. For instance,
62) root:~> grep mountd /etc/services mountd 20048/tcp # NFS mount protocol mountd 20048/udp # NFS mount protocol
Does anyone what's going on?
Are the rpc services now (i.e. in F19) being started on fixed ports? Because if that's the case I can open up those ports in the firewall and I'm all set.
If I wanted to change what ports they run on, what would I do? I mean, even if IANA specifies 20048 for mountd, shouldn't I be able to run it on a different port if I wanted to?
Sorry, I'm probably a few versions behind.
On 07/08/13 13:09, Amadeus W.M. wrote:
I normally have an nfs server running on one of my machines. Now nfs itself and the portmapper start on fixed ports, but the rpc services start on random ports so they need to be assigned fixed ports in /etc/sysconfig/nfs like so:
LOCKD_TCPPORT=4000 STATD_PORT=4002 RQUOTAD_PORT=4003 LOCKD_UDPPORT=4000 MOUNTD_PORT=4001
Sorry, I'm probably a few versions behind.
Yes, you are a few versions behind.....
This is the default /etc/sysconfig/nfs file in F19....
# # Optinal options passed to rquotad RPCRQUOTADOPTS="" # # Optional arguments passed to in-kernel lockd #LOCKDARG= # TCP port rpc.lockd should listen on. #LOCKD_TCPPORT=32803 # UDP port rpc.lockd should listen on. #LOCKD_UDPPORT=32769 # # Optional arguments passed to rpc.nfsd. See rpc.nfsd(8) RPCNFSDARGS="" # Number of nfs server processes to be started. # The default is 8. RPCNFSDCOUNT=8 # Set V4 grace period in seconds #NFSD_V4_GRACE=90 # # Optional arguments passed to rpc.mountd. See rpc.mountd(8) RPCMOUNTDOPTS="" # # Optional arguments passed to rpc.statd. See rpc.statd(8) STATDARG="" # # Optional arguments passed to rpc.idmapd. See rpc.idmapd(8) RPCIDMAPDARGS="" # # Optional arguments passed to rpc.gssd. See rpc.gssd(8) RPCGSSDARGS="" # Enable usage of gssproxy. See gssproxy-mech(8). GSS_USE_PROXY="no" # # Optional arguments passed to rpc.svcgssd. See rpc.svcgssd(8) RPCSVCGSSDARGS="" # # To enable RDMA support on the server by setting this to # the port the server should listen on #RDMA_PORT=20049 # # Optional arguments passed to blkmapd. See blkmapd(8) BLKMAPDARGS="" #
To change, for example, the mountd port you need to use the RPCMOUNTDOPTS= and pass -p .... see the various man pages....
On Mon, 08 Jul 2013 13:29:44 +0800, Ed Greshko wrote:
On 07/08/13 13:09, Amadeus W.M. wrote:
I normally have an nfs server running on one of my machines. Now nfs itself and the portmapper start on fixed ports, but the rpc services start on random ports so they need to be assigned fixed ports in /etc/sysconfig/nfs like so:
LOCKD_TCPPORT=4000 STATD_PORT=4002 RQUOTAD_PORT=4003 LOCKD_UDPPORT=4000 MOUNTD_PORT=4001
Sorry, I'm probably a few versions behind.
Yes, you are a few versions behind.....
This is the default /etc/sysconfig/nfs file in F19....
# # Optinal options passed to rquotad RPCRQUOTADOPTS="" # # Optional arguments passed to in-kernel lockd #LOCKDARG= # TCP port rpc.lockd should listen on. #LOCKD_TCPPORT=32803 # UDP port rpc.lockd should listen on. #LOCKD_UDPPORT=32769 # # Optional arguments passed to rpc.nfsd. See rpc.nfsd(8) RPCNFSDARGS="" # Number of nfs server processes to be started. # The default is 8. RPCNFSDCOUNT=8 # Set V4 grace period in seconds #NFSD_V4_GRACE=90 # # Optional arguments passed to rpc.mountd. See rpc.mountd(8) RPCMOUNTDOPTS="" # # Optional arguments passed to rpc.statd. See rpc.statd(8) STATDARG="" # # Optional arguments passed to rpc.idmapd. See rpc.idmapd(8) RPCIDMAPDARGS="" # # Optional arguments passed to rpc.gssd. See rpc.gssd(8) RPCGSSDARGS="" # Enable usage of gssproxy. See gssproxy-mech(8). GSS_USE_PROXY="no" # # Optional arguments passed to rpc.svcgssd. See rpc.svcgssd(8) RPCSVCGSSDARGS="" # # To enable RDMA support on the server by setting this to # the port the server should listen on #RDMA_PORT=20049 # # Optional arguments passed to blkmapd. See blkmapd(8) BLKMAPDARGS="" #
To change, for example, the mountd port you need to use the RPCMOUNTDOPTS= and pass -p .... see the various man pages....
Thank you, that's life saver.
Behind I am, but then so is system-config-nfs because that's what I used to configure nfs, including the ports.
While I'm at it, are the rpc services still being started on random ports?
On 07/08/13 22:24, Amadeus W.M. wrote:
Thank you, that's life saver.
Behind I am, but then so is system-config-nfs because that's what I used to configure nfs, including the ports.
I don't use that tool. If it lead you down the garden path, you probably should write a bugzilla.
While I'm at it, are the rpc services still being started on random ports?
I believe they are. I use only nfsV4 and I've not paid attention to the rpc services recently.