Skip to content

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

License

Notifications You must be signed in to change notification settings

alis-is/netns-cli

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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