# OTP Authentication

**URL:** <https://community.ipfire.org/t/otp-authentication/9992>\
**Category:** OpenVPN\
**Created:** [3 July 2023 09:08 UTC](https://community.ipfire.org/t/otp-authentication/9992 "2023-07-03T09:08:56Z")\
**Posts on this page:** 14\
**Page:** 1

<div class="post-metadata">

**Author:** ![thato](https://community.ipfire.org/user_avatar/community.ipfire.org/thato/32/8289_2.png) [@thato](https://community.ipfire.org/u/thato)\
**Post date:** [3 July 2023 09:08 UTC](https://community.ipfire.org/t/otp-authentication/9992/1 "2023-07-03T09:08:57Z")

</div>

Good day,

I have created a new OpenVPN certificate with OTP.

With that that being said, I have installed the OpenVPN certificate on my laptop and when prompted for the OpenVPN certificate, I then type it in however, the OpenVPN connection window then states that a ‘push request’ has been sent over several lines. Please note that I expected the push request to bring up a window where I could type in the two-factor authentication generated from the mobile app but it unfortunately never pops-up a window. Do you perhaps know what could be causing this?

---

<div class="post-metadata">

**Author:** ![cfusco](https://community.ipfire.org/user_avatar/community.ipfire.org/cfusco/32/9213_2.png) [@cfusco](https://community.ipfire.org/u/cfusco)\
**Post date:** [3 July 2023 13:12 UTC](https://community.ipfire.org/t/otp-authentication/9992/2 "2023-07-03T13:12:54Z")

</div>

OTP works only in a windows client, [community edition](https://openvpn.net/community-downloads/).

---

<div class="post-metadata">

**Author:** ![thato](https://community.ipfire.org/user_avatar/community.ipfire.org/thato/32/8289_2.png) [@thato](https://community.ipfire.org/u/thato)\
**Post date:** [3 July 2023 13:41 UTC](https://community.ipfire.org/t/otp-authentication/9992/3 "2023-07-03T13:41:06Z")

</div>

Thanks for your response.

Please note that I am using OpenVPN Community Edition 2.6.5 (windows client) and unfortunately the following message still persists within the connection window: ‘Push Request (Status=1)’

---

<div class="post-metadata">

**Author:** ![cfusco](https://community.ipfire.org/user_avatar/community.ipfire.org/cfusco/32/9213_2.png) [@cfusco](https://community.ipfire.org/u/cfusco)\
**Post date:** [3 July 2023 13:45 UTC](https://community.ipfire.org/t/otp-authentication/9992/4 "2023-07-03T13:45:15Z")

</div>

The error is always the same, the server requests the OTP from the client, which does not send it. All the OpenVPN Connect clients have this problem with OpenVPN server from IPFire. I do not use Windows so I cannot test this myself, however several people have reported success using that client. Hopefully someone will reply to help you out.

---

<div class="post-metadata">

**Author:** ![thato](https://community.ipfire.org/user_avatar/community.ipfire.org/thato/32/8289_2.png) [@thato](https://community.ipfire.org/u/thato)\
**Post date:** [3 July 2023 14:10 UTC](https://community.ipfire.org/t/otp-authentication/9992/5 "2023-07-03T14:10:58Z")

</div>

Well noted and just for interest sake - I made use of the Google Authenticator mobile application to add the OpenVPN OTP pin. Do you know what is most commonly used either than the mobile app I used?

---

<div class="post-metadata">

**Author:** ![svenf](https://community.ipfire.org/user_avatar/community.ipfire.org/svenf/32/10893_2.png) [@svenf](https://community.ipfire.org/u/svenf)\
**Post date:** [3 July 2023 14:59 UTC](https://community.ipfire.org/t/otp-authentication/9992/6 "2023-07-03T14:59:27Z")

</div>

Add this lines to OpenVPN config file (\*.ovpn)

auth-user-pass  
static-challenge “Enter your OTP” 0

And maybe this line for OpenSSL 1.1 support

providers legacy default

With default config you have disconnect after 1h. To extend the time add

reneg-sec 28800

---

<div class="post-metadata">

**Author:** ![thato](https://community.ipfire.org/user_avatar/community.ipfire.org/thato/32/8289_2.png) [@thato](https://community.ipfire.org/u/thato)\
**Post date:** [4 July 2023 08:02 UTC](https://community.ipfire.org/t/otp-authentication/9992/7 "2023-07-04T08:02:45Z")

</div>

Hi Sven,

Thank you for your response. Please note that the following lines: **auth-user-pass** ,  
**static-challenge “Enter your OTP” 0** enable the required token window to appear.

However, the following line: **auth-user-pass** eventually brings up a window where one needs to type in a username and password which is essentially not relevant to what we need and in past experiences, I used it for Google two-factor authentication. Is there perhaps another string of lines I could add to the config file to prevent the effect experienced?

---

<div class="post-metadata">

**Author:** ![svenf](https://community.ipfire.org/user_avatar/community.ipfire.org/svenf/32/10893_2.png) [@svenf](https://community.ipfire.org/u/svenf)\
**Post date:** [4 July 2023 08:06 UTC](https://community.ipfire.org/t/otp-authentication/9992/8 "2023-07-04T08:06:08Z")

</div>

Check if your config file include this lines

auth-nocache  
auth-token-user USER  
auth-token TOTP  
auth-retry interact

---

<div class="post-metadata">

**Author:** ![thato](https://community.ipfire.org/user_avatar/community.ipfire.org/thato/32/8289_2.png) [@thato](https://community.ipfire.org/u/thato)\
**Post date:** [4 July 2023 12:39 UTC](https://community.ipfire.org/t/otp-authentication/9992/9 "2023-07-04T12:39:41Z")

</div>

Hi Sven,

Thank you for your response.

Yes. Kindly note that the OpenVPN certificate already had those line item.

---

<div class="post-metadata">

**Author:** ![sergio](https://community.ipfire.org/user_avatar/community.ipfire.org/sergio/32/8245_2.png) [@sergio](https://community.ipfire.org/u/sergio)\
**Post date:** [15 November 2023 16:14 UTC](https://community.ipfire.org/t/otp-authentication/9992/10 "2023-11-15T16:14:01Z")

</div>

The Problem is still there.

But @thato when its help. I tested it with several Clients and the only Community Client what works with OTP without Problem is still the Version 2.5.7, released on 31 May 2022.

Try this Version, it will work. But do not forget to write this one line under tls-client. Like this

```auto
tls-client 
reneg-sec 36000

```

This is important so that you don’t get kicked out after an hour.

---

<div class="post-metadata">

**Author:** ![thato](https://community.ipfire.org/user_avatar/community.ipfire.org/thato/32/8289_2.png) [@thato](https://community.ipfire.org/u/thato)\
**Post date:** [16 November 2023 06:01 UTC](https://community.ipfire.org/t/otp-authentication/9992/11 "2023-11-16T06:01:33Z")

</div>

Good day Sergio,

Thank you for your response. It is much appreciated as well as noted.

Please note that I will ensure to test OTP authentication whilst making use of the OpenVPN version mentioned below and advise accordingly on the outcome thereof.

Kind Regards

Thato Phatedi, PROFILE DATA Tel:+27-11-728-5510 Email:thato@profile.co.za ProfileData is a specialist provider of investment data, both in electronic and print format. Profile Media publishes the Stock Exchange Handbook, the Unit Trusts and Collective Investments Handbook. Visit us at www.profile.co.za for product information, or www.sharedata.co.za for up-to-date listed company data and www.fundsdata.co.za for unit trust information.

> >

----------------------- **Original Message** -----------------------

---

<div class="post-metadata">

**Author:** ![svenf](https://community.ipfire.org/user_avatar/community.ipfire.org/svenf/32/10893_2.png) [@svenf](https://community.ipfire.org/u/svenf)\
**Post date:** [1 December 2023 08:58 UTC](https://community.ipfire.org/t/otp-authentication/9992/12 "2023-12-01T08:58:22Z")

</div>

With OpenVPN Community Client 2.6.x you need in the config  
providers legacy default

Explained here [New OpenVPN 2.6.0 Client (Windows 10 64bit) fails to connect - #4 by bonnietwin](https://community.ipfire.org/t/new-openvpn-2-6-0-client-windows-10-64bit-fails-to-connect/9283/4)

---

<div class="post-metadata">

**Author:** ![bonnietwin](https://community.ipfire.org/user_avatar/community.ipfire.org/bonnietwin/32/12350_2.png) [@bonnietwin](https://community.ipfire.org/u/bonnietwin)\
**Post date:** [1 December 2023 09:43 UTC](https://community.ipfire.org/t/otp-authentication/9992/13 "2023-12-01T09:43:28Z")

</div>

> [@svenf](#):
>
> you need in the config  
> providers legacy default

Since Core Update 175, when openssl-3.x was installed in IPFire, that is only needed if you are still using old connections using legacy certificates. If it is a newly created connection/certificate then it will not need the legacy line.  
If old connections with legacy certificates are restored from backup then the code in IPFire will automatically add the providers legacy default to the config file.

See this wiki note about the transition to OpenSSL 3.  
[https://wiki.ipfire.org/configuration/services/openvpn/openssl-3-transition](https://wiki.ipfire.org/configuration/services/openvpn/openssl-3-transition)

---

<div class="post-metadata">

**Author:** ![jherminjard](https://community.ipfire.org/user_avatar/community.ipfire.org/jherminjard/32/8247_2.png) [@jherminjard](https://community.ipfire.org/u/jherminjard)\
**Post date:** [7 February 2024 14:52 UTC](https://community.ipfire.org/t/otp-authentication/9992/14 "2024-02-07T14:52:28Z")

</div>

Adding the two following lines inside the \*.ovpn solve my problem with the Core-uptate 182 and the OpenVPN Community Client version 2.6.8. Before adding those two lines, no pup-up window is present to enter the OTP number for the F2A authentication.
