OpenVPN with Ubiquity Edgerouter / EdgeOS¶
- Current CA in
/config/auth/demoCA - Openssl config at
/usr/lib/ssl/openssl.cnf
Start:
Increase validity days¶
- Edit
CA.pland increase:DAYSCADAYS
- Edit
../openssl.cnfand increase:DAYS
Generate a root certificate / CA¶
Now enter the new CA pem password:
Don't add any challenge password !
Generate the server certificate request¶
- PEM password:
test(will get renmoved later) - Common name:
openvpn server cert
Sign the server certificate request¶
Remove the server.key password:
openssl rsa -in newkey.pem -out newkey-no-pw.pem
rm newkey.pem
mv newcert.pem /config/auth/server.pem
mv newkey-no-pw.pem /config/auth/server.key
Generate, sign and move the certificate and key files for the first OpenVPN client¶
- PEM password:
test(will get renmoved later) - Common name: i.e.
client cert varac
Remove the client cert password and add read permission for non-root users to be able to scp the files later:
openssl rsa -in newkey.pem -out newkey-no-pw.pem
chmod 644 newkey-no-pw.pem
rm newkey.pem newreq.pem
mv newcert.pem /config/auth/client1.pem
mv newkey-no-pw.pem /config/auth/client1.key
Repeat with other clients.
Restart openvpn¶
In- or decrease the log level, which restarts the OpenVPN process:
This will not re-read the config, but restart all client connections:
which is the same as