已解决: openvpn Authenticate/Decrypt packet error: packet HMAC authentication failed

背景:

openvpn 版本 2.5.4

windows server 2019

问题:tls-auth ta.key引起,将tls-auth配置注释之后不报错

解决:

tls-auth ta.key生成方式错误

按照容易搜到的教程,生成ta.key的命令为:

openvpn --genkey tls-auth ta.key

参照官网

How To Guide: Set Up & Configure OpenVPN Client/server VPN | OpenVPN

tls-auth

The tls-auth directive adds an additional HMAC signature to all SSL/TLS handshake packets for integrity verification. Any UDP packet not bearing the correct HMAC signature can be dropped without further processing. The tls-auth HMAC signature provides an additional level of security above and beyond that provided by SSL/TLS. It can protect against:

  • DoS attacks or port flooding on the OpenVPN UDP port.
  • Port scanning to determine which server UDP ports are in a listening state.
  • Buffer overflow vulnerabilities in the SSL/TLS implementation.
  • SSL/TLS handshake initiations from unauthorized machines (while such handshakes would ultimately fail to authenticate, tls-auth can cut them off at a much earlier point).

Using tls-auth requires that you generate a shared-secret key that is used in addition to the standard RSA certificate/key:

openvpn --genkey --secret ta.key

实际操作

官网命令执行后有一条警告

WARNING: Using --genkey --secret filename is DEPRECATED.  Use --genkey secret filename instead.

所以

EasyRSA Shell

# openvpn --genkey secret ta.key

EasyRSA Shell

参照官网的ta.key生成命令,openvpn成功连接。

多查官方文档才是王道。

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值