alis-is / netns-cli

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

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

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

License:GNU Affero General Public License v3.0


Languages

Language:Lua 100.0%