https://github.com/manuellr/net-rerouter_docker
ReRoutes incoming traffic through one port to another host & port. Based on ambassador pattern in K8s
https://github.com/manuellr/net-rerouter_docker
ambassador docker iptables kubernetes
Last synced: 1 day ago
JSON representation
ReRoutes incoming traffic through one port to another host & port. Based on ambassador pattern in K8s
- Host: GitHub
- URL: https://github.com/manuellr/net-rerouter_docker
- Owner: ManuelLR
- License: gpl-3.0
- Created: 2018-10-12T17:13:14.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2018-10-12T18:43:35.000Z (almost 7 years ago)
- Last Synced: 2025-05-18T10:37:05.503Z (5 months ago)
- Topics: ambassador, docker, iptables, kubernetes
- Language: Shell
- Homepage:
- Size: 19.5 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Net-ReRouter (into docker)
**ReRoutes incoming traffic through one port to another host & port.**(Based on [Ambassador pattern in Kubernetes](https://kubernetes.io/blog/2015/06/the-distributed-system-toolkit-patterns/))
[](https://hub.docker.com/r/manuellr/net-rerouter/)
[](https://hub.docker.com/r/manuellr/net-rerouter/)
[](https://hub.docker.com/r/manuellr/net-rerouter/)
[](https://github.com/ManuelLR/Net-ReRouter_docker/blob/master/LICENSE)## Usage
- Must be executed with `NET_ADMIN` capabilities.
- Configuration is defined by an environment variable (`REROUTER`) which contains: `::`. 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:
```bash
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
```