openvpn-client icon indicating copy to clipboard operation
openvpn-client copied to clipboard

How to use with ovpn files ?

Open ha62791 opened this issue 3 years ago • 5 comments

Unfortunately there isn't a docker image for openvpn3 client Is this container able to connect vpn like the way we use openvpn3 with ovpn files ?

In openvpn3, we can do like this: openvpn3 session-start --config /path/to/config.ovpn

ha62791 avatar May 16 '21 08:05 ha62791

@dperson @ha62791 I'm in the same boat. Did either of you find a solution?

wangjoshuah avatar Sep 10 '21 04:09 wangjoshuah

@dperson @ha62791 @wangjoshuah

Yes, please support ovpn files.

al2suarez avatar Sep 21 '21 14:09 al2suarez

@dperson @ha62791 @wangjoshuah

figured it out... i feel stupid... just change your ovpn file to vpn.conf

Thats it... i did have to remove the following line entries from my ovpn file:

data-ciphers AES-128-GCM:AES-256-GCM data-ciphers-fallback AES-256-GCM

and then set cipher when running the docker like so...

sudo docker run -it --cap-add=NET_ADMIN --device /dev/net/tun --name vpn -v /somepath/ovpn:/vpn -e CIPHER=AES-256-GCM -d dperson/openvpn-client -a 'username;password'

al2suarez avatar Sep 21 '21 15:09 al2suarez

I was stuck on this for a while also. I had to remove below three lines from my ovpn file on top of changing ovpn extension to conf

Error on container start: Options error: --up script fails with '/etc/openvpn/update-resolv-conf': No such file or directory (errno=2)

Removed: script-security 2 up /etc/openvpn/update-resolv-conf down /etc/openvpn/update-resolv-conf

I documented all in here if anyone is trying to get VPN working using docker-compose Making a Docker Containers use a VPN

GreenFrogSB avatar Nov 10 '21 08:11 GreenFrogSB

@GreenFrogSB excellent website!

Is some way to add support for telegram notifying of VPN up/down?

S474N avatar Mar 20 '22 17:03 S474N