Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I want to force NFS to use a specific port I've opened on my firewall. It seems to randomly pick the UDP port, the TCP port is static. How do I lock in the UDP port so i'm not opening a range of ports?

mount /mnt/backup
mount: trying 127.21.164.236 prog 100003 vers 3 prot tcp port 2049
mount: trying 127.21.164.236 prog 100005 vers 3 prot udp port 57917

I see a lot of info on setting up NFS but cant seem to narrow in on how to force a specific port.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

I found out where it was after some more digging. On ubuntu as the server (which is what I was using) it's in /etc/default/nfs-kernel-server and you have to set the RPCMOUNTDOPTS to include the port.

Ultimately I found it here http://wiki.debian.org/SecuringNFS

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.