nfs access remotely

lee.ngeap

Cadet
Joined
Oct 3, 2019
Messages
2
Hi Dear;

Can anybody help me out how to configure free nas share nfs over public IP?

I can mount 100% successful within my local network to any of my centos 7.

However, i can't mount from my other centos 7 out of my network.

Below is my command:
local: mount -t nfs 192.168.168.31:/mnt/Raid_Striped/nas_shared/vod /nas
via public IP: mount -t nfs xxx.xxx.xxx.xx:/mnt/Raid_Striped/nas_shared/vod /nas

freenas server: 192.168.168.31

Do I missing anything?
I'm using Mikrotik router. I already enable firewall for port 111 and 2049.
 

k9bm

Dabbler
Joined
Apr 18, 2016
Messages
14
Did you get anywhere with this? I see you only forwarded ports 111 and 2049, I believe we need to forward a few other ports as well, but finding the information is elusive....
 

Heracles

Wizard
Joined
Feb 2, 2018
Messages
1,401
Hey Lee,

Know that NFS is clear text and was never meant to be used straight over Internet. You now have all your data exposed to whoever want to access them from anywhere in the world.

VPN, SFTP and Nextcloud are million times better suited for the job.

I really encourage you to disable that NFS over Internet ASAP and to design a secure network access.
 
Last edited:

k9bm

Dabbler
Joined
Apr 18, 2016
Messages
14
I completely agree about not using NFS over the internet in the clear. But for anyone who might stumble across this thread looking for port forwarding and/or firewall rules for NFS with FreeNAS:

FreeNAS uses fixed ports 111 and 2049 for NFS, but by default it will also randomly select up to 4 other ports for the various daemons used for NFS. You could build a firewall rule for ports 111-2049 and it would work. But you should instead specify static ports for mountd, statd, and logd in the NFS config screen of the GUI. Use THIS website to select 3 "unassigned" port numbers, enter them into the NFS config screen for mountd, rpc.statd, and rpc.logd bind ports, then add those 3 ports to ports 111 and 2049 in your firewall (and/or port forward) rule. Best practice suggests you should also specify the destination IP in your firewall rule (the FreeNAS server)....
 

chx_b

Cadet
Joined
Dec 11, 2021
Messages
2
Hey Lee,

Know that NFS is clear text and was never meant to be used straight over Internet. You now have all your data exposed to whoever want to access them from anywhere in the world.

VPN, SFTP and Nextcloud are million times better suited for the job.

I really encourage you to disable that NFS over Internet ASAP and to design a secure network access.
I am also attempting to get access to my new NAS remotely, and I have seen that nfs is clear text, which bothers me greatly.
However, I often use nfs on some work computers, which I ssh into remotely via logging into a VPN.

Would this use of nfs be appropriate? If the nfs is operating while on the VPN?

I have a bunch of issues figuring out how to get a VPN server setup and to be accessible, but my hope was that having the TrueNAS as a VPN server at home, and having all of my families devices logged into that VPN, they could use nfs (Linux) and and samba (windows) for their data storage remotely.

Is this reasonable? The way you dismissed nfs as a useful technology makes it seem as though this approach is a distaster.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Top