Docker-openvpn: Compose Example UDP/TCP

Created on 14 Aug 2018  Â·  5Comments  Â·  Source: kylemanna/docker-openvpn

Hi, this looks really interesting!

Do you have an example of using docker compose with the UDP and TCP containers in the same template?

Most helpful comment

version: '2'
services:
openvpn-udp:
cap_add:
- NET_ADMIN
image: kylemanna/openvpn
container_name: openvpn-udp
ports:
- "1194:1194/udp"
restart: always
volumes:
- ./openvpn-data:/etc/openvpn
openvpn-tcp:
cap_add:
- NET_ADMIN
image: kylemanna/openvpn
container_name: openvpn-tcp
ports:
- "1194:1194/tcp"
restart: always
volumes:
- ./openvpn-data:/etc/openvpn
command: 'ovpn_run --proto tcp'

All 5 comments

version: '2'
services:
openvpn-udp:
cap_add:
- NET_ADMIN
image: kylemanna/openvpn
container_name: openvpn-udp
ports:
- "1194:1194/udp"
restart: always
volumes:
- ./openvpn-data:/etc/openvpn
openvpn-tcp:
cap_add:
- NET_ADMIN
image: kylemanna/openvpn
container_name: openvpn-tcp
ports:
- "1194:1194/tcp"
restart: always
volumes:
- ./openvpn-data:/etc/openvpn
command: 'ovpn_run --proto tcp'

Thanks! This worked - how did you know to use the command? variable?

Also I had port redirection that I had to disable

    ports:
      - target: 1194
         published: 9443
         protocol: tcp
         #mode: host

Had the same problem and read in the docs that it is possible to run two containers in parallel:
https://github.com/kylemanna/docker-openvpn/blob/master/docs/tcp.md

Thanks, looks like we have to manually add the hostname and port for the
tcp connection for clients?

On Fri, Oct 12, 2018 at 3:43 PM Alexei Kolesnikow notifications@github.com
wrote:

Had the same problem and read in the docs that it is possible to run two
containers in parallel:
https://github.com/kylemanna/docker-openvpn/blob/master/docs/tcp.md

—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/kylemanna/docker-openvpn/issues/415#issuecomment-429441065,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AVdhbEs7OuRy99bw1nhME2zD2XqgTnFyks5ukPDQgaJpZM4V9CdN
.

Have you figured out a way to make sure the tcp line for the host gets automatically added to the client config?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

comphilip picture comphilip  Â·  3Comments

rgarrigue picture rgarrigue  Â·  3Comments

Awatatah picture Awatatah  Â·  5Comments

jkroepke picture jkroepke  Â·  7Comments

patrick-mota picture patrick-mota  Â·  8Comments