1

Here is what I want to accomplish:

gpg -d -a < myconfig.ovpn.enc | openvpn

This doesn't work, of course, because openvpn doesn't look at stdin for config information. Does anybody know how to make it do that?

  • 1
    You can pass the configuration filename as --config <filename>. Now, in this case, you might be able to cheat and use /dev/fd/0 or /dev/stdin as the filename :-) – Stephen Harris Jul 11 '19 at 19:40
  • That's a great hack, and it's working. Very clever! – xAptive Jul 15 '19 at 22:05
1

As per Stephen Harris' comment above, this works great:

gpg -d -a < xAptive.ovpn.enc | sudo openvpn --config /dev/stdin

  • Works without the first redirect and --config option: gpg -d -a xAptive.ovpn.enc | sudo openvpn /dev/stdin – dess Sep 23 '19 at 17:33

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.