Nyxynyx
Nyxynyx

Reputation: 63647

Error running OpenVPN: /etc/openvpn/ovpn_env.sh: No such file or directory

I am trying to set up OpenVPN and obfsproxy on a Ubuntu 18.04 server using Docker Compose. However, running the docker-compose up command causes the openvpn container to continuously restart. docker logs show the following error:

/usr/local/bin/ovpn_run: line 40: /etc/openvpn/ovpn_env.sh: No such file or directory

Anyone knows why this is happening, and how we can fix this issue? Thsnks!

docker-compose.yml

Based on https://github.com/vimagick/dockerfiles/tree/master/obfsproxy

data:
  image: busybox
  volumes:
    - /etc/openvpn

server:
  image: vimagick/openvpn
  ports:
    - "1194:1194/tcp"
  volumes_from:
    - data
  cap_add:
    - NET_ADMIN
  restart: always

obfsproxy:
  image: vimagick/obfsproxy
  ports:
    - "4911:4911"
  links:
    - server:openvpn
  environment:
    - PASSWORD=J23TNHPJPAOQJLTCPLFD4CQYVFY6MEVP
    - DEST_ADDR=openvpn
    - DEST_PORT=1194
    - LISTEN_ADDR=0.0.0.0
    - LISTEN_PORT=4911

Upvotes: 1

Views: 4755

Answers (2)

Theodore R. Smith
Theodore R. Smith

Reputation: 23231

To generate the ovpn_env.sh file, run this command:

docker run -v ./openvpn-data:/etc/openvpn --rm openvpn ovpn_genconfig -u udp://<your_ip_address>:3000

Upvotes: 0

Adiii
Adiii

Reputation: 59966

As mentioned in the comment the image is too old.

By vimagick •

Updated 3 years ago Your private path to access network resources and services securely.

Second thing, the GitHub link provided in Dockerhub is also broken

https://github.com/vimagick/docker-openvpn

So it hard to look into this without pulling and running the container.

I will suggest to to use https://github.com/kylemanna/docker-openvpn dockerhub(kylemanna/openvpn) which is up to date and has 10M+ pull and also for this image their interesting article on the medium that will not take more than five minutes to configure VPN.

set-up-a-vpn-server-with-docker-in-5-minutes

For the client, you can explore openvpn-client

Upvotes: 1

Related Questions