Revoking from web app?

How to customize and extend your OpenVPN installation.
Post Reply
dnilgreb
OpenVPN User
Posts: 12
Joined: Fri Mar 04, 2016 12:13 pm

Revoking from web app?

Post by dnilgreb » Thu Mar 22, 2018 6:57 am

I am running a private OpenVPN server (easy-RSA 3), and am trying to write my own web gui to manage it (with NodeJS).
Currently I am working on the revoke process, and I am having trouble entering the CA password.

The first prompt is whether to Continue with revocation, to which you have to answer yes.
I get past that with a simple stdin.write('yes').

Next prompt tells me to enter tha CA password. Now stdin.write(password) doesn´t work.
I´ve also tried writing a shell script (csh), with echo yes, sleep, echo password. That doesn´t work either.

Is it not possible to enter tha password via stdin or scripts?
Is there a way to send the password along with the easyrsa command, and avoiding that prompt?
Or is there an argument which allows me to stdin.write()?

I´ve tried a bunch of different things, but I always end up with not being able to get the password in place. Does OpenVPN demand anything special at all, or is it completely up to my code?

Any help is greatly appreciated...

dnilgreb
OpenVPN User
Posts: 12
Joined: Fri Mar 04, 2016 12:13 pm

Re: Revoking from web app?

Post by dnilgreb » Wed Mar 28, 2018 4:25 pm

As I´ve not found a solution, I worked around the problem instead.
I set up an SSH tunnel on the OpenVPN server to localhost, and thereby force all stdin and stdout to pass through that tunnel. And now I can control it. Revoke process from webpage: check!

Post Reply