我跟踪这个指南来建立我自己的虚拟专用网服务器。但是最后,运行命令:sudo openvpn /etc/openvpn/client/client.conf
提供给我以下内容:
2022-05-11 15:18:13 Unrecognized option or missing or extra parameter(s) in /etc/openvpn/client/client.conf:19: block-outside-dns (2.5.1)
2022-05-11 15:18:13 OpenVPN 2.5.1 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Mar 22 2022
2022-05-11 15:18:13 library versions: OpenSSL 1.1.1l 24 Aug 2021, LZO 2.10
2022-05-11 15:18:13 Outgoing Control Channel Encryption: Cipher 'AES-256-CTR' initialized with 256 bit key
2022-05-11 15:18:13 Outgoing Control Channel Encryption: Using 256 bit message hash 'SHA256' for HMAC authentication
2022-05-11 15:18:13 Incoming Control Channel Encryption: Cipher 'AES-256-CTR' initialized with 256 bit key
2022-05-11 15:18:13 Incoming Control Channel Encryption: Using 256 bit message hash 'SHA256' for HMAC authentication
2022-05-11 15:18:13 TCP/UDP: Preserving recently used remote address: [AF_INET]154.72.168.219:1194
2022-05-11 15:18:13 Socket Buffers: R=[212992->212992] S=[212992->212992]
2022-05-11 15:18:13 UDP link local: (not bound)
2022-05-11 15:18:13 UDP link remote: [AF_INET]154.72.168.219:1194
2022-05-11 15:19:13 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
2022-05-11 15:19:13 TLS Error: TLS handshake failed
2022-05-11 15:19:13 SIGUSR1[soft,tls-error] received, process restarting
2022-05-11 15:19:13 Restart pause, 5 second(s)
消息继续出现,但我的注意力集中在这里:Unrecognized option or missing or extra parameter(s) in /etc/openvpn/client/client.conf:19: block-outside-dns (2.5.1)
,我认为如果解决了这个问题,那就好了。这是我的conf文件:
client
proto udp
explicit-exit-notify
remote 154.72.168.219 1194
dev tun
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
verify-x509-name server_OOQt9gddm6Urx1I9 name
auth SHA256
auth-nocache
cipher AES-128-GCM
tls-client
tls-version-min 1.2
tls-cipher TLS-ECDHE-ECDSA-WITH-AES-128-GCM-SHA256
ignore-unknown-option block-outside-dns
setenv opt block-outside-dns # Prevent Windows 10 DNS leak
verb 3
<ca>
-----BEGIN CERTIFICATE-----
MIIB2DCCAX2gAwIBAgIUaebTDbg0OAAvaZpKFVn4o8QQn08wCgYIKoZIzj0EAwIw
bla blaa
r8EfuIWxE43eAiEAqmivO3Pcxzi2Az3LCc1h2IUO//bx1BRgtD84feZuiIo=
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
MIIB3jCCAYSgAwIBAgIRAO6eGQVKtbv9C4zD2FVZPBswCgYIKoZIzj0EAwIwHjEc
MBoGA1UEAwwTY25fQnhxTmdwTE
bla bla
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN PRIVATE KEY-----
MIGHAgEAMBMGByqGSM49AgEGCCqGSM49AwEHBG0wawIBAQQgEqd6QepY3nvgBD/J
fgvJWf/zVJwxhC8TVbA30ThP+yahRANCAARsASOeP+QTRFPq1utozH+8Cr4iUbhv
F5a1ABanAjO+T3FF1y+LDR7GW1Wr63GiZ/8Bq89koQ1UWrkbLT+gycf+
-----END PRIVATE KEY-----
</key>
<tls-crypt>
#
# 2048 bit OpenVPN static key
#
-----BEGIN OpenVPN Static key V1-----
4b1dc16e4b3c65a48853222ce0ea2812
bla bla bla
-----END OpenVPN Static key V1-----
</tls-crypt>
发布于 2022-05-11 15:25:25
我找到了这个帖子:所以我通过注释第19行来编辑我的配置文件。
# setenv opt block-outside-dns # Prevent Windows 10 DNS leak #line_19
我的vpn仍然不能工作,但它不会再次出错。
新信息:
022-05-11 15:56:17 OpenVPN 2.5.1 x86_64-pc-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [PKCS11] [MH/PKTINFO] [AEAD] built on Mar 22 2022
2022-05-11 15:56:17 library versions: OpenSSL 1.1.1l 24 Aug 2021, LZO 2.10
2022-05-11 15:56:17 Outgoing Control Channel Encryption: Cipher 'AES-256-CTR' initialized with 256 bit key
2022-05-11 15:56:17 Outgoing Control Channel Encryption: Using 256 bit message hash 'SHA256' for HMAC authentication
2022-05-11 15:56:17 Incoming Control Channel Encryption: Cipher 'AES-256-CTR' initialized with 256 bit key
2022-05-11 15:56:17 Incoming Control Channel Encryption: Using 256 bit message hash 'SHA256' for HMAC authentication
2022-05-11 15:56:17 TCP/UDP: Preserving recently used remote address: [AF_INET]154.72.168.219:1194
2022-05-11 15:56:17 Socket Buffers: R=[212992->212992] S=[212992->212992]
2022-05-11 15:56:17 UDP link local: (not bound)
2022-05-11 15:56:17 UDP link remote: [AF_INET]154.72.168.219:1194
2022-05-11 15:57:17 TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
2022-05-11 15:57:17 TLS Error: TLS handshake failed
https://askubuntu.com/questions/1407983
复制相似问题