Skip to content →

OpenVPN client TLS-Auth problem on Windows

It seems that the OpenVPN Client on windows does not support TLS-Auth with a separate key file. So instead, you can paste your key contents in your openvpn client’s config file and use some thing like the following (inline ta.key):

When not using the above but using something like:

The server log shows something like:

Published in Miscellaneous

20 Comments

  1. Hani Alhabshi

    i got this error on openvpn server when connect

    Tue Jan 30 13:31:15 2018 WARNING: cannot stat file ‘ta.key’: No such file or directory (errno=2)
    Options error: –tls-auth fails with ‘ta.key’: No such file or directory (errno=2)
    Options error: Please correct these errors.
    Use –help for more information.

  2. Hani Alhabshi

    i got this error on openvpn server when connect

    Tue Jan 30 13:31:15 2018 WARNING: cannot stat file ‘ta.key’: No such file or directory (errno=2)
    Options error: –tls-auth fails with ‘ta.key’: No such file or directory (errno=2)
    Options error: Please correct these errors.
    Use –help for more information.

  3. Cyrille Vladimirov

    I confirm this solution as worked.

    Do not forget to put these lines:

    key-direction  0    (on server)

    key-direction  1   (on client)

     

    OpenVPN 2.3.11 (FreeBSD 10.3)

    Great post, thank you very much.

     

  4. Cyrille Vladimirov

    I confirm this solution as worked.

    Do not forget to put these lines:

    key-direction  0    (on server)

    key-direction  1   (on client)

     

    OpenVPN 2.3.11 (FreeBSD 10.3)

    Great post, thank you very much.

     

  5. Eduard

    Hi

    Thank you. This fixed the same problem when connecting to an OpenVPN server  on a QNAP (TS239-PRO II) with the client running on Ubuntu server.

  6. Eduard

    Hi

    Thank you. This fixed the same problem when connecting to an OpenVPN server  on a QNAP (TS239-PRO II) with the client running on Ubuntu server.

  7. Sean

    THANK YOU! I’ve been spending hours trying to figure out this issue… solved it thanks to your post!

  8. Sean

    THANK YOU! I’ve been spending hours trying to figure out this issue… solved it thanks to your post!

  9. Ioannis

    Darn that was good!!! Hours and hours of troubleshooting: removing keys, rebuilding keys, reinstalling openvpn, changing directories, client setting, server setting the whole lot, just to be your solution. Thank you!

  10. Ioannis

    Darn that was good!!! Hours and hours of troubleshooting: removing keys, rebuilding keys, reinstalling openvpn, changing directories, client setting, server setting the whole lot, just to be your solution. Thank you!

  11. pal

    thanks for the solution. Yes I also had to use those tags to enclose the contents of ta.key like Maciej’s case

  12. pal

    thanks for the solution. Yes I also had to use those tags to enclose the contents of ta.key like Maciej’s case

  13. This post is great, it helped me solved exactly that issue.

    However, I had to enclose the tls key with

    • Glad this helps, and thanks for your feedback! 🙂

  14. This post is great, it helped me solved exactly that issue.

    However, I had to enclose the tls key with

    • Glad this helps, and thanks for your feedback! 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.