Open mxs42 opened 5 years ago
If you use docker-compose you can use something like this if you want to start 2 different instances on 2 different IPs (XXX.XXX.XXX.XXX and YYY.YYY.YYY.YYY). Just use one block if you want to start only one instance on a specific IP:
openvpn-tcp-1: cap_add:
- NET_ADMIN image: kylemanna/openvpn restart: always volumes:
- ./dockerfiles/openvpn/conf-tcp:/etc/openvpn
- ./dockerfiles/openvpn/pki:/etc/openvpn/pki ports:
"XXX.XXX.XXX.XXX:1194:1194/tcp"
openvpn-tcp-2: cap_add:
- NET_ADMIN image: kylemanna/openvpn restart: always volumes:
- ./dockerfiles/openvpn/conf-tcp:/etc/openvpn
- ./dockerfiles/openvpn/pki:/etc/openvpn/pki ports:
- "YYY.YYY.YYY.YYY:1194:1194/tcp"
Do I understand correctly that in order to provide an ability to choose external IP I have to create and launch two (or more) independent instances? My server has several external IPs and I want to be able to start VPN session with specific external IP.