Score:0

NFS re-export between VPN-connected servers

gg flag

I have two Linux NFS servers on two locations (two different networks), each providing at least one NFS share.

Those servers are connected through VPN and each other NFS is mounted to folder on each other (per example below SrvA's /foo folder is mounted on SrvB:/mnt/foo and vice versa).

SrvA:/foo (Ubuntu 20.04, a.a.a.1, v.v.v.1) <-> SrvB:/bar (CentOS 8.5.2111, b.b.b.1, v.v.v.2)

LAN1: a.a.a.0/24
LAN2: b.b.b.0/24
VPN: v.v.v.0/24

What I need is Clients on LAN1 network to mount both NFS (using fstab) and also access the remote server with SMB (for windows clients that don't have NFS).
For example ClientAA has IP a.a.a.2 and has no access to specified VPN bridge, but wants to mount both /foo and /bar folders.

What I've found so far:

Is this NFS re-export possible? Are there any risks? Is it possible (and safe) to combine it with SMB? Or should I scrap the NFS re-export idea an use only SMB for the "behind the VPN" folder?

vidarlo avatar
ar flag
Why not provide a route between the networks...?
hemmond avatar
gg flag
Because then I would have to modify routing of all clients I want to access that NFS folders with in either network. Since clients will be mostly laptops roaming between both sites (and other locations without access to any server), I want to mostly limit modifications to fstab (with noauto option), since both networks have DHCP (and therefore usually using same NetworkManager profile).
Score:0
fr flag

Based on what I've seen on the mailing list recently, NFS re-export of NFS mounts is supported by the Linux NFS developers (including re-exporting a v4 share to v3 clients), but you'll want to use a fairly recent kernel on the "proxy" machine – looks like v5.11 at minimum, with v5.15 being recommended.

The various caveats are documented at https://linux-nfs.org/wiki/index.php/NFS_re-export.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.