我有一个在云中运行的 OpenVPN 服务器,用于侦听 1194/tcp,并添加了 UFW,将 443 转发到 1194(因此我可以在有限制性防火墙的地方使用我的 VPN。)
当我尝试打开一个 https 连接到 google.com 时,我在 OpenVPN 服务器的日志中看到以下内容,并且该页面几乎死掉了。
WARNING: Bad encapsulated packet length from peer ([[Peer number]]), which must be > 0 and <= 1575 -- please ensure that --tun-mtu or --link-mtu is equal on both peers -- this condition could also indicate a possible active attack on the TCP link -- [Attempting restart...]
Run Code Online (Sandbox Code Playgroud)
正常的 HTTP 流量和我测试过的任何其他类型的流量似乎都可以正常工作,除了 HTTPS。
我几乎完全按照本指南https://www.digitalocean.com/community/tutorials/how-to-set-up-an-openvpn-server-on-ubuntu-16-04来设置所有内容。
为了转发,我在 UFW before.rules 中添加了几行
...
*nat
:PREROUTING ACCEPT [0:0]
-A PREROUTING …Run Code Online (Sandbox Code Playgroud) openvpn ×1