I'm trying to access a NFS share. The NFS share is in a server I have at home, and I'm trying to access to it from outside my local network.
In order to achieve this, I have started an OpenVPN server on my local network. This works fine and I can connect to the VPN from outside the local network and I can even ping the server and access some other services that are local only. My OpenVPN IP address is 172.27.232.5.
The problem is that I can't mount my NFS share. When I connect to the VPN, I can see the shares using showmount command
showmount -e 192.168.73.2 Export list for 192.168.73.2: /media/share/kdab 192.168.73.0/24 /media/share/jjcasmar 192.168.73.0/24
but if I try to connect to any of them, it fails.
sudo mount -t nfs4 192.168.73.2:/media/share/jjcasmar /home/jjcasmar/mnt mount.nfs4: access denied by server while mounting 192.168.73.2:/media/share/jjcasmar
I don't understand what is wrong with my setup, and Im not very good and networks. Any ideas of what might be happening?
The result of
ip addr show for the VPN connection is
13: tun1: <POINTOPOINT,MULTICAST,NOARP,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 100 link/none inet 172.27.232.5/23 brd 172.27.233.255 scope global tun1 valid_lft forever preferred_lft forever inet6` fe80::b6a9:fff6:dd69:6f7f/64 scope link stable-privacy valid_lft forever preferred_lft forever
If I understand correctly, the NFS server denies the connection because althought I can see the server on 192.168.73.2, I'm not on that subnet, right?
I have tried to modify the exports to add
172.27.232.0/23, but it's still failing. I have also tried to export directly to my OpenVPN IP,
172.27.232.5 without success.