openfortivpn client with HAProxy
307
This container does two things. First, it runs openfortivpn and connects to your remote network. Second, it routes a local port to a remote address using haproxy for a simple tcp proxy.
yoff/openfortivpn:1111 > haproxy > openfortivpn > REMOTE_ADDR
Thus, supposing REMOTE_ADDR was set to 10.0.0.100:3389 and that was the
address of a window host inside a Fortinet firewall, one would be able to use
rdp://localhost:1111 to get logged in.
openfortivpn can be configured by passing arguments to the container, by using a config file, or both.
haproxy can be configured by settings the REMOTE_ADDR environment variable to
a single single destination "address:port".
$ docker run --rm -it \
--device=/dev/ppp \
--cap-add=NET_ADMIN \
-p "1111:1111" \
-e REMOTE_ADDR="10.0.0.1:22" \
yoff/openfortivpn \
fortinet.example.com:8443 \
--username=foo \
--password=bar \
--set-routes=0
--set-dns=0
--otp=123456
To see all openfortivpn command-line options run docker run --rm yoff/openfortivpn -h
Contents of ./config:
host = fortinet.example.com
port = 8443
username = foo
password = bar
set-routes = 0
set-dns = 0
$ docker run --rm -it \
--device=/dev/ppp \
--cap-add=NET_ADMIN \
-p "1111:1111" \
-e REMOTE_ADDR="10.0.0.1:22" \
-v "${pwd}/config:/etc/openfortivpn/config" \
yoff/openfortivpn
git clone https://github.com/jeffre/docker-openfortivpncd docker-openfortivpndocker build -t yoff/openfortivpn .Content type
Image
Digest
Size
5.7 MB
Last updated
over 6 years ago
docker pull andreipoe/openfortivpn