How do you push out 100's of different VPN certs in a corp environment?

Just wondering. In the process of setting up a test Ubuntu OpenVPN infra on my VM for my other VM to connect to and test different configs, directives etc

Normally you are to create a different cert for every VPN user with a different common name like client 1, client 2, client 3 etc etc

So my question is: In a business environment, how do you automate this process? No one’s going to bother manually pushing out 100’s of certs for all the VPN users. How do you do this via code so that 100’s of certs with different CNs will be pushed out to all the right clients at the same time?

Intune management will get certs and VPN client+config onto the client device, the user just has to log in and input their 2fa code.

Source: I manage the corp environment

ask each user to schedule 30 minutes and bring their laptop to the helpdesk so that they can manually update the certificate.

Most corp environments don’t use raw OpenVPN.

Once you reach a certain scale, it’s almost always worth it to the business to cut support hours by using a purchasable product, especially if it ties into other utilized services and/or infrastructure.

Couple hundred users and tech time is going to cost a lot more than the per-user cost of something like AnyConnect, whatever the fuck Fortinet calls their VPN product, zScaler, Global Protect, or any number of other (often do-a-bunch-of-different-things-too) products run by providers an enterprise is already likely to use, like their networking brand of choice.

Usually better user experience as well. No scheduling time with a tech to get an update, or it just not working one day because you didn’t connect for a week so the automated push didn’t go through before your cert expired. Just punch in your SSO cred and it “just works”.

(Most of those “proprietary” products actually run on open/standard protocols, they just put their own special sauce into managing it)

You usually have a config management system like ansible, puppet, chef or you use GPOs in an AD to push scripts that execute the registration at the Issuing CA and configure the host. Or you use MECM/SCCM as alternative on windows.

And I bet I missed a dozen other tools for professional use that will cost a lot of money which corporations gladly pay to save on the backend with automation.

Most the time you also just don’t use open source but use some commercial product like GlobalProtect or Ivanti VPN. Even though you pay for them in the long run it may save a buck or two when your admins can call support and don’t need days to figure out an issue.

most enterprise computers would already have certificates, they can be used for openvpn as well

OpenVPN has professional tools for that, look up OpenVPN Access Server / CloudConnexa. The server can authenticate users against LDAP and issue certificates automatically.

Anyway you should consider Wireguard as it makes things way easier for everyone. Deployment in both cases can automated via things like scripts pushed via group policies and whatnot.

If you want something ready to go, then maybe Tailscale is better for you. It uses Wireguard an VPN protocol but integrates well with existing stuff.

You joke but there are probably a non-zero amount of organizations that follow that approach :joy:

So quirky, such a good comment

most enterprise computers would already have certificates

wdym

How can one automate the wireguard delivery of certificates and config files?

Something like SCEP. Client devices all self-request a cert from your PKI infrastructure.

most enterprise computers needs certificated for authentication, there are in some cases both computer certificates and user certificates. They are installed when the computer is image is deployed, or afterwards as a central service. For windows we use AD tools and for Linux we use puppet and some other special tools but your laptop if its ubuntu or windows will already have cers

thanks for the downvote by ppl however

That’s what’s systems like tailscale or netbird do.

Basically add a secondary agent to the system to manage the certs and configurations based on the user or devices ACL.

I didn’t downvote you

Outside of Tailscale and netbird, what alternative system or agent can one use?

Before I switched to headscale+tailscale, I had tried a number of things.

Most successful but annoying to code was Ansible.

Understood. Did you switch to Tailscale for MFA?

Not really, it was a nice addition but not my reason.

In a wireguard mesh, you either have to effectively maintain an IP list or code some collision algorithm. Initially I wrote it to just re-assign the IPS when the playbook ran, which was ok at first. It’s less of an issue if all nodes are always reachable, but I was needing to update nodes/configs while up to half my nodes were unreachable. Now I have to elect a nodes config as the master and mark IPs as taken so new nodes don’t stomp on old. Etc… have to manually expire out addresses if I’m running low on space.

Then add wanting complex mini-mesh coordinations for specific purposes.

Now with tailscale or netbird, each node has an agent that maintains it’s respective relationship state at any point of time, and effectively a DHCP server. I just install a node, add the agent, add necessary tags, and the paths form automatically and accurately.