I figured out how to get my WD MyCloud (gen2) NAS to do NFS on statically assigned arbitrary ports! (which is necessary, if you want to do NFS over the internet, and mount a remote store in the local filesystem for transparent access, which is what I want.)
No small feat, considering that they have gone out of their way to make this nearly impossible to do, and more than a dozen people on the official community site have tried and failed to get this to work. (instead breaking down and using sftp, which is not so easy to control how it sizes packets, or does file locking, et al.) I can now mount the NFS share across the internet, making the thing actually live up to its name, and function as actual self-hosted cloud storage.
Now the downer.
WD are jerkwads, who decided in their infinite wisdom to 1) NOT configure this behavior with a config file, like every reputable linux distro in the universe does--- and instead do it all with an init script at boot; and 2) said init script is hosted inside a read only cramfs container that gets mounted early in the boot process (and lots of important stuff is in there too...)-- and 3) the root filesystem is hosted by an initial ramdisk at kernel load. They CLEARLY do NOT want people doing this.
Now the upper to counter it:
There is a way to hijack the crontab, to insert a custom "fire once" job, store the script for that job on writable storage, to have it be persistent, and fire it on boot reliably. I can use that cron job to replace the symlink pointing at that bullshit read only cramfs container for the start/stop script that drives the NFS daemons, and point it instead at my locally modified copy that is also on writable storage, then use it to restart the NFS daemon with the static assignments. I can then very deeply control how the NFS daemon works, including how it treats jumbo frames, if at all, what the preferred packet sizes are, what the static port assigns are, et al.
SOOOOOOO much work to do something that should be just a few pokes to a config file because WD does not want people hosting their own cloud storage... But I am happy, because I figured out a workaround that actually works, and did it all on my own.
Screw you WD. The hardware is nice, but your firmware takes mittens mode to a whole new level. Surprised you even allowed me SSH access, given how hard you worked to prevent persistent modification of the system's configuration. Jerkwads.
But I happy, because I defeated you.
Much use testing planned tomorrow.