/netns-cli

Simple cli for creating netns container with SNAT and optionally DNAT.

Primary LanguageLuaGNU Affero General Public License v3.0AGPL-3.0

netns-cli

Simple cli to create netns to limit outbound IP address.

Requirements

Usage

# create namespace
eli netns-cli.lua --setup=<netns name> --outbound-addr=<ipv4> -p <ipv4>:<hport>:<cport>/<proto>

# delete namespace
eli netns-cli.lua --remove=<netns name>

# reapply iptable rules
eli netns-cli.lua --apply-iptables=<netns name>

Build

eli ./tools/amalg.lua -o ./bin/netns-cli.lua -s cli.lua netns ip