I need to use port 2049/tcp for another purpose. Is there a way to change which port NFSD binds to? I don't need NFSv3 or NFSv2 so I am not using rpcbind service. I cannot find that config option...
I need to use port 2049/tcp for another purpose. Is there a way to change which port NFSD binds to? I don't need NFSv3 or NFSv2 so I am not using rpcbind service. I cannot find that config option...
If you are using just NFSv4 (no RPCBIND) you can change the port by adding
-p [port number]
to /etc/sysconfig/nfs RPCNFSDARGS and make sure it is uncommented.I found this out by looking at
/etc/init.d/nfs
, I found this line:I traced the definition of
$RPCNFSDARGS
back up to the top of the file, and saw /etc/sysconfig/nfs was loaded in.man rpc.nfsd
revealed the -p option to specify the port.My /etc/sysconfig/nfs now has the line: