Adding passwords to a passwordless configuration
Posted: Sat May 13, 2023 5:13 pm
New OpenVPN user here. I just finished installing OpenVPN on a Centos 7 server using these instructions:
https://www.cyberciti.biz/faq/centos-7- ... 5-minutes/
I then installed clients for Windows 10 and MacOS (Macbook Air notebook). This is the one I installed for Win10:
https://openvpn.net/community-downloads/ file OpenVPN-2.6.3-I003-amd64.msi
...and this is the one I used for MacOS:
https://openvpn.net/client-connect-vpn-for-mac-os/
After some messing around with port forwarding and such, I got it all working.
During the server installation I was asked:
Do you want to protect the configuration file with a password?
(e.g. encrypt the private key with a password)
1) Add a passwordless client
2) Use a password for the client
Select an option [1-2] 1
The default was 1 (passwordless) so I selected that.
To my knowledge I'm not using a client on the server machine (CentOS 7), my clients are on Win10 and MacOS as described above.
It all works just fine, but it seems like it's way too easy for me to VPN into my network. I get it that I have a private key and all, and no one should be able to VPN in without that key file, but what if my laptop is stolen? If they can figure out my password to get into the laptop, they'll have all they need to get into my network. Even if they can't figure out my password, they could dismount the hard drive and get the .ovpn file from there and install it on their client installation (and no, I don't have my hard drive encrypted... probably should do that).
I've seen several discussions on how to add passwords but they all assume I'm on THEIR network with THEIR OpenVPN installation, or they assume I'm on an enterprise network with Access Server. Neither of those is the case.
So, how do I go about adding a password requirement after the fact?
https://www.cyberciti.biz/faq/centos-7- ... 5-minutes/
I then installed clients for Windows 10 and MacOS (Macbook Air notebook). This is the one I installed for Win10:
https://openvpn.net/community-downloads/ file OpenVPN-2.6.3-I003-amd64.msi
...and this is the one I used for MacOS:
https://openvpn.net/client-connect-vpn-for-mac-os/
After some messing around with port forwarding and such, I got it all working.
During the server installation I was asked:
Do you want to protect the configuration file with a password?
(e.g. encrypt the private key with a password)
1) Add a passwordless client
2) Use a password for the client
Select an option [1-2] 1
The default was 1 (passwordless) so I selected that.
To my knowledge I'm not using a client on the server machine (CentOS 7), my clients are on Win10 and MacOS as described above.
It all works just fine, but it seems like it's way too easy for me to VPN into my network. I get it that I have a private key and all, and no one should be able to VPN in without that key file, but what if my laptop is stolen? If they can figure out my password to get into the laptop, they'll have all they need to get into my network. Even if they can't figure out my password, they could dismount the hard drive and get the .ovpn file from there and install it on their client installation (and no, I don't have my hard drive encrypted... probably should do that).
I've seen several discussions on how to add passwords but they all assume I'm on THEIR network with THEIR OpenVPN installation, or they assume I'm on an enterprise network with Access Server. Neither of those is the case.
So, how do I go about adding a password requirement after the fact?