I'm trying to set up an OpenVPN to access a VPN from my pc. I have the .opvn file. I set the VPN up using the .ovpn config file but:
-
When I see the log, I see a bunch of errors including UDP and TLS Errors. (See below)
-
I can't set up 'tun0' in my network>interfaces, probably because the VPN isn't even running.
Can you help me debugging the configuration?
Openvpn related Errors on logread
Wed Jun 2 00:10:09 2021 daemon.warn openvpn(Test)[1376]: Unrecognized option or missing or extra parameter(s) in /etc/openvpn/Test.ovpn:13: block-outside-dns (2.4.11)
Wed Jun 2 00:10:09 2021 daemon.notice openvpn(Test)[1376]: OpenVPN 2.4.11 mipsel-openwrt-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD]
Wed Jun 2 00:10:09 2021 daemon.notice openvpn(Test)[1376]: library versions: OpenSSL 1.1.1k 25 Mar 2021, LZO 2.10
Wed Jun 2 00:10:10 2021 daemon.notice openvpn(Test)[1376]: Outgoing Control Channel Encryption: Cipher 'AES-256-CTR' initialized with 256 bit key
Wed Jun 2 00:10:10 2021 kern.info kernel: [ 25.850436] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
Wed Jun 2 00:10:10 2021 daemon.notice openvpn(Test)[1376]: Outgoing Control Channel Encryption: Using 256 bit message hash 'SHA256' for HMAC authentication
Wed Jun 2 00:10:10 2021 daemon.notice openvpn(Test)[1376]: Incoming Control Channel Encryption: Cipher 'AES-256-CTR' initialized with 256 bit key
Wed Jun 2 00:10:10 2021 daemon.notice openvpn(Test)[1376]: Incoming Control Channel Encryption: Using 256 bit message hash 'SHA256' for HMAC authentication
Wed Jun 2 00:10:10 2021 daemon.err hostapd: Configuration file: /var/run/hostapd-phy1.conf
Wed Jun 2 00:10:10 2021 daemon.notice openvpn(Test)[1376]: TCP/UDP: Preserving recently used remote address: [AF_INET]146.196.35.35:1194
Wed Jun 2 00:10:10 2021 daemon.notice openvpn(Test)[1376]: Socket Buffers: R=[163840->163840] S=[163840->163840]
Wed Jun 2 00:10:10 2021 daemon.notice openvpn(Test)[1376]: UDP link local: (not bound)
Wed Jun 2 00:10:10 2021 daemon.notice openvpn(Test)[1376]: UDP link remote: [AF_INET]146.196.35.35:1194
Wed Jun 2 00:10:10 2021 daemon.err openvpn(Test)[1376]: write UDP: Network unreachable (code=128)
Wed Jun 2 00:10:10 2021 daemon.notice openvpn(Test)[1376]: Network unreachable, restarting
Wed Jun 2 00:10:10 2021 daemon.notice openvpn(Test)[1376]: SIGUSR1[soft,network-unreachable] received, process restarting
Wed Jun 2 00:10:10 2021 daemon.notice openvpn(Test)[1376]: Restart pause, 5 second(s)
Wed Jun 2 00:10:15 2021 daemon.notice openvpn(Test)[1376]: TCP/UDP: Preserving recently used remote address: [AF_INET]146.196.35.35:1194
Wed Jun 2 00:10:15 2021 daemon.notice openvpn(Test)[1376]: Socket Buffers: R=[163840->163840] S=[163840->163840]
Wed Jun 2 00:10:15 2021 daemon.notice openvpn(Test)[1376]: UDP link local: (not bound)
Wed Jun 2 00:10:15 2021 daemon.notice openvpn(Test)[1376]: UDP link remote: [AF_INET]146.196.35.35:1194
Wed Jun 2 00:11:25 2021 daemon.info pppd[1393]: System time change detected.
Wed Jun 2 00:11:25 2021 daemon.err openvpn(Test)[1376]: TLS Error: TLS key negotiation failed to occur within 60 seconds (check your network connectivity)
Wed Jun 2 00:11:25 2021 daemon.err openvpn(Test)[1376]: TLS Error: TLS handshake failed
Wed Jun 2 00:11:25 2021 daemon.notice openvpn(Test)[1376]: SIGUSR1[soft,tls-error] received, process restarting
Wed Jun 2 00:11:25 2021 daemon.notice openvpn(Test)[1376]: Restart pause, 5 second(s)
... then it keeps looping ...
client.ovpn configuration
client
dev tun
proto udp
remote 146.196.35.35 1194
resolv-retry infinite
nobind
persist-key
persist-tun
remote-cert-tls server
auth SHA512
cipher AES-256-CBC
ignore-unknown-option block-outside-dns
block-outside-dns
verb 3
<ca>
-----BEGIN CERTIFICATE-----
MII...zhQ==
-----END CERTIFICATE-----
</ca>
<cert>
-----BEGIN CERTIFICATE-----
MII...Iw==
-----END CERTIFICATE-----
</cert>
<key>
-----BEGIN PRIVATE KEY-----
MII...ag0aI=
-----END PRIVATE KEY-----
</key>
<tls-crypt>
-----BEGIN OpenVPN Static key V1-----
da94...50454
-----END OpenVPN Static key V1-----
</tls-crypt>