Anna Aurora :neocat_flag_pan:🏴☠️ on Nostr: how do i mount a network filesystem from inside a network namespace on linux? it ...
how do i mount a network filesystem from inside a network namespace on linux? it needs to be in a network namespace because the network filesystems are only accessible from that servers local network and the server i'm trying to connect from is not in that local network. that's why i'm using a network namespace with a wireguard interface.
in /etc/fstab it seems that you can only specify options for `mount`. you can't add an `ip netns exec …` before the `mount`.
on NixOS, `config.fileSystems` creates systemd mount units but i can't configure them to run in the network namespace with the unit config option NetworkNamespacePath because `config.systemd.mounts` is a list, not an attribute set, so i can't specify the name of the mount unit.
trying to just make a systemd mount unit myself, not through `config.fileSystems` i found out that mount units don't support NetworkNamespacePath.
should i just make a systemd service that mounts it, not using the standard ways of mounting things at all?
Published at
2024-08-17 10:19:01Event JSON
{
"id": "525f03fb64d1542eb21b3dd9d3e7d75913f91b8b49b8b679199dc219764912a5",
"pubkey": "7c4a6d7e279cd3ce8e8245dec7713fc8adcc3cbd53a1b7db55afdf60f9c0eaae",
"created_at": 1723889941,
"kind": 1,
"tags": [
[
"content-warning",
"sysadmin request for help"
],
[
"proxy",
"https://pony.social/@annaaurora/112976851209690870",
"web"
],
[
"proxy",
"https://pony.social/users/annaaurora/statuses/112976851209690870",
"activitypub"
],
[
"L",
"pink.momostr"
],
[
"l",
"pink.momostr.activitypub:https://pony.social/users/annaaurora/statuses/112976851209690870",
"pink.momostr"
],
[
"-"
]
],
"content": "how do i mount a network filesystem from inside a network namespace on linux? it needs to be in a network namespace because the network filesystems are only accessible from that servers local network and the server i'm trying to connect from is not in that local network. that's why i'm using a network namespace with a wireguard interface.\n\nin /etc/fstab it seems that you can only specify options for `mount`. you can't add an `ip netns exec …` before the `mount`.\n\non NixOS, `config.fileSystems` creates systemd mount units but i can't configure them to run in the network namespace with the unit config option NetworkNamespacePath because `config.systemd.mounts` is a list, not an attribute set, so i can't specify the name of the mount unit.\n\ntrying to just make a systemd mount unit myself, not through `config.fileSystems` i found out that mount units don't support NetworkNamespacePath.\n\nshould i just make a systemd service that mounts it, not using the standard ways of mounting things at all?",
"sig": "69e0f67ab9e16e4d01cda269d1f7774ace9713e69780f278a51aadb5371f1fb73151251ec2b2ce30e1bb0c967b8dfb4ec7bdd2b89a9d2aa886d88e8dadcd096b"
}