OpenVPN 停止响应

OpenVPN 停止响应

我一直在尝试使用 vps 和 raspberry pi 设置 openvpn。raspi 是 natted 的,而 vps 是公开的。我也尝试过从 mint 笔记本电脑连接到 openvpn,但没用:服务器配置:

dev tun
tls-server
dh /etc/openvpn/dh2048.pem
ca /etc/openvpn/cacert.pem
cert /etc/openvpn/vpn.wilhelm.co.za.crt
key /etc/openvpn/vpn.wilhelm.co.za.key
server 10.8.0.0 255.255.255.0
client-to-client
duplicate-cn
cipher AES-128-CBC
status openvpn-status.log
log-append openvpn.log
comp-lzo
mute 20
port 20
proto udp
push "redirect-gateway"
client-config-dir ccd
route 10.0.0.0 255.255.255.0
push "route 10.0.0.0 255.255.255.0"

客户端配置:

client
dev tun
proto udp
remote vpn.wilhelm.co.za 20
resolv-retry infinite
nobind
persist-key
persist-tun
ca cacert.pem
cert client.crt
key client.key
comp-lzo
verb 3
mute 20

我所做的: 笔记本电脑:

my-lat wilhelm # openvpn --client --ca /cacert.pem --key erasmuswill.key --cert erasmuswill.crt --remote vpn.wilhelm.co.za 20 --dev tun --tls-client --verb 3
Thu Apr 16 21:00:14 2015 OpenVPN 2.3.2 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [EPOLL] [PKCS11] [eurephia] [MH] [IPv6] built on Dec  1 2014
Thu Apr 16 21:00:14 2015 WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Enter Private Key Password:
Thu Apr 16 21:00:18 2015 WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Thu Apr 16 21:00:18 2015 WARNING: file 'erasmuswill.key' is group or others accessible
Thu Apr 16 21:00:18 2015 Socket Buffers: R=[212992->131072] S=[212992->131072]
Thu Apr 16 21:00:18 2015 UDPv4 link local (bound): [undef]
Thu Apr 16 21:00:18 2015 UDPv4 link remote: [AF_INET]107.182.132.16:20
Thu Apr 16 21:00:19 2015 TLS: Initial packet from [AF_INET]107.182.132.16:20, sid=97c7f438 95342f30
Thu Apr 16 21:00:24 2015 VERIFY OK: depth=1, CN=LOLVE
Thu Apr 16 21:00:24 2015 VERIFY OK: depth=0, C=ZA, ST=Gauteng, L=Kenmare, O=LOLVE, OU=SSL, CN=vpn.wilhelm.co.za, [email protected]
Thu Apr 16 21:01:18 2015 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Thu Apr 16 21:01:18 2015 TLS Error: TLS handshake failed
Thu Apr 16 21:01:18 2015 SIGUSR1[soft,tls-error] received, process restarting
Thu Apr 16 21:01:18 2015 Restart pause, 2 second(s)
Thu Apr 16 21:01:20 2015 WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Thu Apr 16 21:01:20 2015 WARNING: file 'erasmuswill.key' is group or others accessible
Thu Apr 16 21:01:20 2015 Socket Buffers: R=[212992->131072] S=[212992->131072]
Thu Apr 16 21:01:20 2015 UDPv4 link local (bound): [undef]
Thu Apr 16 21:01:20 2015 UDPv4 link remote: [AF_INET]107.182.132.16:20
Thu Apr 16 21:01:20 2015 TLS: Initial packet from [AF_INET]107.182.132.16:20, sid=0a42191c d09c3f10
Thu Apr 16 21:01:25 2015 VERIFY OK: depth=1, CN=LOLVE
Thu Apr 16 21:01:25 2015 VERIFY OK: depth=0, C=ZA, ST=Gauteng, L=Kenmare, O=LOLVE, OU=SSL, CN=vpn.wilhelm.co.za, [email protected]
^CThu Apr 16 21:02:00 2015 event_wait : Interrupted system call (code=4)
Thu Apr 16 21:02:00 2015 SIGINT[hard,] received, process exiting
my-lat wilhelm # 

服务器:

==> openvpn.log <==
Thu Apr 16 15:01:46 2015 105.210.95.124:1024 TLS_ERROR: BIO read tls_read_plaintext error: error:1408E098:SSL routines:SSL3_GET_MESSAGE:excessive message size
Thu Apr 16 15:01:46 2015 105.210.95.124:1024 TLS Error: TLS object -> incoming plaintext read error
Thu Apr 16 15:01:46 2015 105.210.95.124:1024 TLS Error: TLS handshake failed

我的最终目标是让 pi 连接到 VPN,将本地 LAN 桥接到 VPN,然后让笔记本电脑连接到 VPN,以便通过 vps(nat)和本地 LAN 访问进行安全的互联网浏览。

答案1

我发现了问题:我的密钥尺寸太大。我现在已经成功使用2048位了。显然 8192 位对于 openvpn 来说有点太多了

相关内容