How to Connect Two-Factor Authentication to an Existing VPN
When connecting 2FA to a corporate VPN, it is necessary to preserve access verification and session parameters. The scheme is recommended to be tested first on a pilot group.

First, determine where the domain password is verified: the VPN gateway can directly access Active Directory or send a request to the RADIUS server NPS in Windows Server. With direct verification, Simple2FA accepts the password and then requests confirmation. Verification can also be left to the gateway, contacting the service only for the second factor.
If NPS is already verifying the password, Simple2FA is placed between it and the gateway. After NPS approval, the service requests confirmation via push, Telegram, or MAX. The new server must be added to NPS as a RADIUS client and the rules associated with the address or name of the previous request source must be checked.
For login using a one-time code, the gateway and VPN client must support challenge-response: after password verification, the client displays a field for the code. With push, it is important to consider the response wait time. It is also necessary to check which addresses, routes, and other RADIUS parameters the user receives: changing them may block access to internal applications.
For the pilot, create a test group in Active Directory and include employees with different profiles and VPN clients. Verify successful login, password rejection, second-factor error, and the issuance of required parameters. TOTP is tested separately without internet on the phone, after which the internal application is accessed.





