This project enables you to:
- Create and delete named netns on the fly like systemd services
- Start named netns on boot
- Quickly set up bridging or NAT from netns to host
- Use named netns in systemd services
- Enables them to connect to the internet too
- And you can manually switch to its netns (since they are named)
Dependencies:
- Recent version of systemd (newer is better; tested down to v232)
- iproute2
- iptables (only if you use default NAT config)
/usr/bin/env
For installation, run make install
with root privilege.
You ran run make uninstall
to remove the systemd units, but the configs located in /etc/default
will not be removed.
systemctl start netns-nat@helloworld
chnetns helloworld ip address