openvpn TLS Error 及穿透防火墙

OpenVPN配好了,客户端连接时却报以下错误

TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
TLS Error: TLS handshake failed


查阅资料,说是网络有可能有问题,路由器没有开nat,或者其它的网络问题。

想来可能是防火墙限制了,是否是防火墙的问题,需要试一下
有两种方式,第一种方式,使用不受限的SSL端口443和TCP协议


#/etc/openvpn/server.conf
Server
...
# Which TCP/UDP port should OpenVPN listen on?
# If you want to run multiple OpenVPN instances
# on the same machine, use a different port
# number for each one. You will need to
# open up this port on your firewall.
port 443 # TCP or UDP server?
proto tcp2
;proto udp
...
# SSL/TLS root certificate (ca), certificate
# (cert), and private key (key). Each client
# and the server must have their own cert and
# key file. The server and all clients will
# use the same ca file.
# 

第二种,使用http代理
利openVPN自带的http-proxy突破防火墙的封锁


使用第一种方式配完后,果然连上了。

猜你喜欢

转载自powertech.iteye.com/blog/2283631
TLS