Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Easy-RSA error #2

Open
GeoDirk opened this issue Nov 30, 2023 · 1 comment
Open

Easy-RSA error #2

GeoDirk opened this issue Nov 30, 2023 · 1 comment

Comments

@GeoDirk
Copy link

GeoDirk commented Nov 30, 2023

I'm getting the following error after following your instructions:

root@ubuntu:/home/ubuntu# OVPN_DATA="ovpn-data-example"
root@ubuntu:/home/ubuntu# docker volume create --name $OVPN_DATA
ovpn-data-example
root@ubuntu:/home/ubuntu# docker run -v $OVPN_DATA:/etc/openvpn --log-driver=none --rm themardy/openvpn ovpn_genconfig -u udp://vpn.**********.com
Unable to find image 'themardy/openvpn:latest' locally
latest: Pulling from themardy/openvpn
2914792bc417: Pull complete
3b42d18eeede: Pull complete
7be0dfeae1e3: Pull complete
5d697cc13b3b: Pull complete
60385d3d1db5: Pull complete
Digest: sha256:2fee1bbd6805ffe6b22998f3fe4c77d6293eed6f09ea18ae1216ce8e90f6c40a
Status: Downloaded newer image for themardy/openvpn:latest
Processing PUSH Config: 'block-outside-dns'
Processing Route Config: '192.168.254.0/24'
Processing PUSH Config: 'dhcp-option DNS 1.1.1.1'
Processing PUSH Config: 'dhcp-option DNS 1.0.0.1'
Processing PUSH Config: 'comp-lzo no'
Successfully generated config
Cleaning up before Exit ...
root@ubuntu:/home/ubuntu# docker run -v $OVPN_DATA:/etc/openvpn --log-driver=none --rm -it themardy/openvpn ovpn_initpki

Easy-RSA error:

The file '/etc/openvpn/vars' was not found.

Any ideas how to fix this?

@GeoDirk
Copy link
Author

GeoDirk commented Nov 30, 2023

Turns out, this is the command that you need to "fix" this:

 docker run -v $OVPN_DATA:/etc/openvpn --rm themardy/openvpn touch /etc/openvpn/vars

This needs to fit between the calls like this:

docker volume create --name $OVPN_DATA
docker run -v $OVPN_DATA:/etc/openvpn --log-driver=none --rm themardy/openvpn ovpn_genconfig -u udp://VPN.SERVERNAME.COM
docker run -v $OVPN_DATA:/etc/openvpn --rm themardy/openvpn touch /etc/openvpn/vars
docker run -v $OVPN_DATA:/etc/openvpn --log-driver=none --rm -it themardy/openvpn ovpn_initpki

Then it will proceed through the rest of the calls normally.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant