We have a Windows Server 2019 NPS server, with the OpenVPN Server configured as a RADIUS client and a network policy that allows access. We ensured that RADIUS access was successfully working prior to installing the Azure MFA extension on the NPS server.
After installing the NPS MFA extension our experience is this:
- client enters the username/password
- gets prompted on their phone for MFA
- approves the prompt
We have confirmed that the NPS logs in Event Viewer still show that access is being Granted with the MFA extension enabled:
Code: Select all
Log Name: Security
Source: Microsoft-Windows-Security-Auditing
Date: 11/12/2020 12:03:18 AM
Event ID: 6272
Task Category: Network Policy Server
Level: Information
Keywords: Audit Success
User: N/A
Computer: radiusserver
Description:
Network Policy Server granted access to a user.
User:
Security ID: Domain\admin
Account Name: admin@test.com.au
Account Domain: Domain
Fully Qualified Account Name: Domain\admin
Client Machine:
Security ID: NULL SID
Account Name: -
Fully Qualified Account Name: -
Called Station Identifier: -
Calling Station Identifier: client IP
NAS:
NAS IPv4 Address: openvpn server IP
NAS IPv6 Address: -
NAS Identifier: OpenVpn
NAS Port-Type: Virtual
NAS Port: 1
RADIUS Client:
Client Friendly Name: VPN
Client IP Address: openvpn server IP
Authentication Details:
Connection Request Policy Name: Use Windows authentication for all users
Network Policy Name: VPN
Authentication Provider: Windows
Authentication Server: radius server
Authentication Type: Extension
EAP Type: -
Account Session Identifier: 4237304141324331313142354439433644334141383535373945364143364534
Logging Results: Accounting information was written to the local log file.
Event Xml:
<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
<System>
<Provider Name="Microsoft-Windows-Security-Auditing" Guid="{54849625-5478-4994-a5ba-3e3b0328c30d}" />
<EventID>6272</EventID>
<Version>2</Version>
<Level>0</Level>
<Task>12552</Task>
<Opcode>0</Opcode>
<Keywords>0x8020000000000000</Keywords>
<TimeCreated SystemTime="2020-11-12T00:03:18.614518000Z" />
<EventRecordID>2969</EventRecordID>
<Correlation ActivityID="{1c191e12-ac99-0000-82d4-20fad3b7d601}" />
<Execution ProcessID="712" ThreadID="772" />
<Channel>Security</Channel>
<Computer>radiusserver</Computer>
<Security />
</System>
<EventData>
<Data Name="SubjectUserSid">S-1-5-21-832361468-1348258915-671347851-5615</Data>
<Data Name="SubjectUserName">admin@test.com.au</Data>
<Data Name="SubjectDomainName">DOMAIN</Data>
<Data Name="FullyQualifiedSubjectUserName">DOMAIN\admin</Data>
<Data Name="SubjectMachineSID">S-1-0-0</Data>
<Data Name="SubjectMachineName">-</Data>
<Data Name="FullyQualifiedSubjectMachineName">-</Data>
<Data Name="CalledStationID">-</Data>
<Data Name="CallingStationID">clientIP</Data>
<Data Name="NASIPv4Address">openVPNIP</Data>
<Data Name="NASIPv6Address">-</Data>
<Data Name="NASIdentifier">OpenVpn</Data>
<Data Name="NASPortType">Virtual</Data>
<Data Name="NASPort">1</Data>
<Data Name="ClientName">VPN</Data>
<Data Name="ClientIPAddress">openVPNIP</Data>
<Data Name="ProxyPolicyName">Use Windows authentication for all users</Data>
<Data Name="NetworkPolicyName">VPN</Data>
<Data Name="AuthenticationProvider">Windows</Data>
<Data Name="AuthenticationServer">radiusserver</Data>
<Data Name="AuthenticationType">Extension</Data>
<Data Name="EAPType">-</Data>
<Data Name="AccountSessionIdentifier">4237304141324331313142354439433644334141383535373945364143364534</Data>
<Data Name="LoggingResult">Accounting information was written to the local log file.</Data>
</EventData>
</Event>
but we have noted Accounting errors when tailing the OpenVPN logs:
Example of failed connection with MFA Extension enabled:
Code: Select all
Thu Nov 12 00:13:31 2020 RADIUS-PLUGIN: FOREGROUND: Add user for accounting: username: admin@test.com.au, commonname: client1
Thu Nov 12 00:13:31 2020 RADIUS-PLUGIN: BACKGROUND ACCT: Get a command.
Thu Nov 12 00:13:31 2020 RADIUS-PLUGIN: BACKGROUND ACCT: New User.
Thu Nov 12 00:13:31 2020 RADIUS-PLUGIN: BACKGROUND ACCT: New user acct: username: admin@test.com.au, interval: 0, calling station: 203.213.108.131, commonname: client1, framed ip: 10.8.0.6.
Thu Nov 12 00:14:11 2020 RADIUS-PLUGIN: BACKGROUND ACCT: Error: Start packet couldn't send.
!
Thu Nov 12 00:14:11 2020 Error: RADIUS-PLUGIN: FOREGROUND: Accounting failed for user:admin@test.com.au!
Thu Nov 12 00:14:11 2020 us=226645 client1/203.213.108.131:63903 PLUGIN_CALL: POST /usr/lib/openvpn/radiusplugin.so/PLUGIN_CLIENT_CONNECT status=1
Thu Nov 12 00:14:11 2020 us=226656 client1/203.213.108.131:63903 PLUGIN_CALL: plugin function PLUGIN_CLIENT_CONNECT failed with status 1: /usr/lib/openvpn/radiusplugin.so
Thu Nov 12 00:14:11 2020 us=226665 client1/203.213.108.131:63903 WARNING: client-connect plugin call failed
Thu Nov 12 00:14:11 2020 us=226812 client1/203.213.108.131:63903 PUSH: Received control message: 'PUSH_REQUEST'
Code: Select all
Thu Nov 12 00:26:57 2020 RADIUS-PLUGIN: FOREGROUND: Add user for accounting: username: admin@test.com.au, commonname: client1
Thu Nov 12 00:26:57 2020 RADIUS-PLUGIN: BACKGROUND ACCT: Get a command.
Thu Nov 12 00:26:57 2020 RADIUS-PLUGIN: BACKGROUND ACCT: New User.
Thu Nov 12 00:26:57 2020 RADIUS-PLUGIN: BACKGROUND ACCT: New user acct: username: admin@test.com.au, interval: 0, calling station: 203.213.108.131, commonname: client1, framed ip: 10.8.0.6.
Thu Nov 12 00:26:57 2020 RADIUS-PLUGIN: BACKGROUND-ACCT: Get ACCOUNTING_RESPONSE-Packet.
Thu Nov 12 00:26:57 2020 RADIUS-PLUGIN: BACKGROUND ACCT: Start packet was send.
Thu Nov 12 00:26:57 2020 RADIUS-PLUGIN: BACKGROUND ACCT: User was added to accounting scheduler.
Thu Nov 12 00:26:57 2020 RADIUS-PLUGIN: BACKGROUND-ACCT: No routes for user.
Thu Nov 12 00:26:57 2020 RADIUS-PLUGIN: FOREGROUND: Accouting succeeded!
Code: Select all
Get ACCOUNTING_RESPONSE-Packet.
However, Microsoft support are suggesting that the NPS server and the MFA extension are working correctly and that "we have to engage VPN side support to check why VPN authentication failure given the Azure MFA success response and AccessAccept state"
openvpn --version
Code: Select all
$ openvpn --version
OpenVPN 2.4.4 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on May 14 2019
library versions: OpenSSL 1.1.1 11 Sep 2018, LZO 2.08
Originally developed by James Yonan
Copyright (C) 2002-2017 OpenVPN Technologies, Inc. <sales@openvpn.net>
Compile time defines: enable_async_push=no enable_comp_stub=no enable_crypto=yes enable_crypto_ofb_cfb=yes enable_debug=yes enable_def_auth=yes enable_dependency_tracking=no enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown enable_fast_install=needless enable_fragment=yes enable_iproute2=yes enable_libtool_lock=yes enable_lz4=yes enable_lzo=yes enable_maintainer_mode=no enable_management=yes enable_multihome=yes enable_pam_dlopen=no enable_pedantic=no enable_pf=yes enable_pkcs11=yes enable_plugin_auth_pam=yes enable_plugin_down_root=yes enable_plugins=yes enable_port_share=yes enable_selinux=no enable_server=yes enable_shared=yes enable_shared_with_static_runtimes=no enable_silent_rules=no enable_small=no enable_static=yes enable_strict=no enable_strict_options=no enable_systemd=yes enable_werror=no enable_win32_dll=yes enable_x509_alt_username=yes with_aix_soname=aix with_crypto_library=openssl with_gnu_ld=yes with_mem_check=no with_sysroot=no
radiusplugin.cnf
Code: Select all
NAS-Identifier=OpenVpn
Service-Type=5
Framed-Protocol=1
NAS-Port-Type=5
NAS-IP-Address=local IP of OpenVPN server
OpenVPNConfig=/etc/openvpn/server.conf # OpenVPN configuration file
overwriteccfiles=true
nonfatalaccounting=true
server
{
acctport=1813 # RADIUS accounting port
authport=1812 # RADIUS authentication port
name=local IP of RADIUS server # RADIUS IP
retry=1
wait=60
sharedsecret=editedout # Key is used between FreeRADIUS and OpenVPN
}
Any help that you can provide would be greatly appreciated.
Thanks,