Sign inSign up

newnius/port-forward

By newnius

Updated 2 months ago

Forward your traffic

Image
0

7.5K

newnius/port-forward repository overview

port-forward

Forward your traffic behind NAT, expose certain services in containers etc.

Usage

Define the following environment variables to configure port-forwarding.

VariableDescriptionOptional
REMOTE_HOSTIP or address of the host you want to forward traffic tono
REMOTE_PORTPort on remote host to forward traffic toyes (80)
LOCAL_PORTPort where container listensyes (80)

The socat process within the container will listen by default to port 80, use -pdocker flag to map the port of the local machine where it will listen to traffic to be forwarded.

docker run \
	--name port-forward \
	-d \
	--restart always \
	--publish 81:80 \
	--ENV REMOTE_HOST=example.com \
	--ENV REMOTE_PORT=82 \
	--ENV LOCAL_POST=80 \
	newnius/port-forward

Tag summary

Content type

Image

Digest

sha256:80f5c1fcd

Size

4.2 MB

Last updated

2 months ago

docker pull newnius/port-forward