Feature #6742

OAuth2 authentication for OpenVPN (and for FreeRadius)

Added by Kristian Junkov about 1 year ago. Updated 3 months ago.

User manager
Target version:
Start date:
Due date:
% Done:



I have two use-cases I want to enable and corresponding ideas.

A) OpenVPN server use OAuth2 as backend.
Use-case: Let my clients utilize their O365/Azure AD credentials to connect to my OpenVPN server running on pfsense.
Idea: Make it possible to authenticate using a OAuth2 backend, this should be added as a new type in the “System/User Manager/Authentication Servers”

B) FreeRadius server use OAuth2 as backend
Use-case: Let my clients utilize their O365/Azure AD credentials to connect to my local wireless network.
Idea: Network appliances (managed switches and access points) generally only speak RADIUS, so the freeradisus server in pfsense can be used if it can in turn speak OAuth2. So I suggest adding “OAuth2 Authentication” after “LDAP” in the freeradius settings. (There already exists a Perl module for freeradius which could be integrated:

A and B could be split up, I just thought it would be good first to have an overview of how many places OAuth2 would be relevant. If I needed to prioritize, then A has the highest value for me.

In general more and more are trying to leverage the cloud and alleviate the need for local active directory servers etc. so embedding OAuth2 across pfsense and making it easy to connect to AzureAD/O365, Google Apps etc. would really be powerful and a way to avoid duplicating user databases.

PS: I have been suggested to add my idea as a separate feature request: "OAuth2 authentication in captive portal" (

Best regards Kristian Junkov


#1 Updated by Jim Thompson about 1 year ago

  • Assignee set to Jim Thompson

#2 Updated by Jim Pingle 3 months ago

  • Target version changed from 2.4.0 to 2.4.1

Also available in: Atom PDF