Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 1.34 KB

README.md

File metadata and controls

26 lines (20 loc) · 1.34 KB

Net-ReRouter (into docker)

ReRoutes incoming traffic through one port to another host & port.

(Based on Ambassador pattern in Kubernetes)

Stars Size Pulls License

Usage

  • Must be executed with NET_ADMIN capabilities.
  • Configuration is defined by an environment variable (REROUTER) which contains: <input_port>:<dest_ip>:<dest_port>. Multiple routes could be configured separated by , character.

For example, if you would like to reroute port 1022 to port 22 in host 192.168.200.4 run:

docker run \
    -d \
    --cap-add=NET_ADMIN \
    -p 1022-1024:1022-1024/tcp \
    -e REROUTER="1022:192.168.200.4:22, 1023:1.2.3.4:5432, 1024:10.50.0.4:80" \
    --name=net-rerouter \
    manuellr/net-rerouter