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

Add password option for clients #160

Merged
merged 8 commits into from Aug 18, 2018
Merged

Add password option for clients #160

merged 8 commits into from Aug 18, 2018

Conversation

angristan
Copy link
Owner

This PR adds the option to add a password to the client file. It will be asked when connecting to the OpenVPN server. Basically, this encrypts the client's private key with a password.

Using a password for your private key is more secure, as not having one mean anyone with your .ovpn file can connect to your server and/or decrypt your traffic if they manage to make a MitM.

The user will be given the option when installing the server for the first time (and thus creating the first user) and when adding new users.

@angristan
Copy link
Owner Author

Fixes #9 and #159

@angristan
Copy link
Owner Author

So this is working fine, but atm the password is asked when ./easyrsa is called. I would like to ask the user for its password first, store it in a variable to use it with easyrsa laster.

@angristan
Copy link
Owner Author

I was thinking about add ./easyrsa build-client-full $CLIENT <<< $password but easy-rsa generates the key before asking for the password so it's not possible...

@jellemdekker
Copy link
Contributor

General solution 1: pipes in this Stackoverflow answer might offer some guidance.

@PakTam
Copy link

PakTam commented Mar 30, 2018

it is possible to create Multiple client using single KEY?
as this website https://sshdropbear.net/

so then the client can be add using WEBMIN or OCS PANEL

@angristan
Copy link
Owner Author

It's exactly the same except it is more clear to ask for a client password and put it in a variable than having a random prompt in the middle of easy-rsa stuff waiting for something.

@heikoh81
Copy link

heikoh81 commented Apr 15, 2018

I just installed your script for the first time, thanks!
For use on my mobile phones I'd also prefer to have a scripted Option to ask for a Password.
I figured out how to Change the .sh-file as suggested by craig_mld in #9
You could say "leave empty if no Password is wanted", but then, it would be easy to add one if needed.

@fritzmg
Copy link

fritzmg commented May 23, 2018

👍 for this :). Is there any reasony why this isn't merged yet to master?

@angristan
Copy link
Owner Author

It currently asks the password here:

screenshot_26-05-2018_20-26-08

Does it look acceptable to you?

@fritzmg
Copy link

fritzmg commented May 27, 2018

Oh I see. Well for me it's good enough, but I understand that it would be more user friendly if it was asked in the beginning.

@heikoh81
Copy link

When I first used your script about 1-2 month ago, I had to modify the script file as suggested in #9 (remove NOPASS in the code):
#9
So I now have 2 scripts that I uses: 1 for creating users without password (Raspis) and 1 for users with Passwords (mobile use).

This is very complicated, and thus I suggested you integrate it in your script.
I think the script should state if you leave password empty, the user is created without password.
I don't see this in the screenshots attached. It just seems to offer the possibility to enter a password - but what happens if none is entered?

@fritzmg
Copy link

fritzmg commented May 27, 2018

I don't see this in the screenshots attached. It just seems to offer the possibility to enter a password - but what happens if none is entered?

You can choose whether you want to use a password or not.

@heikoh81
Copy link

Where is that option? Can't see it in the screenshot?
If I just leave the password blank than there is no password?
(Don't have a Test-system running to test the new version...)

@heikoh81
Copy link

Perfect. So that feature I implemented now and no need any more to edit the code yourself?

@heikoh81
Copy link

So let's hope it is merged.
I'm just an advanced enduser, no developer on Github...

@angristan angristan mentioned this pull request Jun 12, 2018
@angristan angristan changed the title Add password option for client Add password option for clients Aug 18, 2018
@newsera
Copy link

newsera commented Aug 25, 2018

Can we have this feature implemented for 2.4-update as well?

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

Successfully merging this pull request may close these issues.

None yet

6 participants