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):
client dev tun proto udp # enter the server's hostname # or IP address here, and port number remote server_ip port_number resolv-retry infinite nobind persist-key persist-tun # Use the full filepaths to your # certificates and keys ca "C:\\yabroad.tblk\\ca.crt" cert "C:\\yabroad.tblk\\client.crt" key "C:\\yabroad.tblk\\client.key" key-direction 1 <tls-auth> # # 2048 bit OpenVPN static key # -----BEGIN OpenVPN Static key V1----- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx -----END OpenVPN Static key V1----- </tls-auth> ns-cert-type server comp-lzo verb 1
When not using the above but using something like:
tls-auth ta.key 1 # which works for tunnelblick
The server log shows something like:
Thu Apr 18 20:55:26 2013 TLS Error: incoming packet authentication failed from [AF_INET] IP_ADDRESS:60454 Thu Apr 18 20:55:57 2013 Authenticate/Decrypt packet error: packet HMAC authentication failed
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.
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.
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.
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.
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.
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.
THANK YOU! I’ve been spending hours trying to figure out this issue… solved it thanks to your post!
THANK YOU! I’ve been spending hours trying to figure out this issue… solved it thanks to your post!
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!
Glad it helped! 🙂
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!
Glad it helped! 🙂
Thanks! I’ve updated the original post.
thanks for the solution. Yes I also had to use those tags to enclose the contents of ta.key like Maciej’s case
Thanks! I’ve updated the original post.
thanks for the solution. Yes I also had to use those tags to enclose the contents of ta.key like Maciej’s case
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! 🙂
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! 🙂