WG-NETNS(1)
π
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 inswitch. π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 β¨
wg(1)wg-quick(1)ip-netns(8)wg-netns@.service
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
- ubuntu resolute: wg-netns 2.3.5-1 Β· MIT
- ubuntu stonking: wg-netns 2.3.5-1 Β· MIT
- π the page's license: 0BSD
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms