我已经安装了 Open VPN。在我的服务器和计算机上都安装了。我看到我的日志文件如下:
Aug 18 18:37:52 ubuntu openvpn[27920]: Local Options hash (VER=V4): 'bd6dea9e'
Aug 18 18:37:52 ubuntu openvpn[27920]: Expected Remote Options hash (VER=V4): '760316bb'
Aug 18 18:37:52 ubuntu openvpn[27931]: Attempting to establish TCP connection with x.x.x.x.x.x:80
Aug 18 18:37:52 ubuntu openvpn[27931]: TCP connection established with x.x.x.x:80
Aug 18 18:37:52 ubuntu openvpn[27931]: Socket Buffers: R=[87380->131072] S=[23860->131072]
Aug 18 18:37:52 ubuntu openvpn[27931]: TCPv4_CLIENT link local: [undef]
Aug 18 18:37:52 ubuntu openvpn[27931]: TCPv4_CLIENT link remote: x.x.x.x.x:80
Aug 18 18:37:52 ubuntu openvpn[27931]: WARNING: Bad encapsulated packet length from peer (15393), which must be > 0 and <= 1546 -- 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 -- [Attemping restart...]
Aug 18 18:37:52 ubuntu openvpn[27931]: Connection reset, restarting [0]
Aug 18 18:37:52 ubuntu openvpn[27931]: TCP/UDP: Closing socket
Aug 18 18:37:52 ubuntu openvpn[27931]: /sbin/route del -net x.x.x.x.x. netmask 255.255.255.255
Aug 18 18:37:52 ubuntu openvpn[27931]: /sbin/route del -net 0.0.0.0 netmask 128.0.0.0
Aug 18 18:37:52 ubuntu openvpn[27931]: /sbin/route del -net 128.0.0.0 netmask 128.0.0.0
Aug 18 18:37:52 ubuntu openvpn[27931]: Closing TUN/TAP interface
Aug 18 18:37:52 ubuntu openvpn[27931]: SIGUSR1[soft,connection-reset] received, process restarting
Aug 18 18:37:52 ubuntu openvpn[27931]: Restart pause, 5 second(s)
Aug 18 18:37:57 ubuntu openvpn[27931]: Cannot open file key file 'ovpn.key': No such file or directory (errno=2)
Aug 18 18:37:57 ubuntu openvpn[27931]: Exiting
我想知道问题出在哪里,导致 VPN 重新连接。请注意,该文件ovpn.key
位于当前目录中!但仍然显示cannot open file
错误消息。
有人能告诉我我哪里犯了错误吗?
提前致谢。
答案1
始终使用绝对文件名而不是相对文件名来引用您的密钥!
如果仍然不起作用,请检查文件权限。