OPNsense Forum

English Forums => Virtual private networks => Topic started by: robertkwild on January 31, 2022, 03:40:28 PM

Title: Install CA as standard user
Post by: robertkwild on January 31, 2022, 03:40:28 PM
Hi all,

Created a ipsec ikev2 eap mschapv2 and I can connect to it via my mobile and a Windows 10 client no problem

Obviously need to install the CA on the client which is fine but what about if the user is a standard user on Windows 10 and they can't install the CA as he's a standard user, not admin

How can this be done please

Thanks,
Rob
Title: Re: Install CA as standard user
Post by: robertkwild on February 02, 2022, 05:37:29 PM
any help in this please

as when i do install the CA as a standard user in "trusted root CAs" its saved it but when i then login to my ipsec server it doesnt connect, just gives me error

IKE authentication credentials are unacceptable

it works when i install the CA as admin tho

any help would be much appreciated
Title: Re: Install CA as standard user
Post by: atom on February 02, 2022, 05:53:33 PM
I import the CA certificate with a PowerShell script that I run as administrator with extended rights.


Title: Re: Install CA as standard user
Post by: robertkwild on February 02, 2022, 06:42:29 PM
cool

thing is there are work pcs and they dont have admin rights to install the CA
Title: Re: Install CA as standard user
Post by: atom on February 02, 2022, 06:49:28 PM
It is not possible to change the certificate store as a normal user by design - for security reasons.


https://docs.microsoft.com/en-us/windows-hardware/drivers/install/trusted-root-certification-authorities-certificate-store
(https://docs.microsoft.com/en-us/windows-hardware/drivers/install/trusted-root-certification-authorities-certificate-store)
Title: Re: Install CA as standard user
Post by: robertkwild on February 02, 2022, 06:56:08 PM
what about importing the server cert as a normal user instead of the CA, will that work?
Title: Re: Install CA as standard user
Post by: atom on February 02, 2022, 07:13:48 PM
No, that will not work.

Have you already tried to provide the OPNsense with an ACME certificate and use that for authentication ?
The CA certificates from Let's Encrpyt should already be in the cert store.
Title: Re: Install CA as standard user
Post by: robertkwild on February 02, 2022, 07:18:18 PM
atm, im creating the cert both CA and server cert using the opnsense create self signed cert method

you thing i should change to lets encrypt certs?
Title: Re: Install CA as standard user
Post by: atom on February 02, 2022, 07:21:27 PM
Yes, then you no longer have to import the CA certificates into Windows, because they should already be there.
Title: Re: Install CA as standard user
Post by: robertkwild on February 02, 2022, 08:23:50 PM
Thanks atom

Is there a good how to to do this

I imagine I need to install the lets encrypt package on opnsense
Title: Re: Install CA as standard user
Post by: atom on February 02, 2022, 08:31:39 PM
Yes, you're right - os-acme-client . You can find a short documentation of the plugin here:


https://github.com/opnsense/plugins/pull/66
(https://github.com/opnsense/plugins/pull/66)
Title: Re: Install CA as standard user
Post by: robertkwild on February 02, 2022, 08:37:33 PM
Thanks atom,

Would I need to import the lets encrypt cert under

System > trust > authorities
Title: Re: Install CA as standard user
Post by: atom on February 02, 2022, 08:59:31 PM
No, you do not have to do this manually. It is installed automatically by ACME when the certificate process has been successfully completed.
Title: Re: Install CA as standard user
Post by: robertkwild on February 03, 2022, 12:19:20 PM
thanks atom

obviously i will need to open port 80 to my WAN address ie opnsense firewall, is that a security risk
Title: Re: Install CA as standard user
Post by: atom on February 03, 2022, 12:39:17 PM
Every open port in a firewall is a potential security risk.
I'll use DNS-01. No port needs to be opened for this.
Title: Re: Install CA as standard user
Post by: robertkwild on February 03, 2022, 04:22:50 PM
Will it work even tho I'm using the free no ip and only got one hostname

Edit - just went on no ip and have to pay extra to get a txt record for dns challenge

So I will need to open port 80 to fw

What do you suggest, get a txt record or open port 80?
Title: Re: Install CA as standard user
Post by: atom on February 03, 2022, 05:33:35 PM
I would prefer the 3rd variant and take my own CA.  8)
Title: Re: Install CA as standard user
Post by: robertkwild on February 03, 2022, 05:38:52 PM
You mean just export the self signed CA?
Title: Re: Install CA as standard user
Post by: atom on February 03, 2022, 06:21:32 PM
Yes, but you had some restrictions to install certificates as admin.
Title: Re: Install CA as standard user
Post by: robertkwild on February 03, 2022, 09:04:21 PM
not admin, as a standard user, they just couldnt import the CA

i really dont want to expose my firewall to WAN on any ports

i do port forwards to other servers on port 80 443

thanks so much atom for your help in this!!!!!!!!!!!
Title: Re: Install CA as standard user
Post by: atom on February 04, 2022, 09:56:59 AM
You have the choice: Either install the certificate in Windows once as an admin (the best method in my opinion) or regularly renew the certificate with ACME  - then either via DNS (no port to open) or HTTP (port 80 / 443) must be open.
Title: Re: Install CA as standard user
Post by: robertkwild on February 04, 2022, 03:23:49 PM
yeah i agree its a lot safer to use self signed cert instead of acme especially on firewall
Title: Re: Install CA as standard user
Post by: Patrick M. Hausen on February 04, 2022, 06:23:41 PM
Why should using ACME on the firewall pose any risk? If you use DNS challenge, it's perfectly safe ...
Title: Re: Install CA as standard user
Post by: robertkwild on February 08, 2022, 02:38:11 PM
success!!!!!!!!!!

installed/configured the ACME client on my opnsense, it got the certs (using DNS challenge with dynu)

i then changed the cert on my ipsec server to the ACME client one instead of my self signed one

at a different location (at work) i did a test, i spinned up a vm, created a standard user, logged in as standard user

created the ikev2 vpn and i could connect straight away without installing any cert!!!!!
Title: Re: Install CA as standard user
Post by: atom on February 08, 2022, 02:40:55 PM
I'm glad to hear it.