WG-NETNS(1)

πŸ“¦ version 2.3.5, in ubuntu resolute, ubuntu stonking

πŸ’… WG-NETNS(1) β€” the wg-netns manual, but make it a group chat

okay so bestie, welcome to wg-netns(1), a General Commands Manual page, and it's literally about creating a network namespace with a wireguard tunnel inside it. no cap, it's giving "i contain my VPN in a little box so it doesn't spill all over my routing table" energy. let's get into it πŸ¦‹


✨ NAME ✨

wg-netns β€” create network namespace with wireguard tunnel 🫢


✨ SYNOPSIS ✨

wg-netns up profile{.json|.yaml|.yml}
wg-netns down [-f] profile{.json|.yaml|.yml}
wg-netns list
wg-netns switch netns
wg-netns exec netns program [argument]…

periodt. those are the five moods it has πŸ’…


✨ DESCRIPTION ✨

okay so wg-netns up reads $WG_PROFILE_DIR/profile and creates the network namespaces specified therein. like it's literally building the whole vibe from your profile. ✨

wg-netns down destroys the same. and bestie, -f|--force ignores any errors β€” it's the "i don't wanna hear it, just tear it down" flag. 😭

wg-netns list provides functionality equivalent to ip netns. same energy, different font πŸ’…

wg-netns exec executes program argument… in the specified netns. so like, you're sending your little program into the namespace to do its thing.

wg-netns switch is equivalent to wg-netns exec $SHELL -i in netns. it's the main character move β€” you just drop yourself into the namespace's shell and live there πŸšπŸ‘‘


✨ ENVIRONMENT ✨

the vibes your environment is setting, one variable at a time 🌈

  • WG_PROFILE_DIR β€” Directory to search for profiles in. Defaults to /etc/wireguard. that's where your little profile besties live 🏠
  • WG_NETNS_DIR β€” Directory to keep netns configuration files (resolv.conf) in. Defaults to /etc/netns. ✨
  • WG_VERBOSE β€” If set and non-zero, log every command executed to the standard error stream. so like, turn this on if you wanna watch every single move it makes πŸ‘€
  • SHELL β€” Shell to use in switch. πŸ’…
  • WG_SHELL β€” Shell to use for shell hooks. Defaults to /bin/sh. 🫢

✨ FILES ✨

See /usr/share/doc/wg-netns/minimal.json and /usr/share/doc/wg-netns/full.yaml for example profiles. one is the "just the essentials" girlie, one is the full-length director's cut πŸŽ€ both iconic, both there for you.


✨ SEE ALSO ✨

go read those too, iykyk πŸ’–


okay that's the whole page, you ate it. this was WG-NETNS(1) from the Debian crew, dated June 21, 2025 β€” shoutout to them for keeping the namespaces cute and the tunnels wireguarded. now go create a namespace, bestie, you got this πŸŒΈπŸ’œ

πŸ“¦ where this page comes from