OpenVPN connection is active but doesn't work

Hi! I Configured OpenVpn client on my router, and it works fine. But recently I got an issue, when I can't ping my router in my VPN network, but router show that evereting is fine with VPN and it works. I rebooted router but it didn't help. Only start/stop on VPN config helps to fix the problem. Can you help please?

In the log, I see some strange with the modem before VPN connection, and it keeps happening on each reconnect attempt, but when I do start/stop manually it works.

Error Log:

Thu Mar 17 10:58:42 2022 daemon.notice netifd: modem1 (29794): successfully connected the modem
Thu Mar 17 10:58:42 2022 daemon.notice netifd: modem1 (29794): network operator name: YOTA
Thu Mar 17 10:58:42 2022 daemon.notice netifd: modem1 (29794): network operator MCCMNC: 25011
Thu Mar 17 10:58:42 2022 daemon.notice netifd: modem1 (29794): registration type: home
Thu Mar 17 10:58:42 2022 daemon.notice netifd: modem1 (29794): access technology: lte
Thu Mar 17 10:58:42 2022 daemon.notice netifd: modem1 (29794): signal quality: 60%
Thu Mar 17 10:58:42 2022 daemon.notice netifd: modem1 (29794): IPv4 connection setup required in interface modem1: dhcp
Thu Mar 17 10:58:42 2022 daemon.notice netifd: Interface 'modem1' is now up
Thu Mar 17 10:58:42 2022 daemon.notice netifd: Network device 'wwan0' link is up
Thu Mar 17 10:58:42 2022 daemon.notice netifd: Network alias 'wwan0' link is up
Thu Mar 17 10:58:42 2022 daemon.notice netifd: Interface 'modem1_4' is enabled
Thu Mar 17 10:58:42 2022 daemon.notice netifd: Interface 'modem1_4' has link connectivity
Thu Mar 17 10:58:42 2022 daemon.notice netifd: Interface 'modem1_4' is setting up now
Thu Mar 17 10:58:43 2022 daemon.notice netifd: modem1_4 (29976): udhcpc: started, v1.30.1
Thu Mar 17 10:58:43 2022 daemon.notice netifd: modem1_4 (29976): udhcpc: sending discover
Thu Mar 17 10:58:43 2022 daemon.notice netifd: modem1_4 (29976): udhcpc: sending select for 10.104.163.98
Thu Mar 17 10:58:43 2022 daemon.notice netifd: modem1_4 (29976): udhcpc: lease of 10.104.163.98 obtained, lease time 86400
Thu Mar 17 10:58:44 2022 daemon.notice netifd: Interface 'modem1_4' is now up
Thu Mar 17 10:58:44 2022 daemon.info dnsmasq[2665]: reading /tmp/resolv.conf.auto
Thu Mar 17 10:58:44 2022 daemon.info dnsmasq[2665]: using local addresses only for domain test
Thu Mar 17 10:58:44 2022 daemon.info dnsmasq[2665]: using local addresses only for domain onion
Thu Mar 17 10:58:44 2022 daemon.info dnsmasq[2665]: using local addresses only for domain localhost
Thu Mar 17 10:58:44 2022 daemon.info dnsmasq[2665]: using local addresses only for domain local
Thu Mar 17 10:58:44 2022 daemon.info dnsmasq[2665]: using local addresses only for domain invalid
Thu Mar 17 10:58:44 2022 daemon.info dnsmasq[2665]: using local addresses only for domain bind
Thu Mar 17 10:58:44 2022 daemon.info dnsmasq[2665]: using local addresses only for domain lan
Thu Mar 17 10:58:44 2022 daemon.info dnsmasq[2665]: using nameserver 10.205.171.76#53
Thu Mar 17 10:58:44 2022 daemon.info dnsmasq[2665]: using nameserver 10.205.171.69#53
Thu Mar 17 10:58:44 2022 user.info mwan3track[28252]: Check (ping) success for target "net-check" on interface modem1 (wwan0)
Thu Mar 17 10:58:44 2022 user.info mwan3track[28252]: Lost 9 ping(s) on interface modem1 (wwan0)
Thu Mar 17 10:58:44 2022 user.notice mwan3track[28252]: Interface modem1 (wwan0) is online
Thu Mar 17 10:58:45 2022 user.notice mwan3[29933]: Execute ifup event on interface modem1 (wwan0)
Thu Mar 17 10:58:46 2022 user.notice mwan3[29933]: Starting tracker on interface modem1 (wwan0)
Thu Mar 17 10:58:49 2022 user.notice mwan3[30072]: Execute ifup event on interface modem1 (wwan0)
Thu Mar 17 10:58:49 2022 user.notice mwan3[30072]: Starting tracker on interface modem1 (wwan0)
Thu Mar 17 10:58:52 2022 user.info mwan3rtmon[2347]: Detect rtchange event.
Thu Mar 17 10:58:52 2022 user.info mwan3rtmon[2347]: Detect rtchange event.
Thu Mar 17 10:58:53 2022 user.notice firewall: Reloading firewall due to ifup of modem1 (wwan0)
Thu Mar 17 10:58:54 2022 user.notice firewall: Reloading firewall due to ifup of modem1 (wwan0)
Thu Mar 17 10:58:55 2022 user.info mwan3rtmon[2347]: Detect rtchange event.
Thu Mar 17 10:59:21 2022 user.info mwan3track[30528]: Check (ping) failed for target "net-check" on interface modem1 (wwan0)
Thu Mar 17 10:59:22 2022 user.notice mwan3[31141]: Execute ifdown event on interface modem1 (wwan0)
Thu Mar 17 10:59:22 2022 daemon.warn openvpn(owlvpn)[1792]: WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Thu Mar 17 10:59:22 2022 daemon.notice openvpn(owlvpn)[1792]: TCP/UDP: Preserving recently used remote address: [AF_INET]51.250.31.200:1194
Thu Mar 17 10:59:22 2022 daemon.notice openvpn(owlvpn)[1792]: Socket Buffers: R=[87380->87380] S=[16384->16384]
Thu Mar 17 10:59:22 2022 daemon.notice openvpn(owlvpn)[1792]: Attempting to establish TCP connection with [AF_INET]51.250.31.200:1194 [nonblock]
Thu Mar 17 10:59:23 2022 user.info mwan3[31141]: Connection tracking flushed for interface 'modem1' on action 'ifdown'
Thu Mar 17 10:59:23 2022 daemon.notice openvpn(owlvpn)[1792]: TCP connection established with [AF_INET]51.250.31.200:1194
Thu Mar 17 10:59:23 2022 daemon.notice openvpn(owlvpn)[1792]: TCP_CLIENT link local: (not bound)
Thu Mar 17 10:59:23 2022 daemon.notice openvpn(owlvpn)[1792]: TCP_CLIENT link remote: [AF_INET]51.250.31.200:1194
Thu Mar 17 10:59:23 2022 user.info mwan3track[30528]: Detect ifdown event on interface modem1 (wwan0)
Thu Mar 17 10:59:23 2022 daemon.err openvpn(owlvpn)[1792]: Connection reset, restarting [-1]
Thu Mar 17 10:59:23 2022 daemon.notice openvpn(owlvpn)[1792]: SIGUSR1[soft,connection-reset] received, process restarting
Thu Mar 17 10:59:23 2022 daemon.notice openvpn(owlvpn)[1792]: Restart pause, 300 second(s)
Thu Mar 17 10:59:28 2022 user.notice mwan3track[30528]: Interface modem1 (wwan0) is offline
Thu Mar 17 11:00:05 2022 daemon.notice netifd: modem1_4 (29976): udhcpc: received SIGTERM
Thu Mar 17 11:00:05 2022 daemon.notice netifd: Interface 'modem1_4' is now down
Thu Mar 17 11:00:06 2022 daemon.notice netifd: Network alias '' link is down

Success Log:

Thu Mar 17 11:04:18 2022 daemon.info [2212]: <info>  [modem3] 3GPP registration state changed (home -> searching)
Thu Mar 17 11:04:22 2022 daemon.info [2212]: <info>  [modem3] 3GPP registration state changed (searching -> registering)
Thu Mar 17 11:04:22 2022 daemon.info [2212]: <info>  [modem3] 3GPP registration state changed (registering -> home)
Thu Mar 17 11:04:22 2022 user.info mwan3track[5231]: Check (ping) failed for target "net-check" on interface modem1 (wwan0)
Thu Mar 17 11:04:23 2022 user.notice mwan3[5849]: Execute ifdown event on interface modem1 (wwan0)
Thu Mar 17 11:04:23 2022 daemon.warn openvpn(owlvpn)[1792]: WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Thu Mar 17 11:04:23 2022 daemon.notice openvpn(owlvpn)[1792]: TCP/UDP: Preserving recently used remote address: [AF_INET]51.250.31.200:1194
Thu Mar 17 11:04:23 2022 daemon.notice openvpn(owlvpn)[1792]: Socket Buffers: R=[87380->87380] S=[16384->16384]
Thu Mar 17 11:04:23 2022 daemon.notice openvpn(owlvpn)[1792]: Attempting to establish TCP connection with [AF_INET]51.250.31.200:1194 [nonblock]
Thu Mar 17 11:04:24 2022 user.info mwan3[5849]: Connection tracking flushed for interface 'modem1' on action 'ifdown'
Thu Mar 17 11:04:24 2022 user.info mwan3track[5231]: Detect ifdown event on interface modem1 (wwan0)
Thu Mar 17 11:04:24 2022 daemon.notice openvpn(owlvpn)[1792]: TCP connection established with [AF_INET]51.250.31.200:1194
Thu Mar 17 11:04:24 2022 daemon.notice openvpn(owlvpn)[1792]: TCP_CLIENT link local: (not bound)
Thu Mar 17 11:04:24 2022 daemon.notice openvpn(owlvpn)[1792]: TCP_CLIENT link remote: [AF_INET]51.250.31.200:1194
Thu Mar 17 11:04:25 2022 daemon.err openvpn(owlvpn)[1792]: Connection reset, restarting [-1]
Thu Mar 17 11:04:25 2022 daemon.notice openvpn(owlvpn)[1792]: SIGUSR1[soft,connection-reset] received, process restarting
Thu Mar 17 11:04:25 2022 daemon.notice openvpn(owlvpn)[1792]: Restart pause, 300 second(s)
Thu Mar 17 11:04:29 2022 user.notice mwan3track[5231]: Interface modem1 (wwan0) is offline
Thu Mar 17 11:05:05 2022 daemon.notice netifd: modem1_4 (5010): udhcpc: received SIGTERM
Thu Mar 17 11:05:05 2022 daemon.notice netifd: Interface 'modem1_4' is now down
Thu Mar 17 11:05:05 2022 daemon.notice netifd: Network alias '' link is down
Thu Mar 17 11:05:05 2022 daemon.notice netifd: Interface 'modem1_4' has link connectivity loss
Thu Mar 17 11:05:05 2022 daemon.notice netifd: Interface 'modem1_4' is disabled
Thu Mar 17 11:05:05 2022 daemon.warn dnsmasq[2665]: no servers found in /tmp/resolv.conf.auto, will retry
Thu Mar 17 11:05:06 2022 daemon.notice netifd: modem1 (6420): stopping network
Thu Mar 17 11:05:07 2022 daemon.notice netifd: modem1 (6420): IPv4 connection teardown required in interface modem1: dhcp
Thu Mar 17 11:05:07 2022 daemon.notice netifd: modem1 (6420): running disconnection (common)
Thu Mar 17 11:05:07 2022 user.notice mwan3[6418]: Execute ifdown event on interface modem1 (unknown)
Thu Mar 17 11:05:07 2022 daemon.notice netifd: modem1 (6420): Command failed: Permission denied
Thu Mar 17 11:05:07 2022 user.info mwan3track[5231]: Detect ifdown event on interface modem1 (wwan0)
Thu Mar 17 11:05:07 2022 daemon.info [2212]: <info>  [modem3] state changed (connected -> disconnecting)
Thu Mar 17 11:05:08 2022 user.notice mwan3track[5231]: Interface modem1 (wwan0) is offline
Thu Mar 17 11:05:08 2022 daemon.info [2212]: <info>  [modem3] state changed (disconnecting -> registered)
Thu Mar 17 11:05:08 2022 daemon.info [2212]: <info>  [modem3/bearer19] connection #1 finished: duration 85s, tx: 780 bytes, rx :6488 bytes
Thu Mar 17 11:05:08 2022 daemon.notice netifd: modem1 (6420): successfully disconnected all bearers in the modem
Thu Mar 17 11:05:08 2022 daemon.notice netifd: Interface 'modem1' is now down
Thu Mar 17 11:05:08 2022 daemon.notice netifd: Interface 'modem1' is setting up now
Thu Mar 17 11:05:09 2022 daemon.notice netifd: modem1 (6619): modem available at /org/freedesktop/ModemManager1/Modem/3
Thu Mar 17 11:05:10 2022 daemon.notice netifd: modem1 (6744): stopping network
Thu Mar 17 11:05:11 2022 user.info mwan3[6418]: Connection tracking flushed for interface 'modem1' on action 'ifdown'
Thu Mar 17 11:05:11 2022 daemon.notice netifd: modem1 (6744): couldn't load bearer path
Thu Mar 17 11:05:11 2022 daemon.notice netifd: Interface 'modem1' is now down
Thu Mar 17 11:05:11 2022 daemon.notice netifd: Interface 'modem1' is setting up now
Thu Mar 17 11:05:11 2022 daemon.notice netifd: modem1 (6808): modem available at /org/freedesktop/ModemManager1/Modem/3
Thu Mar 17 11:05:11 2022 daemon.notice netifd: modem1 (6808): starting connection with apn 'yota.ru'...
Thu Mar 17 11:05:12 2022 daemon.info [2212]: <info>  [modem3] simple connect started...
Thu Mar 17 11:05:12 2022 daemon.info [2212]: <info>  [modem3] simple connect state (4/8): wait to get fully enabled
Thu Mar 17 11:05:12 2022 daemon.info [2212]: <info>  [modem3] simple connect state (5/8): register
Thu Mar 17 11:05:12 2022 daemon.info [2212]: <info>  [modem3] simple connect state (6/8): bearer
Thu Mar 17 11:05:12 2022 daemon.info [2212]: <info>  [modem3] simple connect state (7/8): connect
Thu Mar 17 11:05:12 2022 daemon.info [2212]: <info>  [modem3] state changed (registered -> connecting)
Thu Mar 17 11:05:14 2022 daemon.info [2212]: <info>  [modem3] state changed (connecting -> connected)
Thu Mar 17 11:05:14 2022 daemon.info [2212]: <info>  [modem3] simple connect state (8/8): all done
Thu Mar 17 11:05:14 2022 daemon.notice netifd: modem1 (6808): successfully connected the modem
Thu Mar 17 11:05:14 2022 daemon.notice netifd: modem1 (6808): network operator name: YOTA
Thu Mar 17 11:05:14 2022 daemon.notice netifd: modem1 (6808): network operator MCCMNC: 25011
Thu Mar 17 11:05:14 2022 daemon.notice netifd: modem1 (6808): registration type: home
Thu Mar 17 11:05:14 2022 daemon.notice netifd: modem1 (6808): access technology: lte
Thu Mar 17 11:05:14 2022 daemon.notice netifd: modem1 (6808): signal quality: 60%
Thu Mar 17 11:05:15 2022 daemon.notice netifd: modem1 (6808): IPv4 connection setup required in interface modem1: dhcp
Thu Mar 17 11:05:15 2022 daemon.notice netifd: Interface 'modem1' is now up
Thu Mar 17 11:05:15 2022 daemon.notice netifd: Network device 'wwan0' link is up
Thu Mar 17 11:05:15 2022 daemon.notice netifd: Network alias 'wwan0' link is up
Thu Mar 17 11:05:15 2022 daemon.notice netifd: Interface 'modem1_4' is enabled
Thu Mar 17 11:05:15 2022 daemon.notice netifd: Interface 'modem1_4' has link connectivity
Thu Mar 17 11:05:15 2022 daemon.notice netifd: Interface 'modem1_4' is setting up now
Thu Mar 17 11:05:15 2022 daemon.notice netifd: modem1_4 (6962): udhcpc: started, v1.30.1
Thu Mar 17 11:05:15 2022 daemon.notice netifd: modem1_4 (6962): udhcpc: sending discover
Thu Mar 17 11:05:15 2022 daemon.notice netifd: modem1_4 (6962): udhcpc: sending select for 10.17.143.1
Thu Mar 17 11:05:15 2022 daemon.notice netifd: modem1_4 (6962): udhcpc: lease of 10.17.143.1 obtained, lease time 86400
Thu Mar 17 11:05:16 2022 daemon.notice netifd: Interface 'modem1_4' is now up
Thu Mar 17 11:05:16 2022 daemon.info dnsmasq[2665]: reading /tmp/resolv.conf.auto
Thu Mar 17 11:05:16 2022 daemon.info dnsmasq[2665]: using local addresses only for domain test
Thu Mar 17 11:05:16 2022 daemon.info dnsmasq[2665]: using local addresses only for domain onion
Thu Mar 17 11:05:16 2022 daemon.info dnsmasq[2665]: using local addresses only for domain localhost
Thu Mar 17 11:05:16 2022 daemon.info dnsmasq[2665]: using local addresses only for domain local
Thu Mar 17 11:05:16 2022 daemon.info dnsmasq[2665]: using local addresses only for domain invalid
Thu Mar 17 11:05:16 2022 daemon.info dnsmasq[2665]: using local addresses only for domain bind
Thu Mar 17 11:05:16 2022 daemon.info dnsmasq[2665]: using local addresses only for domain lan
Thu Mar 17 11:05:16 2022 daemon.info dnsmasq[2665]: using nameserver 10.205.171.69#53
Thu Mar 17 11:05:16 2022 daemon.info dnsmasq[2665]: using nameserver 10.205.171.76#53
Thu Mar 17 11:05:16 2022 user.notice mwan3[6942]: Execute ifup event on interface modem1 (wwan0)
Thu Mar 17 11:05:17 2022 user.notice mwan3[6942]: Starting tracker on interface modem1 (wwan0)
Thu Mar 17 11:05:17 2022 user.notice mwan3track[5231]: Stopping mwan3track for interface "modem1"
Thu Mar 17 11:05:20 2022 user.info mwan3rtmon[2347]: Detect rtchange event.
Thu Mar 17 11:05:20 2022 user.notice firewall: Reloading firewall due to ifup of modem1 (wwan0)
Thu Mar 17 11:05:21 2022 user.info mwan3rtmon[2347]: Detect rtchange event.
Thu Mar 17 11:05:25 2022 daemon.info hostapd: wlan0: STA a4:83:e7:d5:20:cf IEEE 802.11: authenticated
Thu Mar 17 11:05:25 2022 daemon.info hostapd: wlan0: STA a4:83:e7:d5:20:cf IEEE 802.11: associated (aid 1)
Thu Mar 17 11:05:25 2022 daemon.notice hostapd: wlan0: AP-STA-CONNECTED a4:83:e7:d5:20:cf
Thu Mar 17 11:05:25 2022 daemon.info hostapd: wlan0: STA a4:83:e7:d5:20:cf RADIUS: starting accounting session 6981D3259516565A
Thu Mar 17 11:05:25 2022 daemon.info hostapd: wlan0: STA a4:83:e7:d5:20:cf WPA: pairwise key handshake completed (RSN)
Thu Mar 17 11:05:26 2022 daemon.info dnsmasq-dhcp[2665]: DHCPREQUEST(br-lan) 192.168.1.166 a4:83:e7:d5:20:cf
Thu Mar 17 11:05:26 2022 daemon.info dnsmasq-dhcp[2665]: DHCPACK(br-lan) 192.168.1.166 a4:83:e7:d5:20:cf MacBook-Mila
Thu Mar 17 11:06:13 2022 daemon.err uhttpd[1880]: luci: accepted login on / for root from 192.168.1.166
Thu Mar 17 11:08:13 2022 daemon.notice openvpn(owlvpn)[1792]: SIGTERM[hard,init_instance] received, process exiting
Thu Mar 17 11:08:18 2022 daemon.notice openvpn(owlvpn)[9427]: OpenVPN 2.4.11 mipsel-openwrt-linux-gnu [SSL (OpenSSL)] [LZO] [LZ4] [EPOLL] [MH/PKTINFO] [AEAD]
Thu Mar 17 11:08:19 2022 daemon.notice openvpn(owlvpn)[9427]: library versions: OpenSSL 1.1.1l  24 Aug 2021, LZO 2.10
Thu Mar 17 11:08:19 2022 daemon.warn openvpn(owlvpn)[9427]: WARNING: No server certificate verification method has been enabled.  See http://openvpn.net/howto.html#mitm for more info.
Thu Mar 17 11:08:19 2022 daemon.notice openvpn(owlvpn)[9427]: TCP/UDP: Preserving recently used remote address: [AF_INET]51.250.31.200:1194
Thu Mar 17 11:08:19 2022 daemon.notice openvpn(owlvpn)[9427]: Socket Buffers: R=[87380->87380] S=[16384->16384]
Thu Mar 17 11:08:19 2022 daemon.notice openvpn(owlvpn)[9427]: Attempting to establish TCP connection with [AF_INET]51.250.31.200:1194 [nonblock]
Thu Mar 17 11:08:20 2022 daemon.notice openvpn(owlvpn)[9427]: TCP connection established with [AF_INET]51.250.31.200:1194
Thu Mar 17 11:08:20 2022 daemon.notice openvpn(owlvpn)[9427]: TCP_CLIENT link local: (not bound)
Thu Mar 17 11:08:20 2022 daemon.notice openvpn(owlvpn)[9427]: TCP_CLIENT link remote: [AF_INET]51.250.31.200:1194
Thu Mar 17 11:08:20 2022 daemon.notice openvpn(owlvpn)[9427]: TLS: Initial packet from [AF_INET]51.250.31.200:1194, sid=d0ec2d36 5a14095b
Thu Mar 17 11:08:21 2022 daemon.notice openvpn(owlvpn)[9427]: VERIFY OK: depth=1, CN=owl-vpn-server
Thu Mar 17 11:08:21 2022 daemon.notice openvpn(owlvpn)[9427]: VERIFY OK: depth=0, CN=server
Thu Mar 17 11:08:22 2022 daemon.notice openvpn(owlvpn)[9427]: Control Channel: TLSv1.3, cipher TLSv1.3 TLS_AES_256_GCM_SHA384, 2048 bit RSA
Thu Mar 17 11:08:22 2022 daemon.notice openvpn(owlvpn)[9427]: [server] Peer Connection Initiated with [AF_INET]51.250.31.200:1194
Thu Mar 17 11:08:23 2022 daemon.notice openvpn(owlvpn)[9427]: SENT CONTROL [server]: 'PUSH_REQUEST' (status=1)
Thu Mar 17 11:08:23 2022 daemon.notice openvpn(owlvpn)[9427]: PUSH: Received control message: 'PUSH_REPLY,route 10.8.0.0 255.255.255.0,topology net30,ping 10,ping-restart 120,ifconfig 10.8.0.13 255.255.255.0,peer-id 0,cipher AES-256-GCM'
Thu Mar 17 11:08:23 2022 daemon.notice openvpn(owlvpn)[9427]: OPTIONS IMPORT: timers and/or timeouts modified
Thu Mar 17 11:08:23 2022 daemon.notice openvpn(owlvpn)[9427]: OPTIONS IMPORT: --ifconfig/up options modified
Thu Mar 17 11:08:23 2022 daemon.notice openvpn(owlvpn)[9427]: OPTIONS IMPORT: route options modified
Thu Mar 17 11:08:23 2022 daemon.notice openvpn(owlvpn)[9427]: OPTIONS IMPORT: peer-id set
Thu Mar 17 11:08:23 2022 daemon.notice openvpn(owlvpn)[9427]: OPTIONS IMPORT: adjusting link_mtu to 1626
Thu Mar 17 11:08:23 2022 daemon.notice openvpn(owlvpn)[9427]: OPTIONS IMPORT: data channel crypto options modified
Thu Mar 17 11:08:23 2022 daemon.notice openvpn(owlvpn)[9427]: Data Channel: using negotiated cipher 'AES-256-GCM'
Thu Mar 17 11:08:23 2022 daemon.notice openvpn(owlvpn)[9427]: Outgoing Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Thu Mar 17 11:08:23 2022 daemon.notice openvpn(owlvpn)[9427]: Incoming Data Channel: Cipher 'AES-256-GCM' initialized with 256 bit key
Thu Mar 17 11:08:23 2022 daemon.warn openvpn(owlvpn)[9427]: WARNING: Since you are using --dev tun with a point-to-point topology, the second argument to --ifconfig must be an IP address.  You are using something (255.255.255.0) that looks more like a netmask. (silence this warning with --ifconfig-nowarn)
Thu Mar 17 11:08:23 2022 daemon.notice openvpn(owlvpn)[9427]: TUN/TAP device tun0 opened
Thu Mar 17 11:08:23 2022 daemon.notice openvpn(owlvpn)[9427]: TUN/TAP TX queue length set to 100
Thu Mar 17 11:08:23 2022 daemon.notice openvpn(owlvpn)[9427]: /sbin/ifconfig tun0 10.8.0.13 pointopoint 255.255.255.0 mtu 1500
Thu Mar 17 11:08:23 2022 daemon.notice openvpn(owlvpn)[9427]: /sbin/route add -net 10.8.0.0 netmask 255.255.255.0 gw 255.255.255.0
Thu Mar 17 11:08:23 2022 daemon.warn openvpn(owlvpn)[9427]: WARNING: this configuration may cache passwords in memory -- use the auth-nocache option to prevent this
Thu Mar 17 11:08:23 2022 daemon.notice openvpn(owlvpn)[9427]: Initialization Sequence Completed
Thu Mar 17 11:08:59 2022 daemon.notice hostapd: wlan0: AP-STA-DISCONNECTED a4:83:e7:d5:20:cf
Thu Mar 17 11:08:59 2022 daemon.info hostapd: wlan0: STA a4:83:e7:d5:20:cf IEEE 802.11: disassociated

It appears that your LTE modem is going down... that is causing a lack of connectivity and thus your OpenVPN connection to fail. You should track down what is causing your LTE modem down events.

It happens on each attempt of OpenVpn connects to the server. But if I do it manually everything is fine. Can you help me, how I can find out why is modem going down?

What do you mean "each attempt"? How does that differ from when you do it manually (which would also seem like an attempt, but clearly something is different)?

First attempt - when the router restarts, and I see in logs, it tries to reconnect to VPN several times with several minutes interval, and in the log, I see messages as shown in Error Log. But if I switch on/off VPN with the router interface VPN is working and in the log, I see messages as in Success Log.

Not really sure, but I’m guessing that this is a timing issue. If you delay the start of the OpenVPN connection, it might work. You could disable the auto start and then create a script to start it a certain number of seconds/minutes after boot. Call that script in rc.local and it will launch at the completion of the boot cycle.

Thank you!
I leave the rc.local template I created, maybe it will be useful for someone

# Put your custom commands here that should be executed once
# the system init finished. By default this file does nothing.

echo "[rc.local] sleep 60 before running VPN service"
sleep 60

echo "[rc.local] Run vpn service"
/etc/init.d/openvpn start
sleep 60

echo "[rc.local] Run vpn client"
/usr/sbin/openvpn --syslog openvpn(owlvpn) --status /var/run/openvpn.owlvpn.status --cd /var/etc --config openvpn-[config name].conf

echo "[rc.local] Finished"
exit 0

PS I am not sure if

echo "[rc.local] Run vpn service"
/etc/init.d/openvpn start
sleep 60

is needed.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.