lxc-user-nic(1)

🌸 NAME 🌸

lxc-user-nic β€” manage nics in another network namespace. That's the whole vibe, bestie: this is the little helper that handles network interfaces for you πŸ’–


✨ SYNOPSIS ✨

Okay so it's got two modes, literally:

lxc-user-nic create {lxcpath} {name} {pid} {type} {bridge} {container
             nicname}
lxc-user-nic delete {lxcpath} {name} {path to network namespace} {type}
             {bridge} {container nicname}

πŸ’… DESCRIPTION πŸ’…

So lxc-user-nic is a setuid-root program β€” yes, that's the big-deal part β€” with which unprivileged users may manage network interfaces for use by a lxc container. It's giving "trusted little helper with main character energy" πŸ”₯

It will consult the configuration file /etc/lxc/lxc-usernet to determine the number of interfaces which the calling user is allowed to create, and which bridge they may attach them to. Yep, that file is the vibe check for your limits πŸ‘‘

It tracks the number of interfaces each user has created using the file /run/lxc/nics. Lowkey important.

It ensures that the calling user is privileged over the network namespace to which the interface will be attached. No sneaking into random netns, not on its watch πŸ™ˆ

lxc-user-nic also allows one to delete network devices. Currently only ovs ports can be deleted β€” that's the limit, fr fr.


πŸŽ€ OPTIONS πŸŽ€

  • lxcpath β€” the path of the container. This is currently not used. It's just sitting there being iconic and unused πŸ’…
  • name β€” the name of the container. This is currently not used either. Also just vibing.
  • pid β€” the process id for the task to whose network namespace the interface should be attached. That's the target netns energy 🎯
  • type β€” the network interface type to attach. Currently only veth is supported. With this type, two interfaces representing each tunnel endpoint are created. One endpoint will be attached to the specified bridge, while the other will be passed into the container. Twin interfaces, one tunnel, slay πŸ¦‹
  • bridge β€” the bridge to which to attach the network interface, for instance lxcbr0. That's the bridge bestie 🫢
  • container nicname β€” the desired interface name in the container. This will be eth0 if unspecified. Default queen behavior πŸ‘‘
  • path to network namespace β€” a path to open to get a file descriptor for the target network namespace. This is only relevant when an veth device is deleted. Very "only when you need it" of it πŸ’œ

πŸ¦‹ SEE ALSO πŸ¦‹

lxc(1), lxc-start(1), lxc-usernet(5) β€” go read those too, iykyk 🌈


Byeee πŸ’‹ β€” this page is dated 2026-05-01 and belongs to the lxc-user-nic(1) manual page; go be iconic with your netns 🫢

πŸ“¦ where this page comes from